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

Class to manage seasons. More...

#include <Season.h>

Collaboration diagram for anfo::Season:
Collaboration graph

Public Types

enum  {
  SEASON = 1, SPECIAL, OVA, MOVIES,
  INVALID
}
 

Public Member Functions

 Season ()
 Constructor. More...
 
void clearPersonallyInformations ()
 Deletes the personally informations. More...
 
void saveToFile (std::ofstream &saveStream)
 Saves the season to a file stream. More...
 
void loadFromFile (std::ifstream &loadStream)
 Loads the season from a file stream. More...
 
unsigned int getSeasonNumber ()
 Get the season number. More...
 
unsigned int getType ()
 Get the Type. More...
 
unsigned int getEpisodes ()
 Get the number of episodes in this season. More...
 
unsigned int getAgeLimit ()
 Get the minimum age to watch this anime. More...
 
std::string getName ()
 Get the name of this season. More...
 
std::string getSecondName ()
 Get the alternative name of this season. More...
 
std::string getGenre ()
 Get the genre of this season. More...
 
std::string getDescription ()
 Get the Description of this season. More...
 
std::string getLanguage ()
 Get the language of the videos of this season. More...
 
std::string getSubtitle ()
 Get the language of the subtitles of the season. More...
 
std::string getFoldername ()
 Get the Foldername where the video files are stored. More...
 
unsigned int getWatched ()
 Get the number of seen episodes. More...
 
std::list< std::string > & getSeenEpisodes ()
 Get the list of seen episodes. More...
 
unsigned char getRating ()
 Get the rating of this season. More...
 
void setSeasonNumber (unsigned int _seasonNumber)
 Set the season number. More...
 
void setType (unsigned int _type)
 Set the type of this season. More...
 
void setEpisodes (unsigned int _episodes)
 Set the number of episodes this season contains. More...
 
void setAgeLimit (unsigned int _ageLimit)
 Set the age limit of this season. More...
 
void setName (std::string _name)
 Set the name of this season. More...
 
void setSecondName (std::string _secondName)
 Set the alternative name of this season. More...
 
void setGenre (std::string _genre)
 Set the genre of this season. More...
 
void setDescription (std::string _description)
 Set the description of this season. More...
 
void setLanguage (std::string _language)
 Set the language of this season. More...
 
void setSubtitle (std::string _subtitle)
 Set the subtitles language of this season. More...
 
void setFoldername (std::string _foldername)
 Set the folder name, where the files are stored. More...
 
void setWatched (unsigned int _watched)
 Set if the season is watched. More...
 
void setSeenEpisodes (std::list< std::string > _seenEpisodes)
 Set the list of seen episodes. More...
 
void addSeenEpisode (std::string _seenEpisode)
 Add a seen episode to this list. More...
 
void setRating (unsigned char _rating)
 Set a rating for this season. More...
 

Private Attributes

unsigned int seasonNumber
 The season number (e.g. season 1, season 2, ...) More...
 
unsigned int type
 The season type (OVA, Movie, Season, ...) More...
 
unsigned int episodes
 The number of episodes in this season (0, if unknown or continued) More...
 
unsigned int ageLimit
 The minimum age for watching this anime. More...
 
std::string name
 The name of this season. More...
 
std::string secondName
 An alternative name, the japanese name for example. More...
 
std::string genre
 The genre(s) of the season. More...
 
std::string description
 A description about the season. More...
 
std::string language
 The language(s) of the video files of the season. More...
 
std::string subtitle
 The language(s) of the subtitles of the season. More...
 
std::string foldername
 The folder where the video files are stored. More...
 
unsigned int watched
 0 = unwatched, else = unixtime you have watched it More...
 
std::list< std::string > seenEpisodes
 List of the seen Episodes (File names) More...
 
unsigned char rating
 A rating from 0 (0.0, worst) until 100 (10.0, best) More...
 

Detailed Description

Class to manage seasons.

This class manages the seasons of an anime.
It contains the informations about the season and needs to be in an anime class.
It makes the modulation of the season part of the file easier.

Definition at line 24 of file Season.h.

Member Enumeration Documentation

anonymous enum
Enumerator
SEASON 

A season.

SPECIAL 

A folder with special episodes.

OVA 

A folder with ovas.

MOVIES 

A folder with movies.

INVALID 

Definition at line 72 of file Season.h.

Constructor & Destructor Documentation

anfo::Season::Season ( )

Constructor.

Creates an empty season

Member Function Documentation

void anfo::Season::addSeenEpisode ( std::string  _seenEpisode)

Add a seen episode to this list.

Parameters
_seenEpisodeThe name of the file which is to add
void anfo::Season::clearPersonallyInformations ( )

Deletes the personally informations.

Deletes the personally informations like:
watched, rating and seen episodes.
Keeps the generally informations

unsigned int anfo::Season::getAgeLimit ( )

Get the minimum age to watch this anime.

Returns
The age limit
std::string anfo::Season::getDescription ( )

Get the Description of this season.

Returns
The description of this season
unsigned int anfo::Season::getEpisodes ( )

Get the number of episodes in this season.

Returns
The number of seasons
std::string anfo::Season::getFoldername ( )

Get the Foldername where the video files are stored.

Returns
The folder name
std::string anfo::Season::getGenre ( )

Get the genre of this season.

Returns
The genre of this season
std::string anfo::Season::getLanguage ( )

Get the language of the videos of this season.

Returns
A string with the languages
std::string anfo::Season::getName ( )

Get the name of this season.

Returns
The name of this season
unsigned char anfo::Season::getRating ( )

Get the rating of this season.

Returns
A ranking between 0 and 100. Everything else is invalid.
unsigned int anfo::Season::getSeasonNumber ( )

Get the season number.

Returns
The season number, e.g. 1 for season 1
std::string anfo::Season::getSecondName ( )

Get the alternative name of this season.

Returns
The alternative name of this season
std::list<std::string>& anfo::Season::getSeenEpisodes ( )

Get the list of seen episodes.

Returns
A reference to the list of seen episodes
std::string anfo::Season::getSubtitle ( )

Get the language of the subtitles of the season.

Returns
A string with the language of the subtitles
unsigned int anfo::Season::getType ( )

Get the Type.

for example anfo::Season::Season

Returns
The type of the folder.
unsigned int anfo::Season::getWatched ( )

Get the number of seen episodes.

Returns
Number of seen episodes
void anfo::Season::loadFromFile ( std::ifstream &  loadStream)

Loads the season from a file stream.

Parameters
loadStreamThe stream. Needs to be open.
Exceptions
anfo::Exception::ID_SEASON_MARKIf the season marks are not at the correct position.
void anfo::Season::saveToFile ( std::ofstream &  saveStream)

Saves the season to a file stream.

Parameters
saveStreamThe stream. Needs to be open.
void anfo::Season::setAgeLimit ( unsigned int  _ageLimit)

Set the age limit of this season.

Parameters
_ageLimitThe age limit of this season
void anfo::Season::setDescription ( std::string  _description)

Set the description of this season.

Parameters
_descriptionThe description of this season
void anfo::Season::setEpisodes ( unsigned int  _episodes)

Set the number of episodes this season contains.

Parameters
_episodesthe new number of episodes
void anfo::Season::setFoldername ( std::string  _foldername)

Set the folder name, where the files are stored.

Parameters
_foldernameThe name of the folder
void anfo::Season::setGenre ( std::string  _genre)

Set the genre of this season.

Parameters
_genreThe genre of this season
void anfo::Season::setLanguage ( std::string  _language)

Set the language of this season.

Parameters
_languageThe language of the season
void anfo::Season::setName ( std::string  _name)

Set the name of this season.

Parameters
_nameThe name of this season
void anfo::Season::setRating ( unsigned char  _rating)

Set a rating for this season.

Parameters
_ratingOnly the range from 0 to 100 is valid
void anfo::Season::setSeasonNumber ( unsigned int  _seasonNumber)

Set the season number.

Parameters
_seasonNumberThe new season number
void anfo::Season::setSecondName ( std::string  _secondName)

Set the alternative name of this season.

Parameters
_secondNameThe alternative name of this season
void anfo::Season::setSeenEpisodes ( std::list< std::string >  _seenEpisodes)

Set the list of seen episodes.

Parameters
_seenEpisodesA new list of seen episodes
void anfo::Season::setSubtitle ( std::string  _subtitle)

Set the subtitles language of this season.

Parameters
_subtitleThe subtitles language of the season
void anfo::Season::setType ( unsigned int  _type)

Set the type of this season.

Parameters
_typeThe new type of this season/folder
Exceptions
anfo::Exception::ID_INVALID_TYPEIf the type is invalid
void anfo::Season::setWatched ( unsigned int  _watched)

Set if the season is watched.

Parameters
_watchedtrue, if watched, false, if not watched

Member Data Documentation

unsigned int anfo::Season::ageLimit
private

The minimum age for watching this anime.

Definition at line 38 of file Season.h.

std::string anfo::Season::description
private

A description about the season.

Definition at line 50 of file Season.h.

unsigned int anfo::Season::episodes
private

The number of episodes in this season (0, if unknown or continued)

Definition at line 35 of file Season.h.

std::string anfo::Season::foldername
private

The folder where the video files are stored.

Definition at line 59 of file Season.h.

std::string anfo::Season::genre
private

The genre(s) of the season.

Definition at line 47 of file Season.h.

std::string anfo::Season::language
private

The language(s) of the video files of the season.

Definition at line 53 of file Season.h.

std::string anfo::Season::name
private

The name of this season.

Definition at line 41 of file Season.h.

unsigned char anfo::Season::rating
private

A rating from 0 (0.0, worst) until 100 (10.0, best)

Definition at line 69 of file Season.h.

unsigned int anfo::Season::seasonNumber
private

The season number (e.g. season 1, season 2, ...)

Definition at line 29 of file Season.h.

std::string anfo::Season::secondName
private

An alternative name, the japanese name for example.

Definition at line 44 of file Season.h.

std::list<std::string> anfo::Season::seenEpisodes
private

List of the seen Episodes (File names)

Definition at line 66 of file Season.h.

std::string anfo::Season::subtitle
private

The language(s) of the subtitles of the season.

Definition at line 56 of file Season.h.

unsigned int anfo::Season::type
private

The season type (OVA, Movie, Season, ...)

Definition at line 32 of file Season.h.

unsigned int anfo::Season::watched
private

0 = unwatched, else = unixtime you have watched it

Definition at line 63 of file Season.h.


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