GameInformation Class Reference
#include <gameinformation.h>
List of all members.
Detailed Description
This holds game specific state information for a player.
- Author:
- John Schneiderman
Constructor & Destructor Documentation
GameInformation::GameInformation |
( |
|
) |
|
GameInformation::~GameInformation |
( |
|
) |
|
Member Function Documentation
void GameInformation::add |
( |
const QString & |
key, |
|
|
const QString & |
value | |
|
) |
| | |
Adds a key-value pair into the game state information. If the key is already present, then the value is updated.
- Parameters:
-
| key | is the key for the game state information, generally a description of the value. |
| value | is the information to store for the game state information. |
- Exceptions:
-
void GameInformation::add |
( |
const QString & |
key, |
|
|
double |
value | |
|
) |
| | |
Adds a key-value pair into the game state information. If the key is already present, then the value is updated.
- Parameters:
-
| key | is the key for the game state information, generally a description of the value. |
| value | is the information to store for the game state information. |
- Exceptions:
-
void GameInformation::add |
( |
const QString & |
key, |
|
|
int |
value | |
|
) |
| | |
Adds a key-value pair into the game state information. If the key is already present, then the value is updated.
- Parameters:
-
| key | is the key for the game state information, generally a description of the value. |
| value | is the information to store for the game state information. |
- Exceptions:
-
void GameInformation::clear |
( |
|
) |
|
Clears the contents of the Game Information.
QString GameInformation::value |
( |
const QString & |
key |
) |
const |
Retrieves the value for a specific key.
- Parameters:
-
| key | is the key for the game state value we want to know. |
- Returns:
- the value found for the key, if the key is not found an empty string is returned.
Friends And Related Function Documentation
QTextStream& operator<< |
( |
QTextStream & |
out, |
|
|
const GameInformation & |
gameInformation | |
|
) |
| | [friend] |
Stream insertion operator.
- Parameters:
-
| out | is the stream to get the game information from. |
| gameInformation | is the game information object to put the information into. |
- Returns:
- out.
ostream& operator<< |
( |
ostream & |
out, |
|
|
const GameInformation & |
gameInformation | |
|
) |
| | [friend] |
Stream insertion operator.
- Parameters:
-
| out | is the stream to get the game information from. |
| gameInformation | is the game information object to put the information into. |
- Returns:
- out.
QTextStream& operator>> |
( |
QTextStream & |
in, |
|
|
GameInformation & |
gameInformation | |
|
) |
| | [friend] |
Stream extraction operator.
- Parameters:
-
| in | is the stream to put the game information into. |
| gameInformation | is the game information object to get the information from. |
- Returns:
- in.
The documentation for this class was generated from the following files:
- gamebase/gameinformation.h
- gamebase/gameinformation.cpp