|
QDP++
|
A wrapper over maps. More...
#include <qdp_map_obj_memory.h>
Public Types | |
| typedef K | key_type |
| Re-export these. | |
| typedef V | mapped_type |
| typedef std::pair< K, V > | value_type |
| typedef MapObjectMemoryIterator< K, V > | const_iterator |
| typedef std::unordered_map< std::string, value_type > | MapType_t |
| Map type convenience. | |
Public Member Functions | |
| MapObjectMemory () | |
| Default constructor. | |
| ~MapObjectMemory () | |
| Destructor. | |
| int | insertUserdata (const std::string &user_data_) |
| Insert user data into the metadata database. | |
| int | getUserdata (std::string &user_data_) const |
| Get user user data from the metadata database. | |
| int | insert (const K &key, const V &val) |
| Insert. | |
| template<typename InputIterator> | |
| int | insert (InputIterator first, InputIterator last) |
| Insert from iterators. | |
| int | insert (const value_type &vv) |
| Insert. | |
| int | get (const K &key, V &val) const |
| Getter. | |
| void | erase (const K &key) |
| Erase a key-value. | |
| void | clear () |
| Clear the object. | |
| void | flush () |
| Flush out state of object. | |
| bool | exist (const K &key) const |
| Exists? | |
| unsigned int | size () const |
| The number of elements. | |
| void | keys (std::vector< K > &_keys) const |
| Dump keys. | |
| virtual void | keysAndValues (std::vector< K > &_keys, std::vector< V > &_vals) const |
| Dump keys and values. | |
| const V & | operator[] (const K &key) const |
| Getter. | |
| V & | operator[] (const K &key) |
| Setter. | |
| virtual const_iterator | begin () const |
| Begin loop over keys. | |
| virtual const_iterator | end () const |
| End loop over keys. | |
| Public Member Functions inherited from QDP::MapObject< K, V > | |
| virtual | ~MapObject () |
| Virtual Destructor. | |
Protected Attributes | |
| MapType_t | src_map |
| Map of objects. | |
| std::string | user_data |
| Metadata. | |
A wrapper over maps.
Definition at line 66 of file qdp_map_obj_memory.h.
| typedef MapObjectMemoryIterator<K,V> QDP::MapObjectMemory< K, V >::const_iterator |
Definition at line 73 of file qdp_map_obj_memory.h.
| typedef K QDP::MapObjectMemory< K, V >::key_type |
Re-export these.
Definition at line 70 of file qdp_map_obj_memory.h.
| typedef V QDP::MapObjectMemory< K, V >::mapped_type |
Definition at line 71 of file qdp_map_obj_memory.h.
| typedef std::unordered_map<std::string, value_type> QDP::MapObjectMemory< K, V >::MapType_t |
Map type convenience.
Definition at line 76 of file qdp_map_obj_memory.h.
| typedef std::pair<K,V> QDP::MapObjectMemory< K, V >::value_type |
Definition at line 72 of file qdp_map_obj_memory.h.
|
inline |
Default constructor.
Definition at line 79 of file qdp_map_obj_memory.h.
|
inline |
Destructor.
Definition at line 82 of file qdp_map_obj_memory.h.
|
inlinevirtual |
Begin loop over keys.
Definition at line 238 of file qdp_map_obj_memory.h.
References src_map.
Referenced by QDP::write().
|
inline |
|
inlinevirtual |
End loop over keys.
Definition at line 241 of file qdp_map_obj_memory.h.
References src_map.
Referenced by QDP::write().
|
inline |
Erase a key-value.
Definition at line 152 of file qdp_map_obj_memory.h.
References src_map, QDP::BinaryBufferWriter::str(), and QDP::write().
|
inlinevirtual |
Exists?
Implements QDP::MapObject< K, V >.
Definition at line 171 of file qdp_map_obj_memory.h.
References src_map, QDP::BinaryBufferWriter::str(), and QDP::write().
|
inlinevirtual |
Flush out state of object.
Implements QDP::MapObject< K, V >.
Definition at line 168 of file qdp_map_obj_memory.h.
|
inlinevirtual |
Getter.
Implements QDP::MapObject< K, V >.
Definition at line 135 of file qdp_map_obj_memory.h.
References src_map, QDP::BinaryBufferWriter::str(), and QDP::write().
|
inlinevirtual |
Get user user data from the metadata database.
Implements QDP::MapObject< K, V >.
Definition at line 92 of file qdp_map_obj_memory.h.
References user_data.
|
inlinevirtual |
Insert.
Implements QDP::MapObject< K, V >.
Definition at line 99 of file qdp_map_obj_memory.h.
References insert().
Referenced by insert(), insert(), and QDP::read().
|
inline |
Insert.
Definition at line 115 of file qdp_map_obj_memory.h.
References src_map, QDP::BinaryBufferWriter::str(), and QDP::write().
|
inline |
|
inlinevirtual |
Insert user data into the metadata database.
Implements QDP::MapObject< K, V >.
Definition at line 85 of file qdp_map_obj_memory.h.
References user_data.
|
inlinevirtual |
Dump keys.
Implements QDP::MapObject< K, V >.
Definition at line 183 of file qdp_map_obj_memory.h.
References src_map.
|
inlinevirtual |
|
inline |
Setter.
Definition at line 222 of file qdp_map_obj_memory.h.
References src_map, QDP::BinaryBufferWriter::str(), and QDP::write().
|
inline |
Getter.
Definition at line 206 of file qdp_map_obj_memory.h.
References src_map, QDP::BinaryBufferWriter::str(), and QDP::write().
|
inlinevirtual |
The number of elements.
Implements QDP::MapObject< K, V >.
Definition at line 180 of file qdp_map_obj_memory.h.
References src_map.
|
mutableprotected |
Map of objects.
Definition at line 246 of file qdp_map_obj_memory.h.
Referenced by begin(), clear(), end(), erase(), exist(), get(), insert(), keys(), keysAndValues(), operator[](), operator[](), and size().
|
protected |
Metadata.
Definition at line 249 of file qdp_map_obj_memory.h.
Referenced by getUserdata(), and insertUserdata().