anfo  1.0
Public Member Functions | Private Attributes | List of all members
anfo::Anime Class Reference

Class to manage animes. More...

#include <Anime.h>

Collaboration diagram for anfo::Anime:
Collaboration graph

Public Member Functions

 Anime ()
 Empty constructor. More...
 
 Anime (std::string filename)
 Constructor with a filename. More...
 
void load (std::string filename)
 Methode to load an anfo file. More...
 
void save ()
 Methode to save an anfo file. More...
 
void save (std::string filename)
 Methode to save an anfo file. More...
 
std::string getName () const
 Returns the name of the anime. More...
 
std::string getSecondName () const
 Returns the second name of the anime. More...
 
std::string getCoverName () const
 Returns the name of the cover file. More...
 
std::list< Season > & getSeasonList ()
 Returns a list with the seasons. More...
 
unsigned int getSeasonCount ()
 Returns the number of seasons. More...
 
void setName (std::string _name)
 Sets the name of the anime. More...
 
void setSecondName (std::string _secondName)
 Sets the second name of the anime. More...
 
void setCoverName (std::string _coverName)
 Sets the name of the cover file. More...
 

Private Attributes

std::string name
 The name of the anime. More...
 
std::string secondName
 An alternative name, the japanese name for example. More...
 
std::string coverName
 The name of the cover file (for example 'cover.jpg') More...
 
std::list< Seasonseasons
 The seasons/specials/ova's of the anime. More...
 

Detailed Description

Class to manage animes.

This is the main class of the anfo project.
It contains the informations about the anime and a list of seasons.
It makes the modulation of the file easier.

Definition at line 25 of file Anime.h.

Constructor & Destructor Documentation

anfo::Anime::Anime ( )

Empty constructor.

Creates an empty anfo file

anfo::Anime::Anime ( std::string  filename)

Constructor with a filename.

Creates and loads an anfo file

Parameters
filenameThe file name of the anfo file
Exceptions
anfo::Exception::ID_ANIME_MARKIf the ANIME-marks are not at the correct position.

Member Function Documentation

std::string anfo::Anime::getCoverName ( ) const

Returns the name of the cover file.

The file should be in the same directory like the anfo file,
but it can be used a relative path.

Returns
The name of the cover file.
std::string anfo::Anime::getName ( ) const

Returns the name of the anime.

Returns
The name of the anime
unsigned int anfo::Anime::getSeasonCount ( )

Returns the number of seasons.

Returns
The number of seasons in this anfo file.
std::list<Season>& anfo::Anime::getSeasonList ( )

Returns a list with the seasons.

Returns
A reference of the list with the seasons of the anime.
std::string anfo::Anime::getSecondName ( ) const

Returns the second name of the anime.

Returns
The second name of the anime
void anfo::Anime::load ( std::string  filename)

Methode to load an anfo file.

This methodes loads and deserializes an anfo file.

Parameters
filenameThe file name of the anfo file.
Exceptions
anfo::Exception::ID_ANIME_MARKIf the anime marks are not at the correct position.
void anfo::Anime::save ( )

Methode to save an anfo file.

This methode saves and serializes the anime in an anfo file. The name of the file will be The name of the anime with the extention '.anfo'

void anfo::Anime::save ( std::string  filename)

Methode to save an anfo file.

This methode saves and serializes the anime in an anfo file. The name of the file can be choosen

Parameters
filenameThe file name for the anfo file.
void anfo::Anime::setCoverName ( std::string  _coverName)

Sets the name of the cover file.

Parameters
_coverNameThe new file name for the cover.
void anfo::Anime::setName ( std::string  _name)

Sets the name of the anime.

Parameters
_nameThe new name for the anime.
void anfo::Anime::setSecondName ( std::string  _secondName)

Sets the second name of the anime.

The second name could be the translation of the name
or a sub title.

Parameters
_secondNameThe new second name for the anime.

Member Data Documentation

std::string anfo::Anime::coverName
private

The name of the cover file (for example 'cover.jpg')

Definition at line 36 of file Anime.h.

std::string anfo::Anime::name
private

The name of the anime.

Definition at line 30 of file Anime.h.

std::list<Season> anfo::Anime::seasons
private

The seasons/specials/ova's of the anime.

Definition at line 39 of file Anime.h.

std::string anfo::Anime::secondName
private

An alternative name, the japanese name for example.

Definition at line 33 of file Anime.h.


The documentation for this class was generated from the following file: