MADNESS 0.10.1

Class for unique global IDs. More...

#include <uniqueid.h>

Public Member Functions

 uniqueidT ()
 Default constructor.
 uniqueidT (unsigned long worldid, unsigned long objid)
 Constructor that uses the world and object IDs.
unsigned long get_obj_id () const
 Access the object ID.
unsigned long get_world_id () const
 Access the World ID.
 operator bool () const
 nonnull state tester
template<typename Archive>
void serialize (Archive &ar)
 Serialize a unique ID object.

Private Attributes

unsigned long objid
 ID of the object.
unsigned long worldid
 ID of the World the object belongs to.

Friends

template<typename CharT, typename Traits>
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &s, const uniqueidT &id)
 Stream insertion function for a uniqueidT.
class World

Detailed Description

Class for unique global IDs.

Constructor & Destructor Documentation

◆ uniqueidT() [1/2]

madness::uniqueidT::uniqueidT ( )
inline

Default constructor.

References objid, and worldid.

Referenced by operator<<.

◆ uniqueidT() [2/2]

madness::uniqueidT::uniqueidT ( unsigned long worldid,
unsigned long objid )
inline

Constructor that uses the world and object IDs.

Parameters
[in]worldidThe ID of the World the object belongs to.
[in]objidThe ID of the object.

References objid, and worldid.

Member Function Documentation

◆ get_obj_id()

unsigned long madness::uniqueidT::get_obj_id ( ) const
inline

Access the object ID.

Returns
The object ID.

References objid.

Referenced by madness::FunctionImpl< T, LDIM >::hash_value.

◆ get_world_id()

unsigned long madness::uniqueidT::get_world_id ( ) const
inline

◆ operator bool()

madness::uniqueidT::operator bool ( ) const
inlineexplicit

nonnull state tester

Returns
return true if non-default initialized

References objid.

◆ serialize()

template<typename Archive>
void madness::uniqueidT::serialize ( Archive & ar)
inline

Serialize a unique ID object.

Template Parameters
ArchiveThe archive type.
Parameters
[in,out]arThe archive.

References objid, and worldid.

◆ operator<<

template<typename CharT, typename Traits>
std::basic_ostream< CharT, Traits > & operator<< ( std::basic_ostream< CharT, Traits > & s,
const uniqueidT & id )
friend

Stream insertion function for a uniqueidT.

Template Parameters
CharTa character type
Traitsa traits type describing CharT
Parameters
[in,out]sThe output stream.
[in]idThe uniqueidT to be output.
Returns
The output stream (for chaining).

References uniqueidT().

◆ World

friend class World
friend

References World.

Referenced by World.

Member Data Documentation

◆ objid

unsigned long madness::uniqueidT::objid
private

ID of the object.

Referenced by uniqueidT(), uniqueidT(), get_obj_id(), operator bool(), and serialize().

◆ worldid

unsigned long madness::uniqueidT::worldid
private

ID of the World the object belongs to.

Referenced by uniqueidT(), uniqueidT(), get_world_id(), and serialize().


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