Template class that can be used to register a string/object pair.
More...
#include <Imt.Base.OS.WinEC7/Registry.h>
|
typedef std::map< KeyType, ValueType > | MapValues |
| Gets the underlying map.
|
|
typedef MapValues::iterator | MapValueIterator |
|
typedef MapValues::const_iterator | MapValueConstIterator |
|
|
| Registry (void) |
| Constructor.
|
|
virtual | ~Registry (void) |
| Destructor.
|
|
| Registry (const Registry &rhs) |
| Copy constructor.
|
|
Registry & | operator= (const Registry &rhs) |
| Assignment operator.
|
|
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<typename KeyType, typename ValueType>
class imt::base::os::winec7::Registry< KeyType, ValueType >
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).
◆ getValue() [1/2]
template<typename KeyType , typename ValueType >
Returns the registered value for the given key, or the default value, if no registered value exists.
- Parameters
-
key | The key of the value |
defaultValue | The default value |
- Returns
- The registered value
◆ getValue() [2/2]
template<typename KeyType , typename ValueType >
Returns the rgistered value for the given key.
- Parameters
-
key | The key of the value |
value | The returned value |
- Returns
- True if successful, false otherwhise.
◆ isRegistered()
template<typename KeyType , typename ValueType >
Checks if a value is registered under the given key.
- Parameters
-
- Returns
- True if a value is registered under the given key.
◆ registerValue()
template<typename KeyType , typename ValueType >
Registers a value of type ValueType within this registry.
- Parameters
-
key | The key of the value |
value | The value to register |
- Returns
- True if successful, false otherwhise.
◆ unregisterValue()
template<typename KeyType , typename ValueType >
Removes the value with the given key from this registry.
- Parameters
-
- Returns
- True if successful, false otherwhise.
The documentation for this class was generated from the following file:
- D:/_Work/10/s/Imt.Base/Imt.Base.OS.WinEC7/Registry.h