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

Network configuration value iterator. More...

#include <>>

Inheritance diagram for fawkes::NetworkConfiguration::NetConfValueIterator:

List of all members.

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

Detailed Description

Network configuration value iterator.

Author:
Tim Niemueller

Constructor & Destructor Documentation

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

Constructor.

Parameters:
iinternal 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.

Parameters:
mmessage

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]

Constructor.

Returns invalid iterator.

Definition at line 1409 of file netconf.cpp.

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

Destructor.

Definition at line 1449 of file netconf.cpp.

References fawkes::RefCount::unref().


Member Function Documentation

bool fawkes::NetworkConfiguration::NetConfValueIterator::get_bool ( ) const [virtual]
std::string fawkes::NetworkConfiguration::NetConfValueIterator::get_comment ( ) const [virtual]
float fawkes::NetworkConfiguration::NetConfValueIterator::get_float ( ) const [virtual]
int fawkes::NetworkConfiguration::NetConfValueIterator::get_int ( ) const [virtual]
std::string fawkes::NetworkConfiguration::NetConfValueIterator::get_string ( ) const [virtual]
unsigned int fawkes::NetworkConfiguration::NetConfValueIterator::get_uint ( ) const [virtual]
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 1561 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgid().

bool fawkes::NetworkConfiguration::NetConfValueIterator::is_default ( ) const [virtual]
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 1519 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgid().

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 1547 of file netconf.cpp.

References fawkes::FawkesNetworkMessage::msgid().

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 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.

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

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.

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

Implements fawkes::Configuration::ValueIterator.

Definition at line 1458 of file netconf.cpp.

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

Path of value.

Returns:
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.

Returns:
string representation of value type.

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.

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: