12 #ifndef INCLUDED_LIBCYBERRADIO_DRIVER_CONFIGURABLE_H 13 #define INCLUDED_LIBCYBERRADIO_DRIVER_CONFIGURABLE_H 15 #include "LibCyberRadio/Common/BasicDict.h" 16 #include "LibCyberRadio/Common/Debuggable.h" 17 #include "LibCyberRadio/Driver/ConfigString.h" 66 virtual std::string
toString()
const;
72 virtual bool hasKey(
const std::string& key)
const;
107 virtual std::string
getName()
const;
112 virtual void setName(
const std::string &name);
179 const std::string& value);
207 const unsigned int value);
295 #endif // INCLUDED_LIBCYBERRADIO_DRIVER_CONFIGURABLE_H virtual bool getConfigurationValueAsBool(const std::string &key) const
Gets a named configuration value as a Boolean.
virtual void updateConfigurationDict()
Updates the configuration dictionary from object settings.
Configuration value string class.
virtual bool setConfigurationValueToDbl(const std::string &key, const double value)
Sets a named configuration value to a double value.
virtual ConfigString getConfigurationValue(const std::string &key) const
Gets a named configuration value as a string.
virtual ConfigurationDict normalizedConfigurationDict(const ConfigurationDict &cfg)
Normalizes an incoming configuration dictionary.
virtual bool hasKey(const std::string &key) const
Determines if the dictionary has the given key.
virtual ~ConfigurationDict()
Destroys a ConfigurationDict object.
virtual void setName(const std::string &name)
Sets the name of the configurable object.
virtual bool setConfigurationValueToBool(const std::string &key, const bool value)
Sets a named configuration value to a Boolean.
virtual void queryConfiguration()
Tells the object to create its configuration dictionary.
virtual int getConfigurationValueAsInt(const std::string &key) const
Gets a named configuration value as an integer value.
Class that supports debug output.
virtual ConfigurationDict getConfiguration() const
Gets the configuration dictionary for this object.
ConfigurationDict()
Constructs a ConfigurationDict object.
virtual void dumpConfiguration()
Dumps this object's configuration dictionary to debug output.
virtual std::string normalizedBool(const std::string &val)
Normalizes a Boolean string value.
virtual bool setConfigurationValueToUInt(const std::string &key, const unsigned int value)
Sets a named configuration value to an unsigned integer value.
virtual std::string toString() const
Construct a string representation of this object.
virtual int debug(const char *format,...)
Outputs debug information.
virtual ~Configurable()
Destroys a Configurable object.
Defines functionality for LibCyberRadio applications.
A configuration dictionary.
virtual Configurable & operator=(const Configurable &other)
Assignment operator for Configurable objects.
virtual void initConfigurationDict()
Initializes the configuration dictionary, defining the allowed keys.
virtual bool setConfiguration(ConfigurationDict &cfg)
Sets the configuration dictionary for this object.
Base configurable object class.
virtual std::string getName() const
Gets the name of the configurable object.
virtual double getConfigurationValueAsDbl(const std::string &key) const
Gets a named configuration value as a double value.
virtual unsigned int getConfigurationValueAsUInt(const std::string &key) const
Gets a named configuration value as an unsigned integer value.
virtual bool setConfigurationValue(const std::string &key, const std::string &value)
Sets a named configuration value to a string.
Configurable(const std::string &name="<unknown>", bool debug=false)
Constructs a Configurable object.
virtual bool setConfigurationValueToInt(const std::string &key, const int value)
Sets a named configuration value to an integer value.