|
| | ParameterSet (const ParameterSet &that) |
| | Copying is allowed. More...
|
| |
| | ParameterSet (const std::string &theFilename, bool caseInsensitive) |
| |
| iterator | begin () |
| | Iteration. More...
|
| |
| const_iterator | begin () const |
| |
| void | clear () |
| | Clear the set. More...
|
| |
| bool | empty () const |
| | Is the set empty? More...
|
| |
| iterator | end () |
| |
| const_iterator | end () const |
| |
| KeyCompare::Mode | keyCompareMode () const |
| | Key comparison mode. More...
|
| |
| ParameterSet & | operator= (const ParameterSet &that) |
| | Copying is allowed. More...
|
| |
| int | size () const |
| | Get the number of parameters. More...
|
| |
| std::vector< std::string > | unusedKeys () const |
| |
|
A ParameterSet can be constructed as empty collection, can be read from a file or copied from another collection.
|
| | ParameterSet (KeyCompare::Mode mode=KeyCompare::NORMAL) |
| |
| | ParameterSet (bool caseInsensitive) |
| |
| | ParameterSet (const std::string &theFilename, KeyCompare::Mode=KeyCompare::NORMAL) |
| |
| | ParameterSet (const char *theFilename, KeyCompare::Mode=KeyCompare::NORMAL) |
| | This one is needed to avoid problems with the bool constructor above. More...
|
| |
|
| const ParameterValue & | get (const std::string &aKey) const |
| |
| const ParameterValue & | operator[] (const std::string &aKey) const |
| |
|
An existing collection can be extended/merged with another collection.
|
| void | adoptFile (const std::string &theFilename, const std::string &thePrefix="") |
| |
| void | adoptBuffer (const std::string &theBuffer, const std::string &thePrefix="") |
| |
| void | adoptCollection (const ParameterSet &theCollection, const std::string &thePrefix="") |
| |
| void | adoptArguments (const std::vector< std::string > &arguments) |
| |
|
The map of key-value pair can be saved in a file or a string.
|
| void | writeFile (const std::string &theFilename, bool append=false) const |
| | Writes the Key-Values pair from the current ParCollection to the file. More...
|
| |
| void | writeBuffer (std::string &theBuffer) const |
| |
| void | writeStream (std::ostream &os) const |
| |
|
A subset from the current collection can be made based on the prefix of the keys in the collection.
|
| ParameterSet | makeSubset (const std::string &baseKey, const std::string &prefix="") const |
| |
| void | subtractSubset (const std::string &fullPrefix) |
| |
|
Single key-value pairs can ofcourse be added, replaced or removed from a collection.
|
| void | add (const std::string &aKey, const std::string &aValue) |
| |
| void | add (const KVpair &aPair) |
| |
| void | replace (const std::string &aKey, const std::string &aValue) |
| |
| void | replace (const KVpair &aPair) |
| |
| void | remove (const std::string &aKey) |
| | Removes the pair with the given key. Removing a non-existing key is ok. More...
|
| |
|
The following functions support searching the collection for existance of given keys an the retrieval of the corresponding value. In the getXxx retrieve functions the stored string-value is converted to the wanted type.
|
| iterator | find (const std::string &searchKey) |
| | Find a key. More...
|
| |
| const_iterator | find (const std::string &searchKey) const |
| |
| bool | isDefined (const std::string &searchKey) const |
| | Checks if the given Key is defined in the ParameterSet. More...
|
| |
| std::string | locateModule (const std::string &shortName) const |
| |
| std::string | fullModuleName (const std::string &shortName) const |
| |
| std::vector< ParameterValue > | getVector (const std::string &aKey) const |
| |
| ParameterRecord | getRecord (const std::string &aKey) const |
| |
| bool | getBool (const std::string &aKey) const |
| |
| bool | getBool (const std::string &aKey, bool aValue) const |
| |
| int | getInt (const std::string &aKey) const |
| |
| int | getInt (const std::string &aKey, int aValue) const |
| |
| unsigned int | getUint (const std::string &aKey) const |
| |
| unsigned int | getUint (const std::string &aKey, unsigned int aValue) const |
| |
| int16_t | getInt16 (const std::string &aKey) const |
| |
| int16_t | getInt16 (const std::string &aKey, int16_t aValue) const |
| |
| uint16_t | getUint16 (const std::string &aKey) const |
| |
| uint16_t | getUint16 (const std::string &aKey, uint16_t aValue) const |
| |
| int32_t | getInt32 (const std::string &aKey) const |
| |
| int32_t | getInt32 (const std::string &aKey, int32_t aValue) const |
| |
| uint32_t | getUint32 (const std::string &aKey) const |
| |
| uint32_t | getUint32 (const std::string &aKey, uint32_t aValue) const |
| |
| int64_t | getInt64 (const std::string &aKey) const |
| |
| int64_t | getInt64 (const std::string &aKey, int64_t aValue) const |
| |
| uint64_t | getUint64 (const std::string &aKey) const |
| |
| uint64_t | getUint64 (const std::string &aKey, uint64_t aValue) const |
| |
| float | getFloat (const std::string &aKey) const |
| |
| float | getFloat (const std::string &aKey, float aValue) const |
| |
| double | getDouble (const std::string &aKey) const |
| |
| double | getDouble (const std::string &aKey, double aValue) const |
| |
| std::string | getString (const std::string &aKey) const |
| |
| std::string | getString (const std::string &aKey, const std::string &aValue) const |
| |
| time_t | getTime (const std::string &aKey) const |
| |
| time_t | getTime (const std::string &aKey, const time_t &aValue) const |
| |
|
| std::vector< bool > | getBoolVector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< bool > | getBoolVector (const std::string &aKey, const std::vector< bool > &aValue, bool expandable=false) const |
| |
| std::vector< int > | getIntVector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< int > | getIntVector (const std::string &aKey, const std::vector< int > &aValue, bool expandable=false) const |
| |
| std::vector< unsigned int > | getUintVector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< unsigned int > | getUintVector (const std::string &aKey, const std::vector< unsigned int > &aValue, bool expandable=false) const |
| |
| std::vector< int16_t > | getInt16Vector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< int16_t > | getInt16Vector (const std::string &aKey, const std::vector< int16_t > &aValue, bool expandable=false) const |
| |
| std::vector< uint16_t > | getUint16Vector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< uint16_t > | getUint16Vector (const std::string &aKey, const std::vector< uint16_t > &aValue, bool expandable=false) const |
| |
| std::vector< int32_t > | getInt32Vector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< int32_t > | getInt32Vector (const std::string &aKey, const std::vector< int32_t > &aValue, bool expandable=false) const |
| |
| std::vector< uint32_t > | getUint32Vector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< uint32_t > | getUint32Vector (const std::string &aKey, const std::vector< uint32_t > &aValue, bool expandable=false) const |
| |
| std::vector< int64_t > | getInt64Vector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< int64_t > | getInt64Vector (const std::string &aKey, const std::vector< int64_t > &aValue, bool expandable=false) const |
| |
| std::vector< uint64_t > | getUint64Vector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< uint64_t > | getUint64Vector (const std::string &aKey, const std::vector< uint64_t > &aValue, bool expandable=false) const |
| |
| std::vector< size_t > | getSizeTVector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< float > | getFloatVector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< float > | getFloatVector (const std::string &aKey, const std::vector< float > &aValue, bool expandable=false) const |
| |
| std::vector< double > | getDoubleVector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< double > | getDoubleVector (const std::string &aKey, const std::vector< double > &aValue, bool expandable=false) const |
| |
| std::vector< std::string > | getStringVector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< std::string > | getStringVector (const std::string &aKey, const std::vector< std::string > &aValue, bool expandable=false) const |
| |
| std::vector< time_t > | getTimeVector (const std::string &aKey, bool expandable=false) const |
| |
| std::vector< time_t > | getTimeVector (const std::string &aKey, const std::vector< time_t > &aValue, bool expandable=false) const |
| |
Implements a map of Key-Value pairs.
The ParameterSet class is a key-value implementation of the type map<string, string>. This means that values are stored as a string which allows easy merging and splitting of ParameterSets because no conversions have to be done. A couple of getXxx routines are provided to convert the strings to the desired type.