All Classes Files Functions Variables Enumerations Enumerator Macros
Public Member Functions | Public Attributes | Private Attributes | List of all members
Season Class Reference

Stores all info required to describe a particular season of a TV show. More...

#include <season.hpp>

Public Member Functions

 Season ()
 Default constructor, sets the number of episodes to 0 by default. More...
 
 Season (int)
 Set the season number and sets the number of episodes to 0 by default. More...
 
 ~Season ()
 Default destructor. More...
 
bool addEpisode (int, int, string, string, string, string, string, string)
 Saves the info required to describe a particular episode. More...
 
bool sortAscending ()
 Sorts the episodes by number in ascending order. More...
 
bool setNumber (int)
 Set the season number. More...
 
int getNumber () const
 
int getNumEps () const
 

Public Attributes

vector< Episodeepisodes
 A vector that holds each Episode. More...
 

Private Attributes

int number
 The season's number. More...
 
int numEpisodes
 The number of episodes in the season. More...
 

Detailed Description

Stores all info required to describe a particular season of a TV show.

Season objects contain: season number and Episode objects. Designed for vector use.

Season requires the Episode class to be loaded prior to it in order to function properly.

Definition at line 30 of file season.hpp.

Constructor & Destructor Documentation

Season::Season ( )

Default constructor, sets the number of episodes to 0 by default.

Definition at line 18 of file season.cpp.

Season::Season ( int  seasNum)

Set the season number and sets the number of episodes to 0 by default.

Parameters
seasNum- the season number

Definition at line 26 of file season.cpp.

Season::~Season ( )

Default destructor.

Definition at line 35 of file season.cpp.

Member Function Documentation

bool Season::addEpisode ( int  num,
int  xep,
string  pep,
string  title,
string  newfile,
string  newdir,
string  oldfile,
string  olddir 
)

Saves the info required to describe a particular episode.

Parameters
num- the episode number
xep- the end number of a multi-episode file
pep- the information for a multi-part episode file
title- the title of the episode
newfile- the original file name
newdir- the original directory path
oldfile- the modified file name
olddir- the modified directory path
Returns
a boolean, true for sucess, false for failure

Definition at line 49 of file season.cpp.

int Season::getNumber ( ) const
Returns
the number of the current season

Definition at line 81 of file season.cpp.

Here is the caller graph for this function:

int Season::getNumEps ( ) const
Returns
the number of the episodes within the current season

Definition at line 88 of file season.cpp.

bool Season::setNumber ( int  num)

Set the season number.

Parameters
num- the season number
Returns
a boolean, true for sucess, false for failure

Definition at line 70 of file season.cpp.

bool Season::sortAscending ( )

Sorts the episodes by number in ascending order.

Returns
a boolean, true for sucess, false for failure

Definition at line 97 of file season.cpp.

Here is the call graph for this function:

Member Data Documentation

vector<Episode> Season::episodes

A vector that holds each Episode.

Definition at line 47 of file season.hpp.

int Season::number
private

The season's number.

Definition at line 50 of file season.hpp.

int Season::numEpisodes
private

The number of episodes in the season.

Definition at line 51 of file season.hpp.


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