Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::SQLiteConfiguration::SQLiteValueIterator Class Reference

SQLite configuration value iterator. More...

#include <config/sqlite.h>

Inheritance diagram for fawkes::SQLiteConfiguration::SQLiteValueIterator:

List of all members.

Public Member Functions

virtual ~SQLiteValueIterator ()
 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.
std::string get_modtype () const
 Get modification type.
std::string get_oldvalue () const
 Get old value (as string).
- Public Member Functions inherited from fawkes::Configuration::ValueIterator
virtual ~ValueIterator ()
 Virtual emptry destructor.

Protected Member Functions

 SQLiteValueIterator (::sqlite3_stmt *stmt, void *p=NULL)
 Constructor.

Friends

class SQLiteConfiguration

Detailed Description

SQLite configuration value iterator.

Definition at line 111 of file sqlite.h.


Constructor & Destructor Documentation

fawkes::SQLiteConfiguration::SQLiteValueIterator::SQLiteValueIterator ( ::sqlite3_stmt *  stmt,
void *  p = NULL 
)
protected

Constructor.

Parameters:
stmtcompiled SQLite statement
ppointer to arbitrary data that is freed (not deleted!) when the iterator is deleted.

Definition at line 2040 of file sqlite.cpp.

fawkes::SQLiteConfiguration::SQLiteValueIterator::~SQLiteValueIterator ( )
virtual

Destructor.

Definition at line 2048 of file sqlite.cpp.


Member Function Documentation

std::string fawkes::SQLiteConfiguration::SQLiteValueIterator::get_as_string ( ) const
virtual

Get value as string.

Returns:
value

Implements fawkes::Configuration::ValueIterator.

Definition at line 2222 of file sqlite.cpp.

bool fawkes::SQLiteConfiguration::SQLiteValueIterator::get_bool ( ) const
virtual

Get bool value.

Returns:
value

Implements fawkes::Configuration::ValueIterator.

Definition at line 2203 of file sqlite.cpp.

std::string fawkes::SQLiteConfiguration::SQLiteValueIterator::get_comment ( ) const
virtual

Get comment.

Returns:
string comment value

Implements fawkes::Configuration::ValueIterator.

Definition at line 2231 of file sqlite.cpp.

float fawkes::SQLiteConfiguration::SQLiteValueIterator::get_float ( ) const
virtual

Get float value.

Returns:
value

Implements fawkes::Configuration::ValueIterator.

Definition at line 2169 of file sqlite.cpp.

int fawkes::SQLiteConfiguration::SQLiteValueIterator::get_int ( ) const
virtual

Get int value.

Returns:
value

Implements fawkes::Configuration::ValueIterator.

Definition at line 2194 of file sqlite.cpp.

std::string fawkes::SQLiteConfiguration::SQLiteValueIterator::get_modtype ( ) const

Get modification type.

This can only be called if the iterator has been retrieved via SQLiteConfiguration::modified_iterator(). Otherwise the return value is always and empty string.

Returns:
string modification type

Definition at line 2244 of file sqlite.cpp.

std::string fawkes::SQLiteConfiguration::SQLiteValueIterator::get_oldvalue ( ) const

Get old value (as string).

This can only be called if the iterator has been retrieved via SQLiteConfiguration::modified_iterator(). The value is always returned as string, as it is meant for debugging purposes only. Otherwise the return value is always and empty string.

Returns:
string modification type

Definition at line 2260 of file sqlite.cpp.

std::string fawkes::SQLiteConfiguration::SQLiteValueIterator::get_string ( ) const
virtual

Get string value.

Returns:
value

Implements fawkes::Configuration::ValueIterator.

Definition at line 2212 of file sqlite.cpp.

unsigned int fawkes::SQLiteConfiguration::SQLiteValueIterator::get_uint ( ) const
virtual

Get unsigned int value.

Returns:
value

Implements fawkes::Configuration::ValueIterator.

Definition at line 2179 of file sqlite.cpp.

bool fawkes::SQLiteConfiguration::SQLiteValueIterator::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 2143 of file sqlite.cpp.

bool fawkes::SQLiteConfiguration::SQLiteValueIterator::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 2159 of file sqlite.cpp.

bool fawkes::SQLiteConfiguration::SQLiteValueIterator::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 2114 of file sqlite.cpp.

bool fawkes::SQLiteConfiguration::SQLiteValueIterator::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 2133 of file sqlite.cpp.

bool fawkes::SQLiteConfiguration::SQLiteValueIterator::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 2153 of file sqlite.cpp.

bool fawkes::SQLiteConfiguration::SQLiteValueIterator::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 2124 of file sqlite.cpp.

bool fawkes::SQLiteConfiguration::SQLiteValueIterator::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 2065 of file sqlite.cpp.

const char * fawkes::SQLiteConfiguration::SQLiteValueIterator::path ( ) const
virtual

Path of value.

Returns:
path of value

Implements fawkes::Configuration::ValueIterator.

Definition at line 2094 of file sqlite.cpp.

const char * fawkes::SQLiteConfiguration::SQLiteValueIterator::type ( ) const
virtual

Type of value.

Returns:
string representation of value type.

Implements fawkes::Configuration::ValueIterator.

Definition at line 2104 of file sqlite.cpp.

bool fawkes::SQLiteConfiguration::SQLiteValueIterator::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 2084 of file sqlite.cpp.


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