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

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

#include <distributed_id.h>

Collaboration diagram for madness::TaggedKey< Key, Tag >:
Collaboration graph
[legend]

Public Member Functions

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

Private Attributes

Key key_
 The base key type. 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

◆ TaggedKey() [1/3]

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

Default constructor.

◆ TaggedKey() [2/3]

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

Constructor.

Parameters
[in]keyThe base key.

◆ TaggedKey() [3/3]

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

Copy constructor.

Parameters
[in]otherThe key to be copied.

Member Function Documentation

◆ key()

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

Base key accessor.

Returns
The base key.

References madness::TaggedKey< Key, Tag >::key_.

Referenced by madness::operator<<().

◆ operator!=()

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

Inequality comparison.

Parameters
[in]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.

References madness::TaggedKey< Key, Tag >::key_.

◆ operator=()

template<typename Key , typename Tag >
TaggedKey<Key, Tag>& madness::TaggedKey< Key, Tag >::operator= ( const TaggedKey< Key, Tag > &  other)
inline

Copy assignment operator.

Parameters
[in]otherThe key to be copied.
Returns
A reference to this object.

References madness::TaggedKey< Key, Tag >::key_.

◆ operator==()

template<typename Key , typename Tag >
bool madness::TaggedKey< Key, Tag >::operator== ( const TaggedKey< Key, Tag > &  other) const
inline

Equality comparison.

Parameters
[in]otherThe key to be compared to this.
Returns
True when other key and other process are equal to that of this key; otherwise false.

References madness::TaggedKey< Key, Tag >::key_.

◆ serialize()

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
[in,out]arThe archive object that will serialize this object.

References madness::TaggedKey< Key, Tag >::key_.

Friends And Related Function Documentation

◆ hash_value

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

Hashing function.

Parameters
[in]keyThe key to be hashed.
Returns
The hashed key value.

Member Data Documentation

◆ key_

template<typename Key , typename Tag >
Key madness::TaggedKey< Key, Tag >::key_
private

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