public

Inheritance Graph

graph BT
	Registry
	click Registry "classUtil_1_1Registry"

Description

Registry for indistinguishable elements.

Registry for elements that cannot be compared withoperator==()(e.g., functions created with std::bind). The registration of an element returns a handle. The handle has to be used to cancel the registration of the element.

Parameters

container_t
Container that will be used to store the registered elements. Calling the container’s insert and erase functions must not invalidate any iterators (except that of the erased element). Therefore, std::list and std::multiset can be used here. If a std::multiset is used, the elements have to be comparable withoperator<().

Author: Benjamin Eikel

Date: 2013-11-21

Public Types

   
   
typedef container_t::value_type element_t
Type of elements that are stored in the registry.
   
typedef RegistryHandle < container_t > handle_t
Handle to a registered element. Required to unregister the element.

Public Functions

   
   
handle_t registerElement( element_t element)
   
void unregisterElement( handle_t handle)
   
const container_t & getElements() const
Access the currently registered elements.
   
container_t getElementsCopy() const
Get a copy of the currently registered elements.

Documentation

typedef
Util::Registry::element_t

public
 
 
typedef container_t::value_type element_t

Type of elements that are stored in the registry.

Defined in Util/Registry.h:74


typedef
Util::Registry::handle_t

public
 
 
typedef RegistryHandle < container_t > handle_t

Handle to a registered element. Required to unregister the element.

Defined in Util/Registry.h:77


function
Util::Registry::registerElement

public inline
     
     
handle_t registerElement( element_t element )

Register an element.

Parameters

element
Element that will be registered.

Returns

Handle to the element that has been registered. The handle is required to unregister the element.

Defined in Util/Registry.h:86


function
Util::Registry::unregisterElement

public inline
     
     
void unregisterElement( handle_t handle )

Cancel the registration of an element.

Parameters

handle
Handle to the element that has been generated by a call to registerElement() .

Defined in Util/Registry.h:97


function
Util::Registry::getElements

public const inline
   
   
const container_t & getElements( ) const

Access the currently registered elements.

Defined in Util/Registry.h:102


function
Util::Registry::getElementsCopy

public const inline
   
   
container_t getElementsCopy( ) const

Get a copy of the currently registered elements.

Defined in Util/Registry.h:107