MADNESS 0.10.1
Public Member Functions | Private Attributes | Friends | List of all members
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 >:
Collaboration graph
[legend]

Public Member Functions

 ProcessKey ()
 Default constructor.
 
 ProcessKey (const Key &key, const ProcessID proc)
 Constructor.
 
 ProcessKey (const ProcessKey< Key, Tag > &other)
 Copy constructor.
 
const Keykey () 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.

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

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

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 madness::ProcessKey< Key, Tag >::key_.

Referenced by 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 madness::ProcessKey< Key, Tag >::key_, and madness::ProcessKey< Key, Tag >::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 madness::ProcessKey< Key, Tag >::key_, and madness::ProcessKey< Key, Tag >::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 madness::ProcessKey< Key, Tag >::key_, and madness::ProcessKey< Key, Tag >::proc_.

◆ proc()

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

Process ID accessor.

Returns
The process ID.

References madness::ProcessKey< Key, Tag >::proc_.

Referenced by 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 madness::ProcessKey< Key, Tag >::key_, and madness::ProcessKey< Key, Tag >::proc_.

Friends And Related Symbol Documentation

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

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 documentation for this class was generated from the following file: