Public Member Functions

key_value_pair_wrapper< KeyType, DataType, ObjectType > Class Template Reference

A dispatch facility that unwraps type-erasued key-value type pairs. More...

#include <key_value_pair.hpp>

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

Public Member Functions

void copy (ObjectType const &src, ObjectType const &dest) const
 Forwards the copy request to the data container.
void erase (ObjectType const &src) const
 Forwards the erase request to the data container.
bool operator== (key_value_pair_interface< ObjectType > const &other) const
 Compares two key-value type erased pairs. Takes also the all-quantifier into account.

Detailed Description

template<typename KeyType, typename DataType, typename ObjectType>
class viennadata::key_value_pair_wrapper< KeyType, DataType, ObjectType >

A dispatch facility that unwraps type-erasued key-value type pairs.

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

Template Parameters:
key_type The type of the key used for access
value_type Type of the data that is stored for the element
object_type The type of the object the data is associated with

Member Function Documentation

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

Forwards the copy request to the data container.

Implements key_value_pair_interface< ObjectType >.

void erase ( ObjectType const &  src  )  const [inline, virtual]

Forwards the erase request to the data container.

Implements key_value_pair_interface< ObjectType >.

bool operator== ( key_value_pair_interface< ObjectType > const &  other  )  const [inline, virtual]

Compares two key-value type erased pairs. Takes also the all-quantifier into account.

A comparison of <key1, value1> with <key2, value2> will yield false unless key1==key2 and value1==value2 A comparison of <key1, all> with <key2, value2> will yield false unless key1==key2. A comparison of <all, value1> with <key2, value2> will yield false unless value1==value2. A comparison of <all, all> with <key2, value2> always returns true

Parameters:
other The other type-erased key-value pair

Implements key_value_pair_interface< ObjectType >.


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