Jpp
|
Template interface definition for associative collection of elements. More...
#include <JMappableCollection.hh>
Public Types | |
typedef JKey_t | key_type |
typedef JValue_t | mapped_type |
Public Member Functions | |
virtual | ~JMappableCollection () |
Virtual destructor. More... | |
virtual void | clear ()=0 |
Clear. More... | |
virtual const mapped_type & | get (typename JClass< key_type >::argument_type key) const =0 |
Get mapped value. More... | |
virtual mapped_type & | get (typename JClass< key_type >::argument_type key)=0 |
Get mapped value. More... | |
const mapped_type & | operator[] (typename JClass< key_type >::argument_type key) const |
Get mapped value. More... | |
mapped_type & | operator[] (typename JClass< key_type >::argument_type key) |
Get mapped value. More... | |
void | put (typename JClass< key_type >::argument_type key, typename JClass< mapped_type >::argument_type value) |
Put pair-wise element (key,value) into collection. More... | |
Template interface definition for associative collection of elements.
The concrete associative collection should implement the following methods.
void clear();
mapped_type& get(key_type key);
This class implements the operator [key_type key]
and method put(key_type key, mapped_type value)
.
Definition at line 30 of file JMappableCollection.hh.
typedef JKey_t JTOOLS::JMappableCollection< JKey_t, JValue_t >::key_type |
Definition at line 33 of file JMappableCollection.hh.
typedef JValue_t JTOOLS::JMappableCollection< JKey_t, JValue_t >::mapped_type |
Definition at line 34 of file JMappableCollection.hh.
|
inlinevirtual |
|
pure virtual |
Clear.
Implemented in JTOOLS::JCollection< JElement_t, JDistance_t >, JTOOLS::JCollection< JElement2D< JKey_t, JValue_t >, JDistance_t >, JTOOLS::JCollection< JElement2D_t >, JTOOLS::JCollection< JElement2D< JKey_t, JHistogram_t >, JDistance_t >, JTOOLS::JHashMap< JKey_t, JValue_t, JEvaluator_t >, JTOOLS::JHashMap< JHead_t, JValue_t, JEvaluator_t >, JTOOLS::JHashMap< int, JModuleSignalProcessor >, JTOOLS::JHashMap< JEKey, JEmitter >, JTOOLS::JHashMap< int, JString >, JTOOLS::JHashMap< JHead_t, JHashMap< JTail_t, JValue_t, JEvaluator_t >, JEvaluator_t >, JTOOLS::JHashMap< JACOUSTICS::JEKey, JACOUSTICS::JModel::JEmitter >, JTOOLS::JHashMap< int, JFloor >, and JTOOLS::JGarbageCollection< JKey_t, JValue_t >.
|
pure virtual |
Get mapped value.
key | key |
Implemented in JTOOLS::JCollection< JElement_t, JDistance_t >, JTOOLS::JHashMap< JKey_t, JValue_t, JEvaluator_t >, JTOOLS::JHashMap< JHead_t, JValue_t, JEvaluator_t >, JTOOLS::JHashMap< int, JModuleSignalProcessor >, JTOOLS::JHashMap< JEKey, JEmitter >, JTOOLS::JHashMap< int, JString >, JTOOLS::JHashMap< JHead_t, JHashMap< JTail_t, JValue_t, JEvaluator_t >, JEvaluator_t >, JTOOLS::JHashMap< JACOUSTICS::JEKey, JACOUSTICS::JModel::JEmitter >, JTOOLS::JHashMap< int, JFloor >, and JTOOLS::JGarbageCollection< JKey_t, JValue_t >.
|
pure virtual |
Get mapped value.
key | key |
Implemented in JTOOLS::JCollection< JElement_t, JDistance_t >, JTOOLS::JHashMap< JKey_t, JValue_t, JEvaluator_t >, JTOOLS::JHashMap< JHead_t, JValue_t, JEvaluator_t >, JTOOLS::JHashMap< int, JModuleSignalProcessor >, JTOOLS::JHashMap< JEKey, JEmitter >, JTOOLS::JHashMap< int, JString >, JTOOLS::JHashMap< JHead_t, JHashMap< JTail_t, JValue_t, JEvaluator_t >, JEvaluator_t >, JTOOLS::JHashMap< JACOUSTICS::JEKey, JACOUSTICS::JModel::JEmitter >, JTOOLS::JHashMap< int, JFloor >, and JTOOLS::JGarbageCollection< JKey_t, JValue_t >.
|
inline |
Get mapped value.
key | key |
Definition at line 73 of file JMappableCollection.hh.
|
inline |
Get mapped value.
key | key |
Definition at line 85 of file JMappableCollection.hh.
|
inline |
Put pair-wise element (key,value) into collection.
key | key |
value | value |
Definition at line 97 of file JMappableCollection.hh.