Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
Core class that represents a list of parameters. More...
Public Types | |
using | Destructor = void(*)(void *value) |
Public Member Functions | |
ParameterList (const ParameterList &list) | |
Constructs a ParameterList object by copy. | |
ParameterList (ParameterList &&)=default | |
~ParameterList () | |
Destructs the object and clears. | |
void | Clear () |
Clears all the parameters. | |
void | ForEach (const std::function< bool(const ParameterList &list, const String &name)> &callback) |
Iterates over every value of the parameter list. More... | |
void | ForEach (const std::function< void(const ParameterList &list, const String &name)> &callback) const |
Iterates over every value of the parameter list. More... | |
bool | GetBooleanParameter (const String &name, bool *value) const |
Gets a parameter as a boolean. More... | |
bool | GetColorParameter (const String &name, Color *value) const |
Gets a parameter as a color. More... | |
bool | GetDoubleParameter (const String &name, double *value) const |
Gets a parameter as a double. More... | |
bool | GetIntegerParameter (const String &name, long long *value) const |
Gets a parameter as an integer. More... | |
bool | GetParameterType (const String &name, ParameterType *type) const |
Gets a parameter type. More... | |
bool | GetPointerParameter (const String &name, void **value) const |
Gets a parameter as a pointer. More... | |
bool | GetStringParameter (const String &name, String *value) const |
Gets a parameter as a string. More... | |
bool | GetUserdataParameter (const String &name, void **value) const |
Gets a parameter as an userdata. More... | |
bool | HasParameter (const String &name) const |
Checks whether the parameter list contains a parameter named name More... | |
void | RemoveParameter (const String &name) |
Removes the parameter named name More... | |
void | SetParameter (const String &name) |
Sets a null parameter named name More... | |
void | SetParameter (const String &name, const Color &value) |
Sets a color parameter named name More... | |
void | SetParameter (const String &name, const String &value) |
Sets a string parameter named name More... | |
void | SetParameter (const String &name, const char *value) |
Sets a string parameter named name More... | |
void | SetParameter (const String &name, bool value) |
Sets a boolean parameter named name More... | |
void | SetParameter (const String &name, double value) |
Sets a double parameter named name More... | |
void | SetParameter (const String &name, long long value) |
Sets an integer parameter named name More... | |
void | SetParameter (const String &name, void *value) |
Sets a pointer parameter named name More... | |
void | SetParameter (const String &name, void *value, Destructor destructor) |
Sets a userdata parameter named name More... | |
String | ToString () const |
Gives a string representation. More... | |
ParameterList & | operator= (const ParameterList &list) |
Copies the content of the other parameter list to this. More... | |
ParameterList & | operator= (ParameterList &&)=default |
Core class that represents a list of parameters.
|
inline |
Iterates over every value of the parameter list.
callback | Callback function called with every parameter contained in the list, which can return true to remove the key (or false to keep it) |
|
inline |
Iterates over every value of the parameter list.
callback | Callback function called with every parameter contained in the list |
bool Nz::ParameterList::GetBooleanParameter | ( | const String & | name, |
bool * | value | ||
) | const |
Gets a parameter as a boolean.
name | Name of the parameter |
value | Pointer to a boolean to hold the retrieved value |
Gets a parameter as a color.
name | Name of the parameter |
value | Pointer to a color to hold the retrieved value |
bool Nz::ParameterList::GetDoubleParameter | ( | const String & | name, |
double * | value | ||
) | const |
Gets a parameter as a double.
name | Name of the parameter |
value | Pointer to a double to hold the retrieved value |
bool Nz::ParameterList::GetIntegerParameter | ( | const String & | name, |
long long * | value | ||
) | const |
Gets a parameter as an integer.
name | Name of the parameter |
value | Pointer to an integer to hold the retrieved value |
bool Nz::ParameterList::GetParameterType | ( | const String & | name, |
ParameterType * | type | ||
) | const |
Gets a parameter type.
name | Name of the variable |
type | Pointer to a variable to hold the result |
bool Nz::ParameterList::GetPointerParameter | ( | const String & | name, |
void ** | value | ||
) | const |
Gets a parameter as a pointer.
name | Name of the parameter |
value | Pointer to a pointer to hold the retrieved value |
Gets a parameter as a string.
name | Name of the parameter |
value | Pointer to a pointer to hold the retrieved value |
bool Nz::ParameterList::GetUserdataParameter | ( | const String & | name, |
void ** | value | ||
) | const |
Gets a parameter as an userdata.
name | Name of the parameter |
value | Pointer to a pointer to hold the retrieved value |
bool Nz::ParameterList::HasParameter | ( | const String & | name | ) | const |
Checks whether the parameter list contains a parameter named name
name | Name of the parameter |
ParameterList & Nz::ParameterList::operator= | ( | const ParameterList & | list | ) |
Copies the content of the other parameter list to this.
list | List to assign |
void Nz::ParameterList::RemoveParameter | ( | const String & | name | ) |
Removes the parameter named name
Search for a parameter named name
and remove it from the parameter list, freeing up its memory Nothing is done if the parameter is not present in the parameter list
name | Name of the parameter |
void Nz::ParameterList::SetParameter | ( | const String & | name | ) |
Sets a null parameter named name
If a parameter already exists with that name, it is destroyed and replaced by this call
name | Name of the parameter |
Sets a color parameter named name
If a parameter already exists with that name, it is destroyed and replaced by this call
name | Name of the parameter |
value | The color value |
Sets a string parameter named name
If a parameter already exists with that name, it is destroyed and replaced by this call
name | Name of the parameter |
value | The string value |
void Nz::ParameterList::SetParameter | ( | const String & | name, |
const char * | value | ||
) |
Sets a string parameter named name
If a parameter already exists with that name, it is destroyed and replaced by this call
name | Name of the parameter |
value | The string value |
void Nz::ParameterList::SetParameter | ( | const String & | name, |
bool | value | ||
) |
Sets a boolean parameter named name
If a parameter already exists with that name, it is destroyed and replaced by this call
name | Name of the parameter |
value | The boolean value |
void Nz::ParameterList::SetParameter | ( | const String & | name, |
double | value | ||
) |
Sets a double parameter named name
If a parameter already exists with that name, it is destroyed and replaced by this call
name | Name of the parameter |
value | The double value |
void Nz::ParameterList::SetParameter | ( | const String & | name, |
long long | value | ||
) |
Sets an integer parameter named name
If a parameter already exists with that name, it is destroyed and replaced by this call
name | Name of the parameter |
value | The integer value |
void Nz::ParameterList::SetParameter | ( | const String & | name, |
void * | value | ||
) |
Sets a pointer parameter named name
If a parameter already exists with that name, it is destroyed and replaced by this call
name | Name of the parameter |
value | The pointer value |
void Nz::ParameterList::SetParameter | ( | const String & | name, |
void * | value, | ||
Destructor | destructor | ||
) |
Sets a userdata parameter named name
If a parameter already exists with that name, it is destroyed and replaced by this call
name | Name of the parameter |
value | The pointer value |
destructor | The destructor function to be called upon parameter suppression |
String Nz::ParameterList::ToString | ( | ) | const |
Gives a string representation.