![]() |
Chemical Data Processing Library Python API - Version 1.2.3
|
An unique lookup key for control-parameter and property values. More...
Inheritance diagram for CDPL.Base.LookupKey:Public Member Functions | |
| None | __init__ (LookupKey key) |
| Initializes a copy of the LookupKey instance key. More... | |
| int | getID () |
Returns the unique numeric identifier associated with the LookupKey instance. More... | |
| LookupKey | assign (LookupKey key) |
Replaces the current state of self with a copy of the state of the LookupKey instance key. More... | |
| str | getName () |
Returns the name of the LookupKey instance. More... | |
| None | setName (str name) |
Sets the name of the LookupKey instance. More... | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
| bool | __lt__ (LookupKey key) |
| Less than comparison operator. More... | |
| bool | __eq__ (LookupKey key) |
| Equality comparison operator. More... | |
| bool | __ne__ (LookupKey key) |
| Inequality comparison operator. More... | |
| str | __str__ () |
| Returns a string representation of the LookupKey instance. More... | |
Static Public Member Functions | |
| LookupKey | create (str name) |
Creates a new unique LookupKey instance and registers it under the specified name. More... | |
Static Public Attributes | |
| NONE = LookupKey('NONE') | |
| Used to denote an invalid, unused or unspecified key. | |
Properties | |
| objectID = property(getObjectID) | |
| numericID = property(getID) | |
| name = property(getName, setName) | |
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.
| None CDPL.Base.LookupKey.__init__ | ( | LookupKey | key | ) |
Initializes a copy of the LookupKey instance key.
| key | The LookupKey instance to copy. |
|
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. | int CDPL.Base.LookupKey.getID | ( | ) |
Replaces the current state of self with a copy of the state of the LookupKey instance key.
| key | The LookupKey instance to copy. |
| str CDPL.Base.LookupKey.getName | ( | ) |
Returns the name of the LookupKey instance.
LookupKey instance.| Base.ItemNotFound | if the requested name could not be found. |
| None CDPL.Base.LookupKey.setName | ( | str | name | ) |
| int CDPL.Base.LookupKey.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python LookupKey instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two LookupKey instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().
| bool CDPL.Base.LookupKey.__lt__ | ( | LookupKey | key | ) |
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. | bool CDPL.Base.LookupKey.__eq__ | ( | LookupKey | key | ) |
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. | bool CDPL.Base.LookupKey.__ne__ | ( | LookupKey | key | ) |
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. | str CDPL.Base.LookupKey.__str__ | ( | ) |
Returns a string representation of the LookupKey instance.