Fawkes API  Fawkes Development Version
fawkes::NetworkConfiguration::NetConfValueIterator Class Reference

#include <>>

Inheritance diagram for fawkes::NetworkConfiguration::NetConfValueIterator:

Public Member Functions

virtual ~NetConfValueIterator ()
 Destructor. More...
 
virtual bool next ()
 
virtual bool valid () const
 
virtual const char * path () const
 
virtual const char * type () const
 
virtual bool is_float () const
 
virtual bool is_uint () const
 
virtual bool is_int () const
 
virtual bool is_bool () const
 
virtual bool is_string () const
 
virtual bool is_list () const
 
virtual size_t get_list_size () const
 
virtual bool is_default () const
 
virtual float get_float () const
 
virtual unsigned int get_uint () const
 
virtual int get_int () const
 
virtual bool get_bool () const
 
virtual std::string get_string () const
 
virtual std::vector< float > get_floats () const
 
virtual std::vector< unsigned int > get_uints () const
 
virtual std::vector< int > get_ints () const
 
virtual std::vector< bool > get_bools () const
 
virtual std::vector< std::string > get_strings () const
 
virtual std::string get_as_string () const
 
virtual std::string get_comment () const
 
- Public Member Functions inherited from fawkes::Configuration::ValueIterator
virtual ~ValueIterator ()
 

Protected Member Functions

 NetConfValueIterator (Configuration::ValueIterator *i)
 Constructor. More...
 
 NetConfValueIterator (FawkesNetworkMessage *m)
 Constructor. More...
 
 NetConfValueIterator ()
 Constructor. More...
 

Detailed Description

Network configuration value iterator.

Author
Tim Niemueller

Definition at line 126 of file netconf.h.

Constructor & Destructor Documentation

◆ NetConfValueIterator() [1/3]

fawkes::NetworkConfiguration::NetConfValueIterator::NetConfValueIterator ( Configuration::ValueIterator i)
protected

Constructor.

Parameters
iinternal other iterator, for instance form local mirrored database.

Definition at line 1400 of file netconf.cpp.

◆ NetConfValueIterator() [2/3]

fawkes::NetworkConfiguration::NetConfValueIterator::NetConfValueIterator ( FawkesNetworkMessage m)
protected

Constructor.

Internally holds a message. Only this one value is accessible.

Parameters
mmessage

Definition at line 1425 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().

◆ NetConfValueIterator() [3/3]

fawkes::NetworkConfiguration::NetConfValueIterator::NetConfValueIterator ( )
protected

Constructor.

Returns invalid iterator.

Definition at line 1412 of file netconf.cpp.

◆ ~NetConfValueIterator()

fawkes::NetworkConfiguration::NetConfValueIterator::~NetConfValueIterator ( )
virtual

Destructor.

Definition at line 1449 of file netconf.cpp.

References fawkes::RefCount::unref().

Member Function Documentation

◆ get_as_string()

◆ get_bool()

bool fawkes::NetworkConfiguration::NetConfValueIterator::get_bool ( ) const
virtual

◆ get_bools()

std::vector< bool > fawkes::NetworkConfiguration::NetConfValueIterator::get_bools ( ) const
virtual

Get list of values from configuration which is of type bool

Returns
value

Implements fawkes::Configuration::ValueIterator.

Definition at line 1837 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), and fawkes::config_descriptor_t::num_values.

◆ get_comment()

std::string fawkes::NetworkConfiguration::NetConfValueIterator::get_comment ( ) const
virtual

◆ get_float()

float fawkes::NetworkConfiguration::NetConfValueIterator::get_float ( ) const
virtual

◆ get_floats()

std::vector< float > fawkes::NetworkConfiguration::NetConfValueIterator::get_floats ( ) const
virtual

Get list of values from configuration which is of type float

Returns
value

Implements fawkes::Configuration::ValueIterator.

Definition at line 1747 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), and fawkes::config_descriptor_t::num_values.

◆ get_int()

int fawkes::NetworkConfiguration::NetConfValueIterator::get_int ( ) const
virtual

◆ get_ints()

std::vector< int > fawkes::NetworkConfiguration::NetConfValueIterator::get_ints ( ) const
virtual

Get list of values from configuration which is of type int

Returns
value

Implements fawkes::Configuration::ValueIterator.

Definition at line 1807 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), and fawkes::config_descriptor_t::num_values.

◆ get_list_size()

size_t fawkes::NetworkConfiguration::NetConfValueIterator::get_list_size ( ) const
virtual

Get number of elements in list value.

Returns
number of elements in list value
Exceptions
Exceptionthrown if the element is not a list.

Implements fawkes::Configuration::ValueIterator.

Definition at line 1594 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgge(), and fawkes::config_descriptor_t::num_values.

◆ get_string()

std::string fawkes::NetworkConfiguration::NetConfValueIterator::get_string ( ) const
virtual

◆ get_strings()

std::vector< std::string > fawkes::NetworkConfiguration::NetConfValueIterator::get_strings ( ) const
virtual

Get list of values from configuration which is of type string

Returns
value

Implements fawkes::Configuration::ValueIterator.

Definition at line 1867 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.

◆ get_uint()

unsigned int fawkes::NetworkConfiguration::NetConfValueIterator::get_uint ( ) const
virtual

◆ get_uints()

std::vector< unsigned int > fawkes::NetworkConfiguration::NetConfValueIterator::get_uints ( ) const
virtual

Get list of values from configuration which is of type unsigned int

Returns
value

Implements fawkes::Configuration::ValueIterator.

Definition at line 1777 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgge(), fawkes::FawkesNetworkMessage::msgid(), and fawkes::config_descriptor_t::num_values.

◆ is_bool()

bool fawkes::NetworkConfiguration::NetConfValueIterator::is_bool ( ) const
virtual

Check if current value is a bool.

Returns
true, if value is a bool, false otherwise

Implements fawkes::Configuration::ValueIterator.

Definition at line 1554 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgid().

◆ is_default()

bool fawkes::NetworkConfiguration::NetConfValueIterator::is_default ( ) const
virtual

Check if current value was read from the default config.

Returns
true, if value was read from the default config, false otherwise

Implements fawkes::Configuration::ValueIterator.

Definition at line 1608 of file netconf.cpp.

References fawkes::config_descriptor_t::is_default, fawkes::FawkesNetworkMessage::msgge(), and fawkes::FawkesNetworkMessage::msgid().

◆ is_float()

bool fawkes::NetworkConfiguration::NetConfValueIterator::is_float ( ) const
virtual

Check if current value is a float.

Returns
true, if value is a float, false otherwise

Implements fawkes::Configuration::ValueIterator.

Definition at line 1515 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgid().

◆ is_int()

bool fawkes::NetworkConfiguration::NetConfValueIterator::is_int ( ) const
virtual

Check if current value is a int.

Returns
true, if value is a int, false otherwise

Implements fawkes::Configuration::ValueIterator.

Definition at line 1541 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgid().

◆ is_list()

bool fawkes::NetworkConfiguration::NetConfValueIterator::is_list ( ) const
virtual

Check if a value is a list.

Returns
true if the value exists and is a list

Implements fawkes::Configuration::ValueIterator.

Definition at line 1580 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgge(), and fawkes::config_descriptor_t::num_values.

◆ is_string()

bool fawkes::NetworkConfiguration::NetConfValueIterator::is_string ( ) const
virtual

Check if current value is a string.

Returns
true, if value is a string, false otherwise

Implements fawkes::Configuration::ValueIterator.

Definition at line 1567 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgid().

◆ is_uint()

bool fawkes::NetworkConfiguration::NetConfValueIterator::is_uint ( ) const
virtual

Check if current value is a unsigned int.

Returns
true, if value is a unsigned int, false otherwise

Implements fawkes::Configuration::ValueIterator.

Definition at line 1528 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgid().

◆ next()

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.

Returns
true, if another element has been reached, false otherwise

Implements fawkes::Configuration::ValueIterator.

Definition at line 1459 of file netconf.cpp.

◆ path()

const char * fawkes::NetworkConfiguration::NetConfValueIterator::path ( ) const
virtual

Path of value.

Returns
path of value

Implements fawkes::Configuration::ValueIterator.

Definition at line 1480 of file netconf.cpp.

◆ type()

const char * fawkes::NetworkConfiguration::NetConfValueIterator::type ( ) const
virtual

Type of value.

Returns
string representation of value type.

Implements fawkes::Configuration::ValueIterator.

Definition at line 1494 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgid().

◆ valid()

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.

Returns
true, if the iterator is still valid, false otherwise

Implements fawkes::Configuration::ValueIterator.

Definition at line 1474 of file netconf.cpp.


The documentation for this class was generated from the following files: