Fawkes API
Fawkes Development Version
|
Iterator interface to iterate over config values. More...
#include <>>
Public Member Functions | |
virtual | ~ValueIterator () |
Virtual emptry destructor. More... | |
virtual bool | next ()=0 |
Check if there is another element and advance to this if possible. More... | |
virtual bool | valid () const =0 |
Check if the current element is valid. More... | |
virtual const char * | path () const =0 |
Path of value. More... | |
virtual const char * | type () const =0 |
Type of value. More... | |
virtual bool | is_float () const =0 |
Check if current value is a float. More... | |
virtual bool | is_uint () const =0 |
Check if current value is a unsigned int. More... | |
virtual bool | is_int () const =0 |
Check if current value is a int. More... | |
virtual bool | is_bool () const =0 |
Check if current value is a bool. More... | |
virtual bool | is_string () const =0 |
Check if current value is a string. More... | |
virtual bool | is_list () const =0 |
Check if a value is a list. More... | |
virtual size_t | get_list_size () const =0 |
Get number of elements in list value. More... | |
virtual float | get_float () const =0 |
Get float value. More... | |
virtual unsigned int | get_uint () const =0 |
Get unsigned int value. More... | |
virtual int | get_int () const =0 |
Get int value. More... | |
virtual bool | get_bool () const =0 |
Get bool value. More... | |
virtual std::string | get_string () const =0 |
Get string value. More... | |
virtual std::vector< float > | get_floats () const =0 |
Get list of values from configuration which is of type float. More... | |
virtual std::vector< unsigned int > | get_uints () const =0 |
Get list of values from configuration which is of type unsigned int. More... | |
virtual std::vector< int > | get_ints () const =0 |
Get list of values from configuration which is of type int. More... | |
virtual std::vector< bool > | get_bools () const =0 |
Get list of values from configuration which is of type bool. More... | |
virtual std::vector< std::string > | get_strings () const =0 |
Get list of values from configuration which is of type string. More... | |
virtual std::string | get_as_string () const =0 |
Get value as string. More... | |
virtual std::string | get_comment () const =0 |
Get comment of value. More... | |
virtual bool | is_default () const =0 |
Check if current value was read from the default config. More... | |
Iterator interface to iterate over config values.
This does not implement a classic iterator interface with begin and end nodes but rather mimics a more Java-like interface where you iterate over the entries in a while loop until you covered all entries (much like a queue). If you implement this for your own configuration system you should not make the constructor publically accessible.
|
inlinevirtual |
|
pure virtual |
Get value as string.
Implemented in fawkes::NetworkConfiguration::NetConfValueIterator, fawkes::YamlConfiguration::YamlValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by ConfigCLIPSFeature::clips_context_destroyed(), and ConfigChangeWatcherTool::config_value_changed().
|
pure virtual |
Get bool value.
Implemented in fawkes::NetworkConfiguration::NetConfValueIterator, fawkes::YamlConfiguration::YamlValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), ConfigCLIPSFeature::clips_context_destroyed(), fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Get list of values from configuration which is of type bool.
Implemented in fawkes::NetworkConfiguration::NetConfValueIterator, fawkes::YamlConfiguration::YamlValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Get comment of value.
Implemented in fawkes::NetworkConfiguration::NetConfValueIterator, fawkes::YamlConfiguration::YamlValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by ConfigChangeWatcherTool::config_comment_changed(), and ConfigChangeWatcherTool::run().
|
pure virtual |
Get float value.
Implemented in fawkes::NetworkConfiguration::NetConfValueIterator, fawkes::YamlConfiguration::YamlValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Get list of values from configuration which is of type float.
Implemented in fawkes::NetworkConfiguration::NetConfValueIterator, fawkes::YamlConfiguration::YamlValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Get int value.
Implemented in fawkes::NetworkConfiguration::NetConfValueIterator, fawkes::YamlConfiguration::YamlValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Get list of values from configuration which is of type int.
Implemented in fawkes::NetworkConfiguration::NetConfValueIterator, fawkes::YamlConfiguration::YamlValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Get number of elements in list value.
Exception | thrown if the element is not a list. |
Implemented in fawkes::YamlConfiguration::YamlValueIterator, fawkes::NetworkConfiguration::NetConfValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Get string value.
Implemented in fawkes::NetworkConfiguration::NetConfValueIterator, fawkes::YamlConfiguration::YamlValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), BlackBoardLoggerPlugin::BlackBoardLoggerPlugin(), BlackBoardLogReplayPlugin::BlackBoardLogReplayPlugin(), MongoDBThread::ClientConf::ClientConf(), fawkes::PluginManager::config_value_changed(), fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), ProcRRDThread::init(), MongoRRDThread::init(), LaserFilterThread::init(), PlayerClientThread::init(), fawkes::PluginManager::init_pinfo_cache(), LaserFilterPlugin::LaserFilterPlugin(), ProcRRDThread::loop(), MongoRRDThread::loop(), BlackBoardSynchronizationThread::loop(), ConfigChangeWatcherTool::run(), LaserFilterThread::wait_done(), fawkes::ConfigNetworkHandler::~ConfigNetworkHandler(), and fawkes::LuaInterfaceImporter::~LuaInterfaceImporter().
|
pure virtual |
Get list of values from configuration which is of type string.
Implemented in fawkes::NetworkConfiguration::NetConfValueIterator, fawkes::YamlConfiguration::YamlValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Get unsigned int value.
Implemented in fawkes::NetworkConfiguration::NetConfValueIterator, fawkes::YamlConfiguration::YamlValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Get list of values from configuration which is of type unsigned int.
Implemented in fawkes::NetworkConfiguration::NetConfValueIterator, fawkes::YamlConfiguration::YamlValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Check if current value is a bool.
Implemented in fawkes::YamlConfiguration::YamlValueIterator, fawkes::NetworkConfiguration::NetConfValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), ConfigCLIPSFeature::clips_context_destroyed(), fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Check if current value was read from the default config.
Implemented in fawkes::YamlConfiguration::YamlValueIterator, fawkes::NetworkConfiguration::NetConfValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), ConfigChangeWatcherTool::config_comment_changed(), ConfigChangeWatcherTool::config_value_changed(), fawkes::NetworkConfiguration::is_default(), fawkes::ConfigNetworkHandler::loop(), LaserDeadSpotCalibrator::num_detected_spots(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Check if current value is a float.
Implemented in fawkes::YamlConfiguration::YamlValueIterator, fawkes::NetworkConfiguration::NetConfValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), ConfigCLIPSFeature::clips_context_destroyed(), fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Check if current value is a int.
Implemented in fawkes::YamlConfiguration::YamlValueIterator, fawkes::NetworkConfiguration::NetConfValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), ConfigCLIPSFeature::clips_context_destroyed(), fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Check if a value is a list.
Implemented in fawkes::YamlConfiguration::YamlValueIterator, fawkes::NetworkConfiguration::NetConfValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), ConfigCLIPSFeature::clips_context_destroyed(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Check if current value is a string.
Implemented in fawkes::YamlConfiguration::YamlValueIterator, fawkes::NetworkConfiguration::NetConfValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), MongoDBThread::ClientConf::ClientConf(), ConfigCLIPSFeature::clips_context_destroyed(), fawkes::PluginManager::config_value_changed(), fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), ProcRRDThread::init(), MongoRRDThread::init(), LaserFilterThread::init(), fawkes::PluginManager::init_pinfo_cache(), LaserFilterPlugin::LaserFilterPlugin(), ProcRRDThread::loop(), MongoRRDThread::loop(), ConfigChangeWatcherTool::run(), LaserFilterThread::wait_done(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Check if current value is a unsigned int.
Implemented in fawkes::YamlConfiguration::YamlValueIterator, fawkes::NetworkConfiguration::NetConfValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), ConfigCLIPSFeature::clips_context_destroyed(), fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), ConfigChangeWatcherTool::run(), and fawkes::ConfigNetworkHandler::~ConfigNetworkHandler().
|
pure virtual |
Check if there is another element and advance to this if possible.
This advances to the next element, if there is one.
Implemented in fawkes::YamlConfiguration::YamlValueIterator, fawkes::NetworkConfiguration::NetConfValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by BlackBoardLoggerPlugin::BlackBoardLoggerPlugin(), BlackBoardLogReplayPlugin::BlackBoardLogReplayPlugin(), BlackBoardSynchronizationPlugin::BlackBoardSynchronizationPlugin(), MongoDBThread::ClientConf::ClientConf(), ConfigCLIPSFeature::clips_context_destroyed(), fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), MongoDBThread::delete_client(), DynamixelPlugin::DynamixelPlugin(), StaticTransformsThread::finalize(), FvRetrieverPlugin::FvRetrieverPlugin(), IMUPlugin::IMUPlugin(), ProcRRDThread::init(), MongoRRDThread::init(), WebviewPtzCamThread::init(), MongoDBThread::init(), LaserFilterThread::init(), PlayerClientThread::init(), fawkes::PluginManager::init_pinfo_cache(), LaserClusterPlugin::LaserClusterPlugin(), LaserDeadSpotsDataFilter::LaserDeadSpotsDataFilter(), LaserFilterPlugin::LaserFilterPlugin(), LaserPlugin::LaserPlugin(), BlackBoardSynchronizationThread::loop(), fawkes::ConfigNetworkHandler::loop(), fawkes::Configuration::notify_handlers(), LaserDeadSpotCalibrator::num_detected_spots(), PanTiltPlugin::PanTiltPlugin(), ConfigChangeWatcherTool::run(), LaserFilterThread::wait_done(), and fawkes::LuaInterfaceImporter::~LuaInterfaceImporter().
|
pure virtual |
Path of value.
Implemented in fawkes::YamlConfiguration::YamlValueIterator, fawkes::NetworkConfiguration::NetConfValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::ConfigListContent::append(), BlackBoardLoggerPlugin::BlackBoardLoggerPlugin(), BlackBoardLogReplayPlugin::BlackBoardLogReplayPlugin(), BlackBoardSynchronizationPlugin::BlackBoardSynchronizationPlugin(), ConfigCLIPSFeature::clips_context_destroyed(), ConfigChangeWatcherTool::config_comment_changed(), fawkes::ConfigNetworkHandler::config_value_changed(), ConfigChangeWatcherTool::config_value_changed(), fawkes::PluginManager::config_value_changed(), fawkes::SQLiteConfiguration::copy(), fawkes::NetworkConfiguration::copy(), MongoDBThread::delete_client(), DynamixelPlugin::DynamixelPlugin(), StaticTransformsThread::finalize(), FvRetrieverPlugin::FvRetrieverPlugin(), IMUPlugin::IMUPlugin(), ProcRRDThread::init(), MongoRRDThread::init(), WebviewPtzCamThread::init(), MongoDBThread::init(), LaserFilterThread::init(), PlayerClientThread::init(), fawkes::PluginManager::init_pinfo_cache(), LaserClusterPlugin::LaserClusterPlugin(), LaserDeadSpotsDataFilter::LaserDeadSpotsDataFilter(), LaserFilterPlugin::LaserFilterPlugin(), LaserPlugin::LaserPlugin(), ProcRRDThread::loop(), MongoRRDThread::loop(), BlackBoardSynchronizationThread::loop(), LaserDeadSpotCalibrator::num_detected_spots(), PanTiltPlugin::PanTiltPlugin(), ConfigChangeWatcherTool::run(), LaserFilterThread::wait_done(), fawkes::ConfigNetworkHandler::~ConfigNetworkHandler(), and fawkes::LuaInterfaceImporter::~LuaInterfaceImporter().
|
pure virtual |
Type of value.
Implemented in fawkes::YamlConfiguration::YamlValueIterator, fawkes::NetworkConfiguration::NetConfValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by ConfigCLIPSFeature::clips_context_destroyed(), ConfigChangeWatcherTool::config_value_changed(), fawkes::NetworkConfiguration::get_type(), ProcRRDThread::init(), MongoRRDThread::init(), PlayerClientThread::init(), BlackBoardSynchronizationThread::loop(), ConfigChangeWatcherTool::run(), and fawkes::LuaInterfaceImporter::~LuaInterfaceImporter().
|
pure 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.
Implemented in fawkes::YamlConfiguration::YamlValueIterator, fawkes::NetworkConfiguration::NetConfValueIterator, and fawkes::SQLiteConfiguration::SQLiteValueIterator.
Referenced by fawkes::NetworkConfiguration::exists(), and ConfigChangeWatcherTool::run().