MADNESS  version 0.9
Public Member Functions | Friends | List of all members
madness::TaggedKey< Key, Tag > Class Template Reference

Key object that uses a tag to differentiate keys. More...

#include <dist_keys.h>

Public Member Functions

 TaggedKey ()
 Default constructor. More...
 
 TaggedKey (const Key &key)
 Constructor. More...
 
 TaggedKey (const TaggedKey< Key, Tag > &other)
 Copy constructor. More...
 
TaggedKey< Key, Tag > & operator= (const TaggedKey< Key, Tag > &other)
 Copy assignment operator. More...
 
const Keykey () const
 Base key accessor. More...
 
bool operator== (const TaggedKey< Key, Tag > &other) const
 Equality comparison. More...
 
bool operator!= (const TaggedKey< Key, Tag > &other) const
 Inequality comparison. More...
 
template<typename Archive >
void serialize (const Archive &ar)
 Serialize this key. More...
 

Friends

hashT hash_value (const TaggedKey< Key, Tag > &key)
 Hashing function. More...
 

Detailed Description

template<typename Key, typename Tag>
class madness::TaggedKey< Key, Tag >

Key object that uses a tag to differentiate keys.

Template Parameters
KeyThe base key type
TagA type to differentiate key types

Constructor & Destructor Documentation

template<typename Key, typename Tag>
madness::TaggedKey< Key, Tag >::TaggedKey ( )
inline

Default constructor.

template<typename Key, typename Tag>
madness::TaggedKey< Key, Tag >::TaggedKey ( const Key key)
inline

Constructor.

Parameters
keyThe base key
procThe process that generated the key
template<typename Key, typename Tag>
madness::TaggedKey< Key, Tag >::TaggedKey ( const TaggedKey< Key, Tag > &  other)
inline

Copy constructor.

Parameters
otherThe key to be copied

Member Function Documentation

template<typename Key, typename Tag>
const Key& madness::TaggedKey< Key, Tag >::key ( ) const
inline

Base key accessor.

Returns
The base key
template<typename Key, typename Tag>
bool madness::TaggedKey< Key, Tag >::operator!= ( const TaggedKey< Key, Tag > &  other) const
inline

Inequality comparison.

Parameters
otherThe key to be compared to this
Returns
true when other key or other process are not equal to that of this key, otherwise false.
template<typename Key, typename Tag>
TaggedKey<Key, Tag>& madness::TaggedKey< Key, Tag >::operator= ( const TaggedKey< Key, Tag > &  other)
inline

Copy assignment operator.

Parameters
otherThe key to be copied
Returns
A reference to this object
template<typename Key, typename Tag>
bool madness::TaggedKey< Key, Tag >::operator== ( const TaggedKey< Key, Tag > &  other) const
inline

Equality comparison.

Parameters
otherThe key to be compared to this
Returns
true when other key and other process are equal to that of this key, otherwise false.
template<typename Key, typename Tag>
template<typename Archive >
void madness::TaggedKey< Key, Tag >::serialize ( const Archive &  ar)
inline

Serialize this key.

Template Parameters
ArchiveThe archive type
Parameters
arThe archive object that will serialize this object

Friends And Related Function Documentation

template<typename Key, typename Tag>
hashT hash_value ( const TaggedKey< Key, Tag > &  key)
friend

Hashing function.

Parameters
keyThe key to be hashed
Returns
The hashed key value

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