Wrapper for LibYAML scalar nodes.
More...
#include <ScalarNode.h>
Wrapper for LibYAML scalar nodes.
HoverRace::Util::yaml::ScalarNode::ScalarNode |
( |
yaml_document_t * |
doc, |
|
|
yaml_node_t * |
node |
|
) |
| |
Constructor.
- Parameters
-
doc | The containing document. |
node | The underlying LibYAML node (may not be NULL). |
HoverRace::Util::yaml::ScalarNode::~ScalarNode |
( |
| ) |
|
|
virtual |
bool HoverRace::Util::yaml::ScalarNode::AsBool |
( |
bool |
def | ) |
const |
Convert this scalar to a boolean value.
- Parameters
-
def | The default value if the value cannot be converted to a boolean. |
- Returns
- The converted value.
double HoverRace::Util::yaml::ScalarNode::AsDouble |
( |
double |
def, |
|
|
double |
min, |
|
|
double |
max |
|
) |
| const |
Convert this scalar to a double floating-point value.
- Parameters
-
def | The default value if the value cannot be converted to a double. |
min | Minimum clamp value. |
max | Maximum clamp value. |
- Returns
- The converted value.
float HoverRace::Util::yaml::ScalarNode::AsFloat |
( |
float |
def, |
|
|
float |
min, |
|
|
float |
max |
|
) |
| const |
Convert this scalar to a floating-point value.
- Parameters
-
def | The default value if the value cannot be converted to a float. |
min | Minimum clamp value. |
max | Maximum clamp value. |
- Returns
- The converted value.
int HoverRace::Util::yaml::ScalarNode::AsInt |
( |
int |
def, |
|
|
int |
min = INT_MIN , |
|
|
int |
max = INT_MAX |
|
) |
| const |
Convert this scalar to an integer value.
- Parameters
-
def | The default value if the value cannot be converted to a integer. |
min | (Optional) Minimum clamp value. |
max | (Optinoal) Maximum clamp value. |
- Returns
- The converted value.
OS::path_t HoverRace::Util::yaml::ScalarNode::AsPath |
( |
| ) |
const |
Convert this scalar to a path.
- Returns
- The path.
std::string HoverRace::Util::yaml::ScalarNode::AsString |
( |
| ) |
const |
Returns the string value.
- Returns
- The value.
char* HoverRace::Util::yaml::ScalarNode::value |
|
private |
The documentation for this class was generated from the following files: