MADNESS 0.10.1
madness::ProcessKey< Key, Tag > Class Template Reference

Key object that includes the process information. More...

#include <distributed_id.h>

Collaboration diagram for madness::ProcessKey< Key, Tag >:

Public Member Functions

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

Private Attributes

Key key_
 The base key type.
ProcessID proc_
 The process that generated the key.

Friends

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

Detailed Description

template<typename Key, typename Tag = void>
class madness::ProcessKey< Key, Tag >

Key object that includes the process information.

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

Constructor & Destructor Documentation

◆ ProcessKey() [1/3]

template<typename Key, typename Tag = void>
madness::ProcessKey< Key, Tag >::ProcessKey ( )
inline

Default constructor.

References key_, and proc_.

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

◆ ProcessKey() [2/3]

template<typename Key, typename Tag = void>
madness::ProcessKey< Key, Tag >::ProcessKey ( const Key & key,
const ProcessID proc )
inline

Constructor.

Parameters
[in]keyThe base key.
[in]procThe process that generated the key.

References key(), key_, proc(), and proc_.

◆ ProcessKey() [3/3]

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

Copy constructor.

Parameters
[in]otherThe key to be copied.

References ProcessKey(), key_, and proc_.

Member Function Documentation

◆ key()

template<typename Key, typename Tag = void>
const Key & madness::ProcessKey< Key, Tag >::key ( ) const
inline

Base key accessor.

Returns
The base key.

References key_.

Referenced by ProcessKey(), hash_value, and madness::operator<<().

◆ operator!=()

template<typename Key, typename Tag = void>
bool madness::ProcessKey< Key, Tag >::operator!= ( const ProcessKey< 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 ProcessKey(), key_, and proc_.

◆ operator=()

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

Copy assignment operator.

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

References ProcessKey(), key_, and proc_.

◆ operator==()

template<typename Key, typename Tag = void>
bool madness::ProcessKey< Key, Tag >::operator== ( const ProcessKey< 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 ProcessKey(), key_, and proc_.

◆ proc()

template<typename Key, typename Tag = void>
ProcessID madness::ProcessKey< Key, Tag >::proc ( ) const
inline

Process ID accessor.

Returns
The process ID.

References proc_.

Referenced by ProcessKey(), and madness::operator<<().

◆ serialize()

template<typename Key, typename Tag = void>
template<typename Archive>
void madness::ProcessKey< 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_, and proc_.

◆ hash_value

template<typename Key, typename Tag = void>
hashT hash_value ( const ProcessKey< Key, Tag > & key)
friend

Hashing function.

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

References ProcessKey(), madness::detail::combine_hash(), and key().

Member Data Documentation

◆ key_

template<typename Key, typename Tag = void>
Key madness::ProcessKey< Key, Tag >::key_
private

◆ proc_

template<typename Key, typename Tag = void>
ProcessID madness::ProcessKey< Key, Tag >::proc_
private

The process that generated the key.

Referenced by ProcessKey(), ProcessKey(), ProcessKey(), operator!=(), operator=(), operator==(), proc(), and serialize().


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