Fawkes API
Fawkes Development Version
|
Network configuration value iterator. More...
#include <>>
Public Member Functions | |
virtual | ~NetConfValueIterator () |
Destructor. | |
virtual bool | next () |
Check if there is another element and advance to this if possible. | |
virtual bool | valid () const |
Check if the current element is valid. | |
virtual const char * | path () const |
Path of value. | |
virtual const char * | type () const |
Type of value. | |
virtual bool | is_float () const |
Check if current value is a float. | |
virtual bool | is_uint () const |
Check if current value is a unsigned int. | |
virtual bool | is_int () const |
Check if current value is a int. | |
virtual bool | is_bool () const |
Check if current value is a bool. | |
virtual bool | is_string () const |
Check if current value is a string. | |
virtual bool | is_default () const |
Check if current value was read from the default config. | |
virtual float | get_float () const |
Get float value. | |
virtual unsigned int | get_uint () const |
Get unsigned int value. | |
virtual int | get_int () const |
Get int value. | |
virtual bool | get_bool () const |
Get bool value. | |
virtual std::string | get_string () const |
Get string value. | |
virtual std::string | get_as_string () const |
Get value as string. | |
virtual std::string | get_comment () const |
Get comment of value. | |
Protected Member Functions | |
NetConfValueIterator (Configuration::ValueIterator *i) | |
Constructor. | |
NetConfValueIterator (FawkesNetworkMessage *m) | |
Constructor. | |
NetConfValueIterator () | |
Constructor. | |
Friends | |
class | NetworkConfiguration |
Network configuration value iterator.
fawkes::NetworkConfiguration::NetConfValueIterator::NetConfValueIterator | ( | Configuration::ValueIterator * | i | ) | [protected] |
Constructor.
i | internal other iterator, for instance form local mirrored database. |
Definition at line 1396 of file netconf.cpp.
fawkes::NetworkConfiguration::NetConfValueIterator::NetConfValueIterator | ( | FawkesNetworkMessage * | m | ) | [protected] |
Constructor.
Internally holds a message. Only this one value is accessible.
m | message |
Definition at line 1423 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::cid(), fawkes::FawkesNetworkMessage::msgid(), fawkes::FawkesNetworkMessage::payload_size(), fawkes::RefCount::ref(), fawkes::FawkesNetworkMessage::payload(), and fawkes::config_descriptor_t::path.
fawkes::NetworkConfiguration::NetConfValueIterator::NetConfValueIterator | ( | ) | [protected] |
fawkes::NetworkConfiguration::NetConfValueIterator::~NetConfValueIterator | ( | ) | [virtual] |
std::string fawkes::NetworkConfiguration::NetConfValueIterator::get_as_string | ( | ) | const [virtual] |
Get value as string.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1730 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid(), fawkes::FawkesNetworkMessage::msgge(), fawkes::config_string_value_msg_t::s, fawkes::FawkesNetworkMessage::msg(), fawkes::config_bool_value_msg_t::b, fawkes::StringConversions::to_string(), fawkes::config_int_value_msg_t::i, fawkes::config_uint_value_msg_t::u, and fawkes::config_float_value_msg_t::f.
bool fawkes::NetworkConfiguration::NetConfValueIterator::get_bool | ( | ) | const [virtual] |
Get bool value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1691 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid(), fawkes::FawkesNetworkMessage::msg(), and fawkes::config_bool_value_msg_t::b.
std::string fawkes::NetworkConfiguration::NetConfValueIterator::get_comment | ( | ) | const [virtual] |
Get comment of value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1762 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid(), fawkes::FawkesNetworkMessage::msgge(), and fawkes::config_comment_msg_t::s.
float fawkes::NetworkConfiguration::NetConfValueIterator::get_float | ( | ) | const [virtual] |
Get float value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1634 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid(), fawkes::FawkesNetworkMessage::msg(), and fawkes::config_float_value_msg_t::f.
int fawkes::NetworkConfiguration::NetConfValueIterator::get_int | ( | ) | const [virtual] |
Get int value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1672 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid(), fawkes::FawkesNetworkMessage::msg(), and fawkes::config_int_value_msg_t::i.
std::string fawkes::NetworkConfiguration::NetConfValueIterator::get_string | ( | ) | const [virtual] |
Get string value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1710 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid(), fawkes::FawkesNetworkMessage::msgge(), and fawkes::config_string_value_msg_t::s.
unsigned int fawkes::NetworkConfiguration::NetConfValueIterator::get_uint | ( | ) | const [virtual] |
Get unsigned int value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1653 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid(), fawkes::FawkesNetworkMessage::msg(), and fawkes::config_uint_value_msg_t::u.
bool fawkes::NetworkConfiguration::NetConfValueIterator::is_bool | ( | ) | const [virtual] |
Check if current value is a bool.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1561 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid().
bool fawkes::NetworkConfiguration::NetConfValueIterator::is_default | ( | ) | const [virtual] |
Check if current value was read from the default config.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1589 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid(), fawkes::FawkesNetworkMessage::msg(), fawkes::config_float_value_msg_t::cp, fawkes::config_descriptor_t::is_default, fawkes::config_uint_value_msg_t::cp, fawkes::config_int_value_msg_t::cp, fawkes::config_bool_value_msg_t::cp, fawkes::FawkesNetworkMessage::msgge(), and fawkes::config_string_value_msg_t::cp.
bool fawkes::NetworkConfiguration::NetConfValueIterator::is_float | ( | ) | const [virtual] |
Check if current value is a float.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1519 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid().
bool fawkes::NetworkConfiguration::NetConfValueIterator::is_int | ( | ) | const [virtual] |
Check if current value is a int.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1547 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid().
bool fawkes::NetworkConfiguration::NetConfValueIterator::is_string | ( | ) | const [virtual] |
Check if current value is a string.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1575 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid().
bool fawkes::NetworkConfiguration::NetConfValueIterator::is_uint | ( | ) | const [virtual] |
Check if current value is a unsigned int.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1533 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid().
bool fawkes::NetworkConfiguration::NetConfValueIterator::next | ( | ) | [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 1458 of file netconf.cpp.
const char * fawkes::NetworkConfiguration::NetConfValueIterator::path | ( | ) | const [virtual] |
Path of value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1481 of file netconf.cpp.
const char * fawkes::NetworkConfiguration::NetConfValueIterator::type | ( | ) | const [virtual] |
Type of value.
Implements fawkes::Configuration::ValueIterator.
Definition at line 1496 of file netconf.cpp.
References fawkes::FawkesNetworkMessage::msgid().
bool fawkes::NetworkConfiguration::NetConfValueIterator::valid | ( | ) | const [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 1474 of file netconf.cpp.