Player12
An open source football management simulator
Loading...
Searching...
No Matches
GameDate Class Reference

Singleton class that manages the current date in the game. More...

#include <gamedate.h>

Public Member Functions

GameDateValue getCurrent () const
 Gets the current date.
 
void setCurrent (GameDateValue d)
 Sets the current date.
 
void nextDay ()
 Advances the current date by one day.
 
void nextWeek ()
 Advances the current date by one week.
 
void nextMonth ()
 Advances the current date by one month.
 

Static Public Member Functions

static GameDate & instance ()
 Gets the singleton instance.
 

Private Member Functions

 GameDate ()
 
 GameDate (const GameDate &)=delete
 
GameDate & operator= (const GameDate &)=delete
 

Private Attributes

GameDateValue current
 

Detailed Description

Singleton class that manages the current date in the game.

Constructor & Destructor Documentation

◆ GameDate() [1/2]

GameDate::GameDate ( )
inlineprivate

◆ GameDate() [2/2]

GameDate::GameDate ( const GameDate &  )
privatedelete

Member Function Documentation

◆ getCurrent()

GameDateValue GameDate::getCurrent ( ) const
inline

Gets the current date.

Returns
The current date.

◆ instance()

static GameDate & GameDate::instance ( )
inlinestatic

Gets the singleton instance.

Returns
Reference to the GameDate instance.

◆ nextDay()

void GameDate::nextDay ( )
inline

Advances the current date by one day.

◆ nextMonth()

void GameDate::nextMonth ( )
inline

Advances the current date by one month.

◆ nextWeek()

void GameDate::nextWeek ( )
inline

Advances the current date by one week.

◆ operator=()

GameDate & GameDate::operator= ( const GameDate &  )
privatedelete

◆ setCurrent()

void GameDate::setCurrent ( GameDateValue  d)
inline

Sets the current date.

Parameters
dThe date to set.

Member Data Documentation

◆ current

GameDateValue GameDate::current
private

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