Fawkes API  Fawkes Development Version
fawkes::YamlConfiguration Class Reference

#include <>>

Inheritance diagram for fawkes::YamlConfiguration:

Classes

class  YamlValueIterator
 

Public Member Functions

 YamlConfiguration ()
 Constructor. More...
 
 YamlConfiguration (const char *sysconfdir, const char *userconfdir=NULL)
 Constructor. More...
 
virtual ~YamlConfiguration ()
 Destructor. More...
 
virtual void copy (Configuration *copyconf)
 
virtual void load (const char *file_path)
 
virtual bool exists (const char *path)
 
virtual bool is_float (const char *path)
 
virtual bool is_uint (const char *path)
 
virtual bool is_int (const char *path)
 
virtual bool is_bool (const char *path)
 
virtual bool is_string (const char *path)
 
virtual bool is_list (const char *path)
 
virtual bool is_default (const char *path)
 
virtual std::string get_type (const char *path)
 
virtual float get_float (const char *path)
 
virtual unsigned int get_uint (const char *path)
 
virtual int get_int (const char *path)
 
virtual bool get_bool (const char *path)
 
virtual std::string get_string (const char *path)
 
virtual std::vector< float > get_floats (const char *path)
 
virtual std::vector< unsigned int > get_uints (const char *path)
 
virtual std::vector< int > get_ints (const char *path)
 
virtual std::vector< bool > get_bools (const char *path)
 
virtual std::vector< std::string > get_strings (const char *path)
 
virtual ValueIteratorget_value (const char *path)
 
virtual std::string get_comment (const char *path)
 
virtual std::string get_default_comment (const char *path)
 
virtual void set_float (const char *path, float f)
 
virtual void set_uint (const char *path, unsigned int uint)
 
virtual void set_int (const char *path, int i)
 
virtual void set_bool (const char *path, bool b)
 
virtual void set_string (const char *path, std::string &s)
 
virtual void set_string (const char *path, const char *s)
 
virtual void set_floats (const char *path, std::vector< float > &f)
 
virtual void set_uints (const char *path, std::vector< unsigned int > &uint)
 
virtual void set_ints (const char *path, std::vector< int > &i)
 
virtual void set_bools (const char *path, std::vector< bool > &b)
 
virtual void set_strings (const char *path, std::vector< std::string > &s)
 
virtual void set_strings (const char *path, std::vector< const char * > &s)
 
virtual void set_comment (const char *path, std::string &comment)
 
virtual void set_comment (const char *path, const char *comment)
 
virtual void erase (const char *path)
 
virtual void set_default_float (const char *path, float f)
 
virtual void set_default_uint (const char *path, unsigned int uint)
 
virtual void set_default_int (const char *path, int i)
 
virtual void set_default_bool (const char *path, bool b)
 
virtual void set_default_string (const char *path, std::string &s)
 
virtual void set_default_string (const char *path, const char *s)
 
virtual void set_default_comment (const char *path, const char *comment)
 
virtual void set_default_comment (const char *path, std::string &comment)
 
virtual void erase_default (const char *path)
 
ValueIteratoriterator ()
 
ValueIteratorsearch (const char *path)
 
void lock ()
 Lock the config. More...
 
bool try_lock ()
 Try to lock the config. More...
 
void unlock ()
 Unlock the config. More...
 
virtual void try_dump ()
 
virtual void fam_event (const char *filename, unsigned int mask)
 
- Public Member Functions inherited from fawkes::Configuration
virtual ~Configuration ()
 
virtual void add_change_handler (ConfigurationChangeHandler *h)
 Add a configuration change handler. More...
 
virtual void rem_change_handler (ConfigurationChangeHandler *h)
 Remove a configuration change handler. More...
 
virtual float get_float_or_default (const char *path, const float &default_val)
 
virtual unsigned int get_uint_or_default (const char *path, const unsigned int &default_val)
 
virtual int get_int_or_default (const char *path, const int &default_val)
 
virtual bool get_bool_or_default (const char *path, const bool &default_val)
 
virtual std::string get_string_or_default (const char *path, const std::string &default_val)
 
virtual std::vector< float > get_floats_or_defaults (const char *path, const std::vector< float > &default_val)
 
virtual std::vector< unsigned int > get_uints_or_defaults (const char *path, const std::vector< unsigned int > &default_val)
 
virtual std::vector< int > get_ints_or_defaults (const char *path, const std::vector< int > &default_val)
 
virtual std::vector< bool > get_bools_or_defaults (const char *path, const std::vector< bool > &default_val)
 
virtual std::vector< std::string > get_strings_or_defaults (const char *path, const std::vector< std::string > &default_val)
 
- Public Member Functions inherited from fawkes::FamListener
virtual ~FamListener ()
 Virtual empty destructor. More...
 

Additional Inherited Members

- Static Public Attributes inherited from fawkes::FamListener
static const unsigned int FAM_ACCESS = 0x00000001
 File was accessed. More...
 
static const unsigned int FAM_MODIFY = 0x00000002
 File was modified. More...
 
static const unsigned int FAM_ATTRIB = 0x00000004
 Metadata changed. More...
 
static const unsigned int FAM_CLOSE_WRITE = 0x00000008
 Writtable file was closed. More...
 
static const unsigned int FAM_CLOSE_NOWRITE = 0x00000010
 Unwrittable file closed. More...
 
static const unsigned int FAM_CLOSE = (FAM_CLOSE_WRITE | FAM_CLOSE_NOWRITE)
 Close. More...
 
static const unsigned int FAM_OPEN = 0x00000020
 File was opened. More...
 
static const unsigned int FAM_MOVED_FROM = 0x00000040
 File was moved from X. More...
 
static const unsigned int FAM_MOVED_TO = 0x00000080
 File was moved to Y. More...
 
static const unsigned int FAM_MOVE = (FAM_MOVED_FROM | FAM_MOVED_TO)
 Moves. More...
 
static const unsigned int FAM_CREATE = 0x00000100
 Subfile was created. More...
 
static const unsigned int FAM_DELETE = 0x00000200
 Subfile was deleted. More...
 
static const unsigned int FAM_DELETE_SELF = 0x00000400
 Self was deleted. More...
 
static const unsigned int FAM_MOVE_SELF = 0x00000800
 Self was moved. More...
 
static const unsigned int FAM_UNMOUNT = 0x00002000
 Backing fs was unmounted. More...
 
static const unsigned int FAM_Q_OVERFLOW = 0x00004000
 Event queued overflowed. More...
 
static const unsigned int FAM_IGNORED = 0x00008000
 File was ignored. More...
 
static const unsigned int FAM_ONLYDIR = 0x01000000
 Only watch the path if it is a directory. More...
 
static const unsigned int FAM_DONT_FOLLOW = 0x02000000
 Do not follow a sym link. More...
 
static const unsigned int FAM_MASK_ADD = 0x20000000
 Add to the mask of an already existing watch. More...
 
static const unsigned int FAM_ISDIR = 0x40000000
 Event occurred against dir. More...
 
static const unsigned int FAM_ONESHOT = 0x80000000
 Only send event once. More...
 
static const unsigned int FAM_ALL_EVENTS
 All events which a program can wait on. More...
 
- Protected Types inherited from fawkes::Configuration
typedef std::list< ConfigurationChangeHandler * > ChangeHandlerList
 List that contains pointers to ConfigurationChangeHandler. More...
 
typedef std::multimap< const char *, ConfigurationChangeHandler *, StringLessChangeHandlerMultimap
 Multimap string to config change handlers. More...
 
typedef std::pair< ChangeHandlerMultimap::iterator, ChangeHandlerMultimap::iterator > ChangeHandlerMultimapRange
 Config change handler multimap range. More...
 
- Protected Member Functions inherited from fawkes::Configuration
ChangeHandlerListfind_handlers (const char *path)
 Find handlers for given path. More...
 
void notify_handlers (const char *path, bool comment_changed=false)
 Notify handlers for given path. More...
 
- Protected Attributes inherited from fawkes::Configuration
ChangeHandlerMultimap _change_handlers
 Registered change handlers. More...
 
ChangeHandlerMultimapRange _ch_range
 Change handler range. More...
 

Detailed Description

Configuration store using YAML documents.

Author
Tim Niemueller

Definition at line 48 of file yaml.h.

Constructor & Destructor Documentation

◆ YamlConfiguration() [1/2]

fawkes::YamlConfiguration::YamlConfiguration ( )

Constructor.

Definition at line 309 of file yaml.cpp.

◆ YamlConfiguration() [2/2]

fawkes::YamlConfiguration::YamlConfiguration ( const char *  sysconfdir,
const char *  userconfdir = NULL 
)

Constructor.

Parameters
sysconfdirsystem configuration directory, will be searched for default configuration file, and system will try to create host-specific database if writable
userconfdiruser configuration directory, will be searched preferably for default configuration file, and will be used to create host-specific database if sysconfdir is not writable. This directory will be created if it does not exist during load().

Definition at line 329 of file yaml.cpp.

◆ ~YamlConfiguration()

fawkes::YamlConfiguration::~YamlConfiguration ( )
virtual

Destructor.

Definition at line 353 of file yaml.cpp.

References fawkes::Thread::cancel(), and fawkes::Thread::join().

Member Function Documentation

◆ copy()

void fawkes::YamlConfiguration::copy ( Configuration copyconf)
virtual

Copies all values from the given configuration. All values from the given configuration are copied. Old values are not erased so that the copied values will overwrite existing values, new values are created, but values existent in current config but not in the copied config will remain unchanged.

Parameters
copyconfconfiguration to copy

Implements fawkes::Configuration.

Definition at line 718 of file yaml.cpp.

◆ erase()

void fawkes::YamlConfiguration::erase ( const char *  path)
virtual

Erase the given value from the configuration. It is not an error if the value does not exists before deletion.

Parameters
pathpath to value

Implements fawkes::Configuration.

Definition at line 1056 of file yaml.cpp.

◆ erase_default()

void fawkes::YamlConfiguration::erase_default ( const char *  path)
virtual

Erase the given default value from the configuration. It is not an error if the value does not exists before deletion.

Parameters
pathpath to value

Implements fawkes::Configuration.

Definition at line 1112 of file yaml.cpp.

References fawkes::Mutex::lock().

◆ exists()

bool fawkes::YamlConfiguration::exists ( const char *  path)
virtual

Check if a given value exists.

Parameters
pathpath to value
Returns
true if the value exists, false otherwise

Implements fawkes::Configuration.

Definition at line 724 of file yaml.cpp.

◆ fam_event()

void fawkes::YamlConfiguration::fam_event ( const char *  filename,
unsigned int  mask 
)
virtual

Event has been raised.

Parameters
filenamename of the file that triggered the event
maskmask indicating the event. Currently inotify event flags are used, see inotify.h.

Implements fawkes::FamListener.

Definition at line 535 of file yaml.cpp.

◆ get_bool()

bool fawkes::YamlConfiguration::get_bool ( const char *  path)
virtual

Get value from configuration which is of type bool

Parameters
pathpath to value
Returns
value

Implements fawkes::Configuration.

Definition at line 806 of file yaml.cpp.

◆ get_bools()

std::vector< bool > fawkes::YamlConfiguration::get_bools ( const char *  path)
virtual

Get list of values from configuration which is of type bool

Parameters
pathpath to value
Returns
value

Implements fawkes::Configuration.

Definition at line 836 of file yaml.cpp.

◆ get_comment()

std::string fawkes::YamlConfiguration::get_comment ( const char *  path)
virtual

Get comment of value at given path. The value at the given path must exist in the host-specific configuration.

Parameters
pathpath to value
Returns
comment
Exceptions
ConfigEntryNotFoundExceptionshall be thrown if value does not exist
ConfigurationExceptionshall be thrown on any other error

Implements fawkes::Configuration.

Definition at line 746 of file yaml.cpp.

◆ get_default_comment()

std::string fawkes::YamlConfiguration::get_default_comment ( const char *  path)
virtual

Get comment of value at given path. The value at the given path must exist in the default configuration.

Parameters
pathpath to value
Returns
comment
Exceptions
ConfigEntryNotFoundExceptionshall be thrown if value does not exist
ConfigurationExceptionshall be thrown on any other error

Implements fawkes::Configuration.

Definition at line 913 of file yaml.cpp.

◆ get_float()

float fawkes::YamlConfiguration::get_float ( const char *  path)
virtual

Get value from configuration which is of type float

Parameters
pathpath to value
Returns
value

Implements fawkes::Configuration.

Definition at line 788 of file yaml.cpp.

◆ get_floats()

std::vector< float > fawkes::YamlConfiguration::get_floats ( const char *  path)
virtual

Get list of values from configuration which is of type float

Parameters
pathpath to value
Returns
value

Implements fawkes::Configuration.

Definition at line 818 of file yaml.cpp.

◆ get_int()

int fawkes::YamlConfiguration::get_int ( const char *  path)
virtual

Get value from configuration which is of type int

Parameters
pathpath to value
Returns
value

Implements fawkes::Configuration.

Definition at line 800 of file yaml.cpp.

◆ get_ints()

std::vector< int > fawkes::YamlConfiguration::get_ints ( const char *  path)
virtual

Get list of values from configuration which is of type int

Parameters
pathpath to value
Returns
value

Implements fawkes::Configuration.

Definition at line 830 of file yaml.cpp.

◆ get_string()

std::string fawkes::YamlConfiguration::get_string ( const char *  path)
virtual

Get value from configuration which is of type string

Parameters
pathpath to value
Returns
value

Implements fawkes::Configuration.

Definition at line 812 of file yaml.cpp.

◆ get_strings()

std::vector< std::string > fawkes::YamlConfiguration::get_strings ( const char *  path)
virtual

Get list of values from configuration which is of type string

Parameters
pathpath to value
Returns
value

Implements fawkes::Configuration.

Definition at line 842 of file yaml.cpp.

◆ get_type()

std::string fawkes::YamlConfiguration::get_type ( const char *  path)
virtual

Get type of value at given path.

Parameters
pathpath to value
Returns
string representation of type, one of float, unsigned int, int, bool, or string
Exceptions
ConfigurationExceptionshall be thrown if value does not exist or on any other error.

Implements fawkes::Configuration.

Definition at line 735 of file yaml.cpp.

◆ get_uint()

unsigned int fawkes::YamlConfiguration::get_uint ( const char *  path)
virtual

Get value from configuration which is of type unsigned int

Parameters
pathpath to value
Returns
value

Implements fawkes::Configuration.

Definition at line 794 of file yaml.cpp.

◆ get_uints()

std::vector< unsigned int > fawkes::YamlConfiguration::get_uints ( const char *  path)
virtual

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

Parameters
pathpath to value
Returns
value

Implements fawkes::Configuration.

Definition at line 824 of file yaml.cpp.

◆ get_value()

Configuration::ValueIterator * fawkes::YamlConfiguration::get_value ( const char *  path)
virtual

Get value from configuration.

Parameters
pathpath to value
Returns
value iterator for just this one value, maybe invalid if value does not exists.

Implements fawkes::Configuration.

Definition at line 925 of file yaml.cpp.

◆ is_bool()

bool fawkes::YamlConfiguration::is_bool ( const char *  path)
virtual

Check if a value is of type bool

Parameters
pathpath to value
Returns
true if the value exists and is of type bool

Implements fawkes::Configuration.

Definition at line 891 of file yaml.cpp.

◆ is_default()

bool fawkes::YamlConfiguration::is_default ( const char *  path)
virtual

Check if a value was read from the default config.

Parameters
pathpath to value
Returns
true if the value exists and is only stored in the default config

Implements fawkes::Configuration.

Definition at line 919 of file yaml.cpp.

◆ is_float()

bool fawkes::YamlConfiguration::is_float ( const char *  path)
virtual

Check if a value is of type float

Parameters
pathpath to value
Returns
true if the value exists and is of type float

Implements fawkes::Configuration.

Definition at line 864 of file yaml.cpp.

◆ is_int()

bool fawkes::YamlConfiguration::is_int ( const char *  path)
virtual

Check if a value is of type int

Parameters
pathpath to value
Returns
true if the value exists and is of type int

Implements fawkes::Configuration.

Definition at line 885 of file yaml.cpp.

◆ is_list()

bool fawkes::YamlConfiguration::is_list ( const char *  path)
virtual

Check if a value is a list.

Parameters
pathpath to value
Returns
true if the value exists and is a list

Implements fawkes::Configuration.

Definition at line 903 of file yaml.cpp.

◆ is_string()

bool fawkes::YamlConfiguration::is_string ( const char *  path)
virtual

Check if a value is of type string

Parameters
pathpath to value
Returns
true if the value exists and is of type string

Implements fawkes::Configuration.

Definition at line 897 of file yaml.cpp.

◆ is_uint()

bool fawkes::YamlConfiguration::is_uint ( const char *  path)
virtual

Check if a value is of type unsigned int

Parameters
pathpath to value
Returns
true if the value exists and is of type unsigned int

Implements fawkes::Configuration.

Definition at line 870 of file yaml.cpp.

◆ iterator()

Configuration::ValueIterator * fawkes::YamlConfiguration::iterator ( )
virtual

Iterator for all values. Returns an iterator that can be used to iterate over all values in the current configuration, it will value the overlay. If a default and a host-specific value exists you will only see the host-specific value.

Returns
iterator over all values

Implements fawkes::Configuration.

Definition at line 1158 of file yaml.cpp.

◆ load()

void fawkes::YamlConfiguration::load ( const char *  file_path)
virtual

Load configuration. Loads configuration data, or opens a file, depending on the implementation. After this call access to all other methods shall be possible.

Parameters
file_pathpath of the configuration file.

Implements fawkes::Configuration.

Definition at line 374 of file yaml.cpp.

◆ lock()

void fawkes::YamlConfiguration::lock ( )
virtual

Lock the config.

No further changes or queries can be executed on the configuration and will block until the config is unlocked.

Implements fawkes::Configuration.

Definition at line 1122 of file yaml.cpp.

References fawkes::Mutex::try_lock().

◆ search()

Configuration::ValueIterator * fawkes::YamlConfiguration::search ( const char *  path)
virtual

Iterator with search results. Returns an iterator that can be used to iterate over the search results. All values whose path start with the given strings are returned. A call like

config->search("");

is effectively the same as a call to iterator().

Parameters
pathstart of path
Returns
iterator to search results

Implements fawkes::Configuration.

Definition at line 1166 of file yaml.cpp.

◆ set_bool()

void fawkes::YamlConfiguration::set_bool ( const char *  path,
bool  b 
)
virtual

Set new value in configuration of type bool

Parameters
pathpath to value
bnew bool value

Implements fawkes::Configuration.

Definition at line 968 of file yaml.cpp.

◆ set_bools()

void fawkes::YamlConfiguration::set_bools ( const char *  path,
std::vector< bool > &  b 
)
virtual

Set new value in configuration of type bool

Parameters
pathpath to value
bnew bool values

Implements fawkes::Configuration.

Definition at line 1019 of file yaml.cpp.

◆ set_comment() [1/2]

void fawkes::YamlConfiguration::set_comment ( const char *  path,
const char *  comment 
)
virtual

Set new comment for existing value. Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.

Parameters
pathpath to value
commentnew comment string

Implements fawkes::Configuration.

Definition at line 1046 of file yaml.cpp.

◆ set_comment() [2/2]

void fawkes::YamlConfiguration::set_comment ( const char *  path,
std::string &  comment 
)
virtual

Set new comment for existing value.

Parameters
pathpath to value
commentnew comment string

Implements fawkes::Configuration.

Definition at line 1051 of file yaml.cpp.

◆ set_default_bool()

void fawkes::YamlConfiguration::set_default_bool ( const char *  path,
bool  b 
)
virtual

Set new default value in configuration of type bool

Parameters
pathpath to value
bnew bool value

Implements fawkes::Configuration.

Definition at line 1082 of file yaml.cpp.

◆ set_default_comment() [1/2]

void fawkes::YamlConfiguration::set_default_comment ( const char *  path,
const char *  comment 
)
virtual

Set new default comment for existing default configuration value. Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.

Parameters
pathpath to value
commentnew comment string

Implements fawkes::Configuration.

Definition at line 1100 of file yaml.cpp.

◆ set_default_comment() [2/2]

void fawkes::YamlConfiguration::set_default_comment ( const char *  path,
std::string &  comment 
)
virtual

Set new default comment for existing default configuration value.

Parameters
pathpath to value
commentnew comment string

Implements fawkes::Configuration.

Definition at line 1106 of file yaml.cpp.

◆ set_default_float()

void fawkes::YamlConfiguration::set_default_float ( const char *  path,
float  f 
)
virtual

Set new default value in configuration of type float

Parameters
pathpath to value
fnew float value

Implements fawkes::Configuration.

Definition at line 1064 of file yaml.cpp.

◆ set_default_int()

void fawkes::YamlConfiguration::set_default_int ( const char *  path,
int  i 
)
virtual

Set new default value in configuration of type int

Parameters
pathpath to value
inew int value

Implements fawkes::Configuration.

Definition at line 1076 of file yaml.cpp.

◆ set_default_string() [1/2]

void fawkes::YamlConfiguration::set_default_string ( const char *  path,
const char *  s 
)
virtual

Set new default value in configuration of type string. Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.

Parameters
pathpath to value
snew string value

Implements fawkes::Configuration.

Definition at line 1088 of file yaml.cpp.

References set_default_string().

◆ set_default_string() [2/2]

void fawkes::YamlConfiguration::set_default_string ( const char *  path,
std::string &  s 
)
virtual

Set new default value in configuration of type string

Parameters
pathpath to value
snew string value

Implements fawkes::Configuration.

Definition at line 1094 of file yaml.cpp.

Referenced by set_default_string().

◆ set_default_uint()

void fawkes::YamlConfiguration::set_default_uint ( const char *  path,
unsigned int  uint 
)
virtual

Set new default value in configuration of type unsigned int

Parameters
pathpath to value
uintnew unsigned int value

Implements fawkes::Configuration.

Definition at line 1070 of file yaml.cpp.

◆ set_float()

void fawkes::YamlConfiguration::set_float ( const char *  path,
float  f 
)
virtual

Set new value in configuration of type float

Parameters
pathpath to value
fnew float value

Implements fawkes::Configuration.

Definition at line 941 of file yaml.cpp.

◆ set_floats()

void fawkes::YamlConfiguration::set_floats ( const char *  path,
std::vector< float > &  f 
)
virtual

Set new value in configuration of type float

Parameters
pathpath to value
fnew float values

Implements fawkes::Configuration.

Definition at line 992 of file yaml.cpp.

◆ set_int()

void fawkes::YamlConfiguration::set_int ( const char *  path,
int  i 
)
virtual

Set new value in configuration of type int

Parameters
pathpath to value
inew int value

Implements fawkes::Configuration.

Definition at line 959 of file yaml.cpp.

◆ set_ints()

void fawkes::YamlConfiguration::set_ints ( const char *  path,
std::vector< int > &  i 
)
virtual

Set new value in configuration of type int

Parameters
pathpath to value
inew int values

Implements fawkes::Configuration.

Definition at line 1010 of file yaml.cpp.

◆ set_string() [1/2]

void fawkes::YamlConfiguration::set_string ( const char *  path,
const char *  s 
)
virtual

Set new value in configuration of type string. Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.

Parameters
pathpath to value
snew string value

Implements fawkes::Configuration.

Definition at line 977 of file yaml.cpp.

◆ set_string() [2/2]

void fawkes::YamlConfiguration::set_string ( const char *  path,
std::string &  s 
)
virtual

Set new value in configuration of type string

Parameters
pathpath to value
snew string value

Implements fawkes::Configuration.

Definition at line 986 of file yaml.cpp.

References fawkes::Configuration::notify_handlers().

◆ set_strings() [1/2]

void fawkes::YamlConfiguration::set_strings ( const char *  path,
std::vector< const char * > &  s 
)
virtual

Set new value in configuration of type string. Works like the aforementioned method. Just takes an good ol' char array instead of a std::string.

Parameters
pathpath to value
snew string values

Implements fawkes::Configuration.

Definition at line 1037 of file yaml.cpp.

◆ set_strings() [2/2]

void fawkes::YamlConfiguration::set_strings ( const char *  path,
std::vector< std::string > &  s 
)
virtual

Set new value in configuration of type string

Parameters
pathpath to value
snew string values

Implements fawkes::Configuration.

Definition at line 1028 of file yaml.cpp.

◆ set_uint()

void fawkes::YamlConfiguration::set_uint ( const char *  path,
unsigned int  uint 
)
virtual

Set new value in configuration of type unsigned int

Parameters
pathpath to value
uintnew unsigned int value

Implements fawkes::Configuration.

Definition at line 950 of file yaml.cpp.

◆ set_uints()

void fawkes::YamlConfiguration::set_uints ( const char *  path,
std::vector< unsigned int > &  uint 
)
virtual

Set new value in configuration of type unsigned int

Parameters
pathpath to value
uintnew unsigned int values

Implements fawkes::Configuration.

Definition at line 1001 of file yaml.cpp.

◆ try_dump()

void fawkes::YamlConfiguration::try_dump ( )
virtual

Try to dump configuration. For configuration methods that transform configuration files in a binary format this can be used to write out the text representation on shutdown of Fawkes.

Exceptions
Exceptionthrown if dumping fails

Implements fawkes::Configuration.

Definition at line 1153 of file yaml.cpp.

◆ try_lock()

bool fawkes::YamlConfiguration::try_lock ( )
virtual

Try to lock the config.

See also
Configuration::lock()
Returns
true, if the lock has been aquired, false otherwise

Implements fawkes::Configuration.

Definition at line 1132 of file yaml.cpp.

References fawkes::Mutex::lock().

◆ unlock()

void fawkes::YamlConfiguration::unlock ( )
virtual

Unlock the config.

Modifications and queries are possible again.

Implements fawkes::Configuration.

Definition at line 1141 of file yaml.cpp.


The documentation for this class was generated from the following files:
fawkes::Configuration::search
virtual ValueIterator * search(const char *path)=0