libcyberradio  22.01.24
ConfigurationDict Class Reference

A configuration dictionary. More...

#include <Configurable.h>

Inherits BASIC_DICT_CONTAINER< std::string, ConfigString >.

Public Member Functions

 ConfigurationDict ()
 Constructs a ConfigurationDict object.
 
virtual ~ConfigurationDict ()
 Destroys a ConfigurationDict object.
 
virtual std::string toString () const
 Construct a string representation of this object. More...
 
virtual bool hasKey (const std::string &key) const
 Determines if the dictionary has the given key. More...
 

Detailed Description

A configuration dictionary.

A configuration dictionary contains the settings employed by some configurable object. It contains a number of values (using ConfigString objects) accessible using key strings.

The ConfigString class allows users to assign values to a configuration dictionary using a number of basic types, not just strings. Boolean values, integers, and floating-point values are supported. When retrieving values from the dictionary, users can use their string forms, or they can convert these values back to basic types using methods of the ConfigString class.

Each configurable object defines its own configuration dictionary, so see its documentation for further details.

Definition at line 51 of file Configurable.h.

Member Function Documentation

◆ hasKey()

bool hasKey ( const std::string &  key) const
virtual

Determines if the dictionary has the given key.

Parameters
keyKey string
Returns
True if the key is in the dictionary, false otherwise.

Definition at line 52 of file Configurable.cpp.

◆ toString()

std::string toString ( ) const
virtual

Construct a string representation of this object.

Returns
A string representing this object's configuration.

Definition at line 35 of file Configurable.cpp.


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