Fawkes API
Fawkes Development Version
|
Iterator for YAML config trees. More...
#include <>>
Public Member Functions | |
YamlValueIterator () | |
Constructor. More... | |
YamlValueIterator (std::map< std::string, YamlConfigurationNode *> &nodes) | |
Initializing constructor. More... | |
virtual bool | next () |
Check if there is another element and advance to this if possible. More... | |
virtual bool | valid () const |
Check if the current element is valid. More... | |
virtual const char * | path () const |
Path of value. More... | |
virtual const char * | type () const |
Type of value. More... | |
virtual bool | is_float () const |
Check if current value is a float. More... | |
virtual bool | is_uint () const |
Check if current value is a unsigned int. More... | |
virtual bool | is_int () const |
Check if current value is a int. More... | |
virtual bool | is_bool () const |
Check if current value is a bool. More... | |
virtual bool | is_string () const |
Check if current value is a string. More... | |
virtual bool | is_list () const |
Check if a value is a list. More... | |
virtual size_t | get_list_size () const |
Get number of elements in list value. More... | |
virtual float | get_float () const |
Get float value. More... | |
virtual unsigned int | get_uint () const |
Get unsigned int value. More... | |
virtual int | get_int () const |
Get int value. More... | |
virtual bool | get_bool () const |
Get bool value. More... | |
virtual std::string | get_string () const |
Get string value. More... | |
virtual std::vector< float > | get_floats () const |
Get list of values from configuration which is of type float. More... | |
virtual std::vector< unsigned int > | get_uints () const |
Get list of values from configuration which is of type unsigned int. More... | |
virtual std::vector< int > | get_ints () const |
Get list of values from configuration which is of type int. More... | |
virtual std::vector< bool > | get_bools () const |
Get list of values from configuration which is of type bool. More... | |
virtual std::vector< std::string > | get_strings () const |
Get list of values from configuration which is of type string. More... | |
virtual std::string | get_as_string () const |
Get value as string. More... | |
virtual std::string | get_comment () const |
Get comment of value. More... | |
virtual bool | is_default () const |
Check if current value was read from the default config. More... | |
![]() | |
virtual | ~ValueIterator () |
Virtual emptry destructor. More... | |
Iterator for YAML config trees.
This iterator is used by YamlConfiguration as a result value for queries. Its use is opaque and knowledge of Configuration::ValueIterator will suffice for interaction.
fawkes::YamlConfiguration::YamlValueIterator::YamlValueIterator | ( | ) |
Constructor.
Creates an iterator representing the invalid iterator.
Definition at line 72 of file yaml.cpp.
Referenced by fawkes::YamlConfiguration::get_value(), fawkes::YamlConfiguration::iterator(), and fawkes::YamlConfiguration::search().
fawkes::YamlConfiguration::YamlValueIterator::YamlValueIterator | ( | std::map< std::string, YamlConfigurationNode *> & | nodes | ) |
|
virtual |
|
virtual |
|
virtual |
Get list of values from configuration which is of type bool.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
|
virtual |
|
virtual |
Get list of values from configuration which is of type float.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
|
virtual |
Get list of values from configuration which is of type int.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
Get number of elements in list value.
Exception | thrown if the element is not a list. |
Implements fawkes::Configuration::ValueIterator.
|
virtual |
|
virtual |
Get list of values from configuration which is of type string.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
|
virtual |
Get list of values from configuration which is of type unsigned int.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
Check if current value is a bool.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
Check if current value was read from the default config.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
Check if current value is a float.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
Check if current value is a int.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
Check if a value is a list.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
Check if current value is a string.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
Check if current value is a unsigned int.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
Check if there is another element and advance to this if possible.
This advances to the next element, if there is one.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
Path of value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 107 of file yaml.cpp.
Referenced by fawkes::abs_cfg_path(), fawkes::YamlConfiguration::get_bool(), fawkes::YamlConfiguration::get_bools(), fawkes::YamlConfiguration::get_float(), fawkes::YamlConfiguration::get_floats(), fawkes::YamlConfiguration::get_int(), fawkes::YamlConfiguration::get_ints(), fawkes::YamlConfiguration::get_string(), fawkes::YamlConfiguration::get_strings(), fawkes::YamlConfiguration::get_uint(), fawkes::YamlConfiguration::get_uints(), fawkes::YamlConfiguration::get_value(), fawkes::YamlConfiguration::is_bool(), fawkes::YamlConfiguration::is_float(), fawkes::YamlConfiguration::is_int(), fawkes::YamlConfiguration::is_string(), fawkes::YamlConfiguration::load(), and fawkes::YamlConfiguration::search().
|
virtual |
Type of value.
Implements fawkes::Configuration::ValueIterator.
|
virtual |
Check if the current element is valid.
This is much like the classic end element for iterators. If the iterator is invalid there all subsequent calls to next() shall fail.
Implements fawkes::Configuration::ValueIterator.