QDP++
QDP::MapObject< K, V > Class Template Referenceabstract

A wrapper over maps. More...

#include <qdp_map_obj.h>

Inheritance diagram for QDP::MapObject< K, V >:
QDP::MapObjectDisk< K, V > QDP::MapObjectMemory< K, V > QDP::MapObjectNull< K, V >

Public Member Functions

virtual ~MapObject ()
 Virtual Destructor.
virtual bool exist (const K &key) const =0
virtual int insert (const K &key, const V &val)=0
 Insert.
virtual int get (const K &key, V &val) const =0
 Other accessor.
virtual void flush ()=0
 Flush out state of object.
virtual unsigned int size () const =0
 Size of Map.
virtual void keys (std::vector< K > &keys_) const =0
virtual int insertUserdata (const std::string &user_data)=0
 Insert user data into the metadata database.
virtual int getUserdata (std::string &user_data) const =0
 Get user user data from the metadata database.

Detailed Description

template<typename K, typename V>
class QDP::MapObject< K, V >

A wrapper over maps.

Definition at line 20 of file qdp_map_obj.h.

Constructor & Destructor Documentation

◆ ~MapObject()

template<typename K, typename V>
virtual QDP::MapObject< K, V >::~MapObject ( )
inlinevirtual

Virtual Destructor.

Definition at line 25 of file qdp_map_obj.h.

Member Function Documentation

◆ exist()

template<typename K, typename V>
virtual bool QDP::MapObject< K, V >::exist ( const K & key) const
pure virtual

Does this key exist in the store

Parameters
keya key object
Returns
true if the answer is yes

Implemented in QDP::MapObjectDisk< K, V >, QDP::MapObjectMemory< K, V >, and QDP::MapObjectNull< K, V >.

◆ flush()

template<typename K, typename V>
virtual void QDP::MapObject< K, V >::flush ( )
pure virtual

◆ get()

template<typename K, typename V>
virtual int QDP::MapObject< K, V >::get ( const K & key,
V & val ) const
pure virtual

◆ getUserdata()

template<typename K, typename V>
virtual int QDP::MapObject< K, V >::getUserdata ( std::string & user_data) const
pure virtual

Get user user data from the metadata database.

Implemented in QDP::MapObjectDisk< K, V >, QDP::MapObjectMemory< K, V >, and QDP::MapObjectNull< K, V >.

◆ insert()

template<typename K, typename V>
virtual int QDP::MapObject< K, V >::insert ( const K & key,
const V & val )
pure virtual

◆ insertUserdata()

template<typename K, typename V>
virtual int QDP::MapObject< K, V >::insertUserdata ( const std::string & user_data)
pure virtual

Insert user data into the metadata database.

Implemented in QDP::MapObjectDisk< K, V >, QDP::MapObjectMemory< K, V >, and QDP::MapObjectNull< K, V >.

◆ keys()

template<typename K, typename V>
virtual void QDP::MapObject< K, V >::keys ( std::vector< K > & keys_) const
pure virtual

Return all available keys to user

Parameters
keysuser suppled an empty vector which is populated by keys after this call.

Implemented in QDP::MapObjectDisk< K, V >, QDP::MapObjectMemory< K, V >, and QDP::MapObjectNull< K, V >.

◆ size()

template<typename K, typename V>
virtual unsigned int QDP::MapObject< K, V >::size ( ) const
pure virtual

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