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

Stores all info required to describe an entire TV show. More...

#include <show.hpp>

Public Member Functions

 Show ()
 Default constructor, set the number of episodes to 0, the default. More...
 
 Show (int, string)
 Stores the show name and index for reference. More...
 
 ~Show ()
 Default destructor. More...
 
bool addSeason (int, vector< ErrorHandler > &)
 Adds a season to the current show. More...
 
bool setIndex (int)
 Sets the show name index. More...
 
int getIndex () const
 
bool setShowname (string)
 Sets the show name. More...
 
string getShowname () const
 

Public Attributes

vector< Seasonseasons
 A vector that holds the Season objects. More...
 

Private Member Functions

bool sortAscending ()
 Sorts the seasons in ascending order. More...
 

Private Attributes

int index
 The show name's index. More...
 
string showname
 The show's name. More...
 
int numSeasons
 The number of seasons for *this show. More...
 
int numEpisodes
 The number of episodes for *this show. More...
 

Detailed Description

Stores all info required to describe an entire TV show.

Show objects contain: show index, show name, and a Season object. Designed for vector use.

Show requires 2 other classes, Season and Episode to be loaded prior to it in order to function properly.

Definition at line 31 of file show.hpp.

Constructor & Destructor Documentation

Show::Show ( )

Default constructor, set the number of episodes to 0, the default.

Definition at line 20 of file show.cpp.

Show::Show ( int  ind,
string  name 
)

Stores the show name and index for reference.

Parameters
ind- the show index from the showfile
name- the show name

Definition at line 30 of file show.cpp.

Show::~Show ( )

Default destructor.

Definition at line 39 of file show.cpp.

Member Function Documentation

bool Show::addSeason ( int  seasNum,
vector< ErrorHandler > &  fail 
)

Adds a season to the current show.

Parameters
seasNum- the number of seasons for the current show
fail- the failure information
Returns
a boolean, true for sucess, false for failure

Definition at line 87 of file show.cpp.

Here is the call graph for this function:

int Show::getIndex ( ) const
Returns
the show name index

Definition at line 44 of file show.cpp.

string Show::getShowname ( ) const
Returns
the show name

Definition at line 51 of file show.cpp.

Here is the caller graph for this function:

bool Show::setIndex ( int  ind)

Sets the show name index.

Parameters
ind- the index retrieved from showfile
Returns
a boolean, true for sucess, false for failure

Definition at line 60 of file show.cpp.

bool Show::setShowname ( string  name)

Sets the show name.

Parameters
name- the show name retrieved from showfile
Returns
a boolean, true for sucess, false for failure

Definition at line 73 of file show.cpp.

bool Show::sortAscending ( )
private

Sorts the seasons in ascending order.

Returns
a boolean, true for sucess, false for failure

Definition at line 124 of file show.cpp.

Here is the caller graph for this function:

Member Data Documentation

int Show::index
private

The show name's index.

Definition at line 53 of file show.hpp.

int Show::numEpisodes
private

The number of episodes for *this show.

Definition at line 56 of file show.hpp.

int Show::numSeasons
private

The number of seasons for *this show.

Definition at line 55 of file show.hpp.

vector<Season> Show::seasons

A vector that holds the Season objects.

Definition at line 48 of file show.hpp.

string Show::showname
private

The show's name.

Definition at line 54 of file show.hpp.


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