Essentia
2.1-beta6-dev
|
#include <types.h>
Public Types | |
typedef std::map< KeyType, ValueType, Compare > | BaseClass |
Public Member Functions | |
ValueType & | operator[] (const KeyType &key) |
const ValueType & | operator[] (const KeyType &key) const |
std::pair< typename BaseClass::iterator, bool > | insert (const KeyType &key, const ValueType &value) |
std::vector< std::string > | keys () const |
Special version of a std::map that allows us to use the [] operator on a const object. In this case, if the key is found, it returns the associated value, otherwise it throws an exception. If not used on a constant object, it also throws an exception if the key is not found, in order to have a consistent behavior. It also redefines the insert() method to be more convenient.
typedef std::map<KeyType, ValueType, Compare> BaseClass |
|
inline |
|
inline |
Referenced by EssentiaMap< KeyType, ValueType, Compare >::operator[]().
|
inline |
Classic version of the map accessor.
References EssentiaMap< KeyType, ValueType, Compare >::keys().
|
inline |
New version that can be called on a constant object and instead of creating a new null object and inserting it in the map just throws an exception.
References EssentiaMap< KeyType, ValueType, Compare >::keys().