![]() |
LIMA
Libre Multilingual Analyzer — C++ API
|
storage for double access: from object to id and from id to object : id must be integer. More...
#include <common/misc/DoubleAccessObjectToIdMap.h>
Public Types | |
| typedef std::map< const Object *, Id, CompareObjectPtr< Object > > | AccessMap |
| typedef std::vector< const Object * > | ReverseAccessMap |
Public Member Functions | |
| DoubleAccessObjectToIdMap () | |
| virtual | ~DoubleAccessObjectToIdMap () |
| Id | insert (const Object &) |
| insert an object if not already inserted | |
| const AccessMap & | getAccessMap () const |
| const ReverseAccessMap & | getReverseAccessMap () const |
| const Object & | get (const Id &) const |
| const Id & | get (const Object &) const |
| bool | hasId (const Id &) const |
| bool | hasValue (const Object &) const |
| Id & | operator[] (const Object &) |
| Object & | operator[] (const Id &) |
storage for double access: from object to id and from id to object : id must be integer.
Objects and ids cannot be of the same type
Definition at line 37 of file DoubleAccessObjectToIdMap.h.
| typedef std::map<const Object*,Id,CompareObjectPtr<Object> > Lima::Common::Misc::DoubleAccessObjectToIdMap< Object, Id >::AccessMap |
Definition at line 40 of file DoubleAccessObjectToIdMap.h.
| typedef std::vector<const Object*> Lima::Common::Misc::DoubleAccessObjectToIdMap< Object, Id >::ReverseAccessMap |
Definition at line 41 of file DoubleAccessObjectToIdMap.h.
| Lima::Common::Misc::DoubleAccessObjectToIdMap< Object, Id >::DoubleAccessObjectToIdMap | ( | ) |
|
virtual |
| const Object & Lima::Common::Misc::DoubleAccessObjectToIdMap< Object, Id >::get | ( | const Id & | ) | const |
get accessors do not try to insert object if not found: throw an exception
| const Id & Lima::Common::Misc::DoubleAccessObjectToIdMap< Object, Id >::get | ( | const Object & | ) | const |
|
inline |
Definition at line 79 of file DoubleAccessObjectToIdMap.h.
|
inline |
Definition at line 81 of file DoubleAccessObjectToIdMap.h.
| bool Lima::Common::Misc::DoubleAccessObjectToIdMap< Object, Id >::hasId | ( | const Id & | ) | const |
just check the existence of key or value in the access map
| bool Lima::Common::Misc::DoubleAccessObjectToIdMap< Object, Id >::hasValue | ( | const Object & | ) | const |
| Id Lima::Common::Misc::DoubleAccessObjectToIdMap< Object, Id >::insert | ( | const Object & | ) |
insert an object if not already inserted
| Object & Lima::Common::Misc::DoubleAccessObjectToIdMap< Object, Id >::operator[] | ( | const Id & | ) |
| Id & Lima::Common::Misc::DoubleAccessObjectToIdMap< Object, Id >::operator[] | ( | const Object & | ) |
double access [] operators