A general game setting or variable (like fraglimit). More...
#include <serverstructs.h>
Public Member Functions | |
GameCVar (const QString &name, const QString &command) | |
GameCVar (const QString &name, const QString &command, const QVariant &value) | |
GameCVar (const GameCVar &other) | |
const QString & | command () const |
Command-line argument that sets this GameCVar. More... | |
bool | hasValue () const |
Is any value assigned to this GameCVar. More... | |
bool | isValid () const |
'Null' objects are invalid. More... | |
const QString & | name () const |
Nice name to display to user in Create Game dialog and in other widgets. More... | |
GameCVar & | operator= (const GameCVar &other) |
void | setValue (const QVariant &value) |
Assign value() to this GameCVar. More... | |
const QVariant & | value () const |
Passed as the second argument, following command(). More... | |
bool | valueBool () const |
int | valueInt () const |
QString | valueString () const |
A general game setting or variable (like fraglimit).
This object is safe to copy.
Definition at line 257 of file serverstructs.h.
const QString & GameCVar::command | ( | ) | const |
Command-line argument that sets this GameCVar.
When launching a game, this command() is passed as one of the command line arguments and the value() is what follows directly after.
Definition at line 297 of file serverstructs.cpp.
bool GameCVar::hasValue | ( | ) | const |
Is any value assigned to this GameCVar.
Definition at line 302 of file serverstructs.cpp.
bool GameCVar::isValid | ( | ) | const |
'Null' objects are invalid.
Definition at line 307 of file serverstructs.cpp.
const QString & GameCVar::name | ( | ) | const |
Nice name to display to user in Create Game dialog and in other widgets.
Definition at line 312 of file serverstructs.cpp.
void GameCVar::setValue | ( | const QVariant & | value | ) |
Assign value() to this GameCVar.
Definition at line 317 of file serverstructs.cpp.
const QVariant & GameCVar::value | ( | ) | const |
Passed as the second argument, following command().
Definition at line 322 of file serverstructs.cpp.