A SetDescriptor (SD) is a set of pairs <key, value>, where the key is always a string, while the value may be an integer, a float or a string. More...
#include <SetDescriptor.h>
Public Member Functions | |
| SetDescriptor () | |
| void | setSequenceNumber (int sn) |
| int | getSequenceNumber () const |
| int | size () const |
|
const std::map< std::string, std::string > & | getStringFields () const |
|
const std::map< std::string, int > & | getIntFields () const |
|
const std::map< std::string, float > & | getFloatFields () const |
| bool | existKey (const std::string &key) |
| bool | hasValue (const std::string &key, const std::string &value) |
| bool | hasValue (const std::string &key, int value) |
| bool | hasValue (const std::string &key, float value) |
| void | addValue (const std::string &key, const std::string &value) |
| void | addValue (const std::string &key, int value) |
| void | addValue (const std::string &key, float value) |
| template<typename T > | |
| bool | addKey (const std::string &key) |
| bool | operator== (const SetDescriptor &other) |
| bool | operator!= (const SetDescriptor &other) |
| template<> | |
| bool | addKey (const string &key) |
| template<> | |
| bool | addKey (const string &key) |
| template<> | |
| bool | addKey (const string &key) |
Static Public Attributes | |
| static const unsigned int | MAX_FIELDS_NUMBER = 512 |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const SetDescriptor &sd) |
A SetDescriptor (SD) is a set of pairs <key, value>, where the key is always a string, while the value may be an integer, a float or a string.
The SD is implemented by a map for each of the three possible combinations. The SD has a Sequence Number (SN), which is a normal field within the DSS configuration file but in the resulting SD object is a class member.
| SetDescriptor::SetDescriptor | ( | ) |
Max fields number allowed.
| bool entity::SetDescriptor::addKey | ( | const std::string & | key | ) |
Add a new key but without its value. The type of the value is the template parameter.
| key | The key of the new field. It can't be an empty string. |
| bool SetDescriptor::existKey | ( | const std::string & | key | ) |
| key | The key of a certain field. |
| int SetDescriptor::size | ( | ) | const |
1.8.8