Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
MapDelegate< C, I, T, D > Class Template Reference

#include <elm/delegate.h>

Public Member Functions

 MapDelegate (C &container, const I &identifier)
 
 MapDelegate (const MapDelegate &delegate)
 
 operator T (void) const
 
const T & operator* (void) const
 
MapDelegate< C, I, T > & operator= (const T &value)
 
MapDelegate< C, I, T > & operator= (const MapDelegate< C, I, T > &delegate)
 

Detailed Description

template<class C, class I, class T, class D = Default<T>>
class elm::MapDelegate< C, I, T, D >

A delegate to reference item of concept::MutableMap.

Parameters
CType of the container.
IType of the identifier.
TType of the item.
DType to get the default value (as the get() operation requires a default value, default to Default class with a value of 0).

Constructor & Destructor Documentation

◆ MapDelegate() [1/2]

MapDelegate ( C &  container,
const I &  identifier 
)
inline

Build a delegate for an item of a map.

Parameters
containerItem container map.
identifierItem map identifier.

◆ MapDelegate() [2/2]

MapDelegate ( const MapDelegate< C, I, T, D > &  delegate)
inline

Build a delegate by cloning.

Parameters
delegateDelegate to clone.

Member Function Documentation

◆ operator T()

operator T ( void  ) const
inline

◆ operator*()

const T& operator* ( void  ) const
inline

◆ operator=() [1/2]

MapDelegate<C, I, T>& operator= ( const MapDelegate< C, I, T > &  delegate)
inline

◆ operator=() [2/2]

MapDelegate<C, I, T>& operator= ( const T &  value)
inline

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