A parameter within a structured data element.
More...
#include <Param.hpp>
|
| Param (struct stumpless_param *param) |
| Creates a new Param based on a stumpless_param struct.
|
|
| Param (const char *name, const char *value) |
| Creates a new Param with the given name and value.
|
|
| Param (const Param ¶m) |
| Creates a Param as a copy of another Param.
|
|
| ~Param (void) |
| Destroys this parameter and releases all memory allocated for it.
|
|
const char * | GetName (void) |
| The name of this Param.
|
|
const char * | GetValue (void) |
| The value of this Param.
|
|
Param & | SetName (const char *name) |
| Set the name of this Param.
|
|
Param & | SetValue (const char *value) |
| Set the value of this Param.
|
|
const char * | ToString (void) |
| Gives a string representation of this Param.
|
|
A parameter within a structured data element.
◆ Param() [1/3]
stumpless::Param::Param |
( |
struct stumpless_param * | param | ) |
|
Creates a new Param based on a stumpless_param struct.
The struct is copied to create this Param, and therefore can be freed later without affecting the new instance.
- Parameters
-
param | The struct to base this param on. |
◆ Param() [2/3]
stumpless::Param::Param |
( |
const char * | name, |
|
|
const char * | value ) |
Creates a new Param with the given name and value.
- Parameters
-
name | The name of the parameter. |
value | The value of the parameter |
◆ Param() [3/3]
stumpless::Param::Param |
( |
const Param & | param | ) |
|
Creates a Param as a copy of another Param.
Available since release v1.6.0.
- Parameters
-
◆ ~Param()
stumpless::Param::~Param |
( |
void | | ) |
|
Destroys this parameter and releases all memory allocated for it.
◆ GetName()
const char * stumpless::Param::GetName |
( |
void | | ) |
|
The name of this Param.
The returned character buffer must be freed by the caller when it is no longer needed to avoid memory leaks. In versions prior to v2.0.0, the returned pointer was to the internal buffer was not to be modified by the caller. This behavior changed in v2.0.0 in order to avoid thread safety issues. Available since release v1.6.0.
- Returns
- The name of this Param.
◆ GetValue()
const char * stumpless::Param::GetValue |
( |
void | | ) |
|
The value of this Param.
The returned character buffer must be freed by the caller when it is no longer needed to avoid memory leaks. In versions prior to v2.0.0, the returned pointer was to the internal buffer was not to be modified by the caller. This behavior changed in v2.0.0 in order to avoid thread safety issues. Available since release v1.6.0.
- Returns
- The value of this Param.
◆ SetName()
Param & stumpless::Param::SetName |
( |
const char * | name | ) |
|
Set the name of this Param.
Available since release v1.6.0.
- Parameters
-
- Returns
- The modified Param.
◆ SetValue()
Param & stumpless::Param::SetValue |
( |
const char * | value | ) |
|
Set the value of this Param.
Available since release v1.6.0.
- Parameters
-
- Returns
- The modified Param.
◆ ToString()
const char * stumpless::Param::ToString |
( |
void | | ) |
|
Gives a string representation of this Param.
This is not intended for parsing or formatted output, but simply gives a human-readable form. The returned character buffer must be freed by the caller when it is no longer needed to avoid memory leaks. Available since release v2.0.0.
- Returns
- The name and value of this Param in a human-readable string.
◆ equivalent
struct stumpless_param* stumpless::Param::equivalent |
The documentation for this class was generated from the following file: