Public Member Functions

key_value_pair_interface< ObjectType > Class Template Reference

The interface for type-erasued key-value type pairs on a certain element. More...

#include <key_value_pair.hpp>

Inheritance diagram for key_value_pair_interface< ObjectType >:
key_value_pair_wrapper< KeyType, DataType, ObjectType >

Public Member Functions

virtual ~key_value_pair_interface ()
 A virtual destructor as recommended for abstract classes.
virtual void copy (ObjectType const &src, ObjectType const &dest) const =0
 Copy data from one object to another.
virtual void erase (ObjectType const &src) const =0
 Erase data for the particular object.
virtual bool operator== (key_value_pair_interface< ObjectType > const &) const =0
 Compare key-value-pairs for the same template arguments.

Detailed Description

template<typename ObjectType>
class viennadata::key_value_pair_interface< ObjectType >

The interface for type-erasued key-value type pairs on a certain element.

Refer to Alexandrescu, "Modern C++ Design" for details on type erasure

Template Parameters:
object_type The type of the object the data is associated with

Constructor & Destructor Documentation

virtual ~key_value_pair_interface (  )  [inline, virtual]

A virtual destructor as recommended for abstract classes.


Member Function Documentation

virtual void copy ( ObjectType const &  src,
ObjectType const &  dest 
) const [pure virtual]

Copy data from one object to another.

Implemented in key_value_pair_wrapper< KeyType, DataType, ObjectType >.

virtual void erase ( ObjectType const &  src  )  const [pure virtual]

Erase data for the particular object.

Implemented in key_value_pair_wrapper< KeyType, DataType, ObjectType >.

virtual bool operator== ( key_value_pair_interface< ObjectType > const &   )  const [pure virtual]

Compare key-value-pairs for the same template arguments.

Implemented in key_value_pair_wrapper< KeyType, DataType, ObjectType >.


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