Dataflow Runtime API  3.0.3.0
Public Types | Public Member Functions | List of all members
imt::base::os::winec7::Registry< KeyType, ValueType > Class Template Reference

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...
 
Registryoperator= (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...
 
MapValuesgetMap (void)
 
const MapValuesgetMap (void) const
 

Detailed Description

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).

Member Typedef Documentation

◆ MapValueConstIterator

template<typename KeyType , typename ValueType >
typedef MapValues::const_iterator imt::base::os::winec7::Registry< KeyType, ValueType >::MapValueConstIterator

◆ MapValueIterator

template<typename KeyType , typename ValueType >
typedef MapValues::iterator imt::base::os::winec7::Registry< KeyType, ValueType >::MapValueIterator

◆ MapValues

template<typename KeyType , typename ValueType >
typedef std::map<KeyType, ValueType> imt::base::os::winec7::Registry< KeyType, ValueType >::MapValues

Gets the underlying map.

Constructor & Destructor Documentation

◆ Registry() [1/2]

template<typename KeyType , typename ValueType >
imt::base::os::winec7::Registry< KeyType, ValueType >::Registry ( void  )
explicit

Constructor.

◆ ~Registry()

template<typename KeyType , typename ValueType >
imt::base::os::winec7::Registry< KeyType, ValueType >::~Registry ( void  )
virtual

Destructor.

◆ Registry() [2/2]

template<typename KeyType , typename ValueType >
imt::base::os::winec7::Registry< KeyType, ValueType >::Registry ( const Registry< KeyType, ValueType > &  rhs)
inline

Copy constructor.

Member Function Documentation

◆ getMap() [1/2]

template<typename KeyType , typename ValueType >
imt::base::os::winec7::Registry< KeyType, ValueType >::MapValues & imt::base::os::winec7::Registry< KeyType, ValueType >::getMap ( void  )

◆ getMap() [2/2]

template<typename KeyType , typename ValueType >
const imt::base::os::winec7::Registry< KeyType, ValueType >::MapValues & imt::base::os::winec7::Registry< KeyType, ValueType >::getMap ( void  ) const

◆ getValue() [1/2]

template<typename KeyType , typename ValueType >
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.

Parameters
keyThe key of the value
defaultValueThe default value
Returns
The registered value

◆ getValue() [2/2]

template<typename KeyType , typename ValueType >
bool imt::base::os::winec7::Registry< KeyType, ValueType >::getValue ( const KeyType &  key,
ValueType &  value 
) const

Returns the rgistered value for the given key.

Parameters
keyThe key of the value
valueThe returned value
Returns
True if successful, false otherwhise.

◆ isRegistered()

template<typename KeyType , typename ValueType >
bool imt::base::os::winec7::Registry< KeyType, ValueType >::isRegistered ( const KeyType &  key) const

Checks if a value is registered under the given key.

Parameters
keyThe key of the value
Returns
True if a value is registered under the given key.

◆ operator=()

template<typename KeyType , typename ValueType >
Registry& imt::base::os::winec7::Registry< KeyType, ValueType >::operator= ( const Registry< KeyType, ValueType > &  rhs)
inline

Assignment operator.

◆ registerValue()

template<typename KeyType , typename ValueType >
bool imt::base::os::winec7::Registry< KeyType, ValueType >::registerValue ( const KeyType &  key,
const ValueType &  value 
)

Registers a value of type ValueType within this registry.

Parameters
keyThe key of the value
valueThe value to register
Returns
True if successful, false otherwhise.

◆ unregisterValue()

template<typename KeyType , typename ValueType >
bool imt::base::os::winec7::Registry< KeyType, ValueType >::unregisterValue ( const KeyType &  key)

Removes the value with the given key from this registry.

Parameters
keyThe key of the value
Returns
True if successful, false otherwhise.

The documentation for this class was generated from the following file: