![]() |
Chemical Data Processing Library C++ API - Version 1.2.3
|
An unique lookup key for control-parameter and property values. More...
#include <LookupKey.hpp>
Classes | |
| struct | HashFunc |
A functor class implementing the generation of hash codes for LookupKey instances. More... | |
Public Member Functions | |
| void | setName (const std::string &name) const |
Sets the name of the LookupKey instance. More... | |
| const std::string & | getName () const |
Returns the name of the LookupKey instance. More... | |
| std::size_t | getID () const |
Returns the unique numeric identifier associated with the LookupKey instance. More... | |
| bool | operator< (const LookupKey &key) const |
| Less than comparison operator. More... | |
| bool | operator== (const LookupKey &key) const |
| Equality comparison operator. More... | |
| bool | operator!= (const LookupKey &key) const |
| Inequality comparison operator. More... | |
Static Public Member Functions | |
| static LookupKey | create (const std::string &name) |
Creates a new unique LookupKey instance and registers it under the specified name. More... | |
Static Public Attributes | |
| static const LookupKey | NONE |
| Used to denote an invalid, unused or unspecified key. More... | |
An unique lookup key for control-parameter and property values.
LookupKey has a private default constructor and a public copy constructor. The creation of not copy constructed new instances is only possible by the method create(const std::string& name). LookupKey instances created by this method are guaranteed to be unique (given that the internal instance counter of type std::size_t does not overflow), i.e. the created instance is not a copy of an existing key and does not compare equal to any instance created before or afterwards.
|
static |
Creates a new unique LookupKey instance and registers it under the specified name.
LookupKey instances created by this method are guaranteed to be unique (given that the internal instance counter of type std::size_t does not overflow), i.e. the instance is not a copy of an existing key and does not compare equal to any instance created before or afterwards.
| name | The name of the LookupKey instance. |
LookupKey instance. | void CDPL::Base::LookupKey::setName | ( | const std::string & | name | ) | const |
Sets the name of the LookupKey instance.
| name | The new name of the LookupKey instance. |
| const std::string& CDPL::Base::LookupKey::getName | ( | ) | const |
Returns the name of the LookupKey instance.
LookupKey instance. | Base::ItemNotFound | if the requested name could not be found. |
|
inline |
Returns the unique numeric identifier associated with the LookupKey instance.
LookupKey instance. Less than comparison operator.
| key | The other LookupKey instance to be compared with. |
true if the numeric identifier of this instance is smaller than the identifier of key, and false otherwise. Equality comparison operator.
| key | The other LookupKey instance to be compared with. |
true if the numeric identifiers of the keys are equal, and false otherwise. Inequality comparison operator.
| key | The other LookupKey instance to be compared with. |
true if the numeric identifiers of the keys are not equal, and false otherwise.
|
static |
Used to denote an invalid, unused or unspecified key.