Fawkes API Fawkes Development Version
|
Network configuration value iterator. More...
#include <>>
Public Member Functions | |
virtual | ~NetConfValueIterator () |
Destructor. 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 bool | is_default () const |
Check if current value was read from the default config. 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 | ~ValueIterator () |
Virtual emptry destructor. More... | |
virtual bool | next ()=0 |
Check if there is another element and advance to this if possible. More... | |
virtual bool | valid () const =0 |
Check if the current element is valid. More... | |
virtual const char * | path () const =0 |
Path of value. More... | |
virtual const char * | type () const =0 |
Type of value. More... | |
virtual bool | is_float () const =0 |
Check if current value is a float. More... | |
virtual bool | is_uint () const =0 |
Check if current value is a unsigned int. More... | |
virtual bool | is_int () const =0 |
Check if current value is a int. More... | |
virtual bool | is_bool () const =0 |
Check if current value is a bool. More... | |
virtual bool | is_string () const =0 |
Check if current value is a string. More... | |
virtual bool | is_list () const =0 |
Check if a value is a list. More... | |
virtual size_t | get_list_size () const =0 |
Get number of elements in list value. More... | |
virtual float | get_float () const =0 |
Get float value. More... | |
virtual unsigned int | get_uint () const =0 |
Get unsigned int value. More... | |
virtual int | get_int () const =0 |
Get int value. More... | |
virtual bool | get_bool () const =0 |
Get bool value. More... | |
virtual std::string | get_string () const =0 |
Get string value. More... | |
virtual std::vector< float > | get_floats () const =0 |
Get list of values from configuration which is of type float. More... | |
virtual std::vector< unsigned int > | get_uints () const =0 |
Get list of values from configuration which is of type unsigned int. More... | |
virtual std::vector< int > | get_ints () const =0 |
Get list of values from configuration which is of type int. More... | |
virtual std::vector< bool > | get_bools () const =0 |
Get list of values from configuration which is of type bool. More... | |
virtual std::vector< std::string > | get_strings () const =0 |
Get list of values from configuration which is of type string. More... | |
virtual std::string | get_as_string () const =0 |
Get value as string. More... | |
virtual std::string | get_comment () const =0 |
Get comment of value. More... | |
virtual bool | is_default () const =0 |
Check if current value was read from the default config. More... | |
Protected Member Functions | |
NetConfValueIterator (Configuration::ValueIterator *i) | |
Constructor. More... | |
NetConfValueIterator (FawkesNetworkMessage *m) | |
Constructor. More... | |
NetConfValueIterator () | |
Constructor. More... | |
|
protected |
Constructor.
i | internal other iterator, for instance form local mirrored database. |
Definition at line 1401 of file netconf.cpp.
|
protected |
Constructor.
Internally holds a message. Only this one value is accessible.
m | message |
Definition at line 1426 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::cid(), fawkes::FawkesNetworkMessage::msgid(), fawkes::config_descriptor_t::path, fawkes::FawkesNetworkMessage::payload(), fawkes::FawkesNetworkMessage::payload_size(), and fawkes::RefCount::ref().
|
protected |
|
virtual |
|
virtual |
Get value as string.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1901 of file netconf.cpp.
References fawkes::NetworkConfiguration::get_bool(), fawkes::NetworkConfiguration::get_float(), fawkes::NetworkConfiguration::get_int(), fawkes::NetworkConfiguration::get_string(), fawkes::NetworkConfiguration::get_uint(), fawkes::FawkesNetworkMessage::msgid(), and fawkes::StringConversions::to_string().
|
virtual |
Get bool value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1699 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), fawkes::config_descriptor_t::num_values, and fawkes::FawkesNetworkMessage::payload().
|
virtual |
Get list of values from configuration which is of type bool.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1838 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), and fawkes::config_descriptor_t::num_values.
|
virtual |
Get comment of value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1927 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), and fawkes::config_comment_msg_t::s.
|
virtual |
Get float value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1636 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), fawkes::config_descriptor_t::num_values, and fawkes::FawkesNetworkMessage::payload().
|
virtual |
Get list of values from configuration which is of type float.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1748 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), and fawkes::config_descriptor_t::num_values.
|
virtual |
Get int value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1678 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), fawkes::config_descriptor_t::num_values, and fawkes::FawkesNetworkMessage::payload().
|
virtual |
Get list of values from configuration which is of type int.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1808 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), and fawkes::config_descriptor_t::num_values.
|
virtual |
Get number of elements in list value.
Exception | thrown if the element is not a list. |
Implements fawkes::Configuration::ValueIterator.
Definition at line 1595 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgge(), and fawkes::config_descriptor_t::num_values.
|
virtual |
Get string value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1720 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), fawkes::config_descriptor_t::num_values, fawkes::FawkesNetworkMessage::payload(), and fawkes::config_string_value_t::s_length.
|
virtual |
Get list of values from configuration which is of type string.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1868 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), fawkes::config_descriptor_t::num_values, and fawkes::config_string_value_t::s_length.
|
virtual |
Get unsigned int value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1657 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), fawkes::config_descriptor_t::num_values, and fawkes::FawkesNetworkMessage::payload().
|
virtual |
Get list of values from configuration which is of type unsigned int.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1778 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), and fawkes::config_descriptor_t::num_values.
|
virtual |
Check if current value is a bool.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1555 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid().
|
virtual |
Check if current value was read from the default config.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1609 of file netconf.cpp.
References fawkes::config_descriptor_t::is_default, fawkes::FawkesNetworkMessage::msgge(), and fawkes::FawkesNetworkMessage::msgid().
|
virtual |
Check if current value is a float.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1516 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid().
|
virtual |
Check if current value is a int.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1542 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid().
|
virtual |
Check if a value is a list.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1581 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgge(), and fawkes::config_descriptor_t::num_values.
|
virtual |
Check if current value is a string.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1568 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid().
|
virtual |
Check if current value is a unsigned int.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1529 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid().
|
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.
Definition at line 1460 of file netconf.cpp.
|
virtual |
Path of value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1481 of file netconf.cpp.
|
virtual |
Type of value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1495 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid().
|
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.
Definition at line 1475 of file netconf.cpp.