MADNESS 0.10.1
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 >:

Public Member Functions

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

Private Attributes

Key key_
 The base key type.

Friends

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

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.

References key_.

Referenced by TaggedKey(), hash_value, operator!=(), operator=(), and operator==().

◆ TaggedKey() [2/3]

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

Constructor.

Parameters
[in]keyThe base key.

References key(), and 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.

References TaggedKey(), and key_.

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 key_.

Referenced by TaggedKey(), hash_value, and 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 TaggedKey(), and 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 TaggedKey(), and 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 TaggedKey(), and 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 key_.

◆ 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.

References TaggedKey(), and key().

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: