![]() |
Dataflow Runtime API
3.0.3.0
|
Template class that can be used to register a string/object pair. More...
#include <Imt.Base.OS.WinEC7/Registry.h>
Public Types | |
| typedef std::map< KeyType, ValueType > | MapValues |
| Gets the underlying map. More... | |
| typedef MapValues::iterator | MapValueIterator |
| typedef MapValues::const_iterator | MapValueConstIterator |
Public Member Functions | |
| Registry (void) | |
| Constructor. More... | |
| virtual | ~Registry (void) |
| Destructor. More... | |
| Registry (const Registry &rhs) | |
| Copy constructor. More... | |
| Registry & | operator= (const Registry &rhs) |
| Assignment operator. More... | |
| bool | registerValue (const KeyType &key, const ValueType &value) |
| Registers a value of type ValueType within this registry. More... | |
| bool | getValue (const KeyType &key, ValueType &value) const |
| Returns the rgistered value for the given key. More... | |
| bool | isRegistered (const KeyType &key) const |
| Checks if a value is registered under the given key. More... | |
| ValueType | getValue (const KeyType &key, const ValueType &defaultValue) const |
| Returns the registered value for the given key, or the default value, if no registered value exists. More... | |
| bool | unregisterValue (const KeyType &key) |
| Removes the value with the given key from this registry. More... | |
| MapValues & | getMap (void) |
| const MapValues & | getMap (void) const |
Template class that can be used to register a string/object pair.
This implementation asserts to return false if a value is already defined (after a put) or of a value is not found (after a get).
| typedef MapValues::const_iterator imt::base::os::winec7::Registry< KeyType, ValueType >::MapValueConstIterator |
| typedef MapValues::iterator imt::base::os::winec7::Registry< KeyType, ValueType >::MapValueIterator |
| typedef std::map<KeyType, ValueType> imt::base::os::winec7::Registry< KeyType, ValueType >::MapValues |
Gets the underlying map.
|
explicit |
Constructor.
|
virtual |
Destructor.
|
inline |
Copy constructor.
| imt::base::os::winec7::Registry< KeyType, ValueType >::MapValues & imt::base::os::winec7::Registry< KeyType, ValueType >::getMap | ( | void | ) |
| const imt::base::os::winec7::Registry< KeyType, ValueType >::MapValues & imt::base::os::winec7::Registry< KeyType, ValueType >::getMap | ( | void | ) | const |
| ValueType imt::base::os::winec7::Registry< KeyType, ValueType >::getValue | ( | const KeyType & | key, |
| const ValueType & | defaultValue | ||
| ) | const |
Returns the registered value for the given key, or the default value, if no registered value exists.
| key | The key of the value |
| defaultValue | The default value |
| bool imt::base::os::winec7::Registry< KeyType, ValueType >::getValue | ( | const KeyType & | key, |
| ValueType & | value | ||
| ) | const |
Returns the rgistered value for the given key.
| key | The key of the value |
| value | The returned value |
| bool imt::base::os::winec7::Registry< KeyType, ValueType >::isRegistered | ( | const KeyType & | key | ) | const |
Checks if a value is registered under the given key.
| key | The key of the value |
|
inline |
Assignment operator.
| bool imt::base::os::winec7::Registry< KeyType, ValueType >::registerValue | ( | const KeyType & | key, |
| const ValueType & | value | ||
| ) |
Registers a value of type ValueType within this registry.
| key | The key of the value |
| value | The value to register |
| bool imt::base::os::winec7::Registry< KeyType, ValueType >::unregisterValue | ( | const KeyType & | key | ) |
Removes the value with the given key from this registry.
| key | The key of the value |