DUECA/DUSIME
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
dueca::GlobalId Struct Reference

This class defines an ID pair, consisting of a location id, identifying a participating dueca node, and an object id, identifying an object (or channel) created in that node. More...

Public Types

typedef GlobalId __ThisDCOType__
 typedef for internal reference
 

Public Member Functions

 GlobalId ()
 default constructor. More...
 
 GlobalId (const LocationId &location, const ObjectId &object)
 Constructor with arguments.
 
 GlobalId (const GlobalId &o)
 copy constructor. More...
 
 GlobalId (::dueca::AmorphReStore &r)
 constructor to restore an GlobalId from amorphous storage. More...
 
 ~GlobalId ()
 destructor. More...
 
void packData (::dueca::AmorphStore &s) const
 packs the GlobalId into amorphous storage. More...
 
void packDataDiff (::dueca::AmorphStore &s, const GlobalId &ref) const
 packs the GlobalId into amorphous storage. More...
 
void unPackData (::dueca::AmorphReStore &s)
 unpacks the GlobalId from an amorphous storage. More...
 
void unPackDataDiff (::dueca::AmorphReStore &s)
 unpacks the differences for GlobalId from an amorphous storage. More...
 
bool operator== (const GlobalId &o) const
 Test for equality. More...
 
bool operator!= (const GlobalId &o) const
 Test for inequality. More...
 
GlobalIdoperator= (const GlobalId &o)
 Assignment operator. More...
 
std::ostream & print (std::ostream &s) const
 prints the GlobalId to a stream. More...
 
ObjectId getObjectId () const
 Return the object id. More...
 
LocationId getLocationId () const
 Return the location/node id. More...
 
bool validId () const
 Invalid ID's also exist (for example for incomplete channels), this returns true if the ID is valid. More...
 
std::string printid () const
 Convert this to a comma-separated string of location and object.
 

Static Public Member Functions

static void * operator new (size_t size)
 new operator "new", which places objects not on a heap, but in one of the memory arenas. More...
 
static void operator delete (void *p)
 new operator "delete", to go with the new version of operator new. More...
 
static void * operator new (size_t size, GlobalId *&o)
 placement "new", needed for stl. More...
 

Public Attributes

LocationId location
 ID part pointing to the dueca node.
 
ObjectId object
 Unique ID within the dueca node.
 

Static Public Attributes

static const char *const classname
 The name of this class. More...
 
static const uint32_t magic_check_number
 a "magic" number, hashed out of the class definition, that will be used to check consistency of the sent objects across the dueca nodes. More...
 
static const uint16_t invalid_object_id = 0xffff
 flags invalid/max for object
 
static const uint8_t invalid_location_id = 0xff
 flags invalid/max for location
 

Detailed Description

This class defines an ID pair, consisting of a location id, identifying a participating dueca node, and an object id, identifying an object (or channel) created in that node.

The ObjectManager maintains a list of references to local objects, indexed on the object id, the ChannelManager does the same for channels.

Local and remote queries for an object, defined by its name and the entity in which it participates, are returned with a GlobalId

Constructor & Destructor Documentation

◆ GlobalId() [1/3]

dueca::GlobalId::GlobalId ( )

default constructor.

◆ GlobalId() [2/3]

dueca::GlobalId::GlobalId ( const GlobalId o)

copy constructor.

◆ GlobalId() [3/3]

dueca::GlobalId::GlobalId ( ::dueca::AmorphReStore r)

constructor to restore an GlobalId from amorphous storage.

◆ ~GlobalId()

dueca::GlobalId::~GlobalId ( )

destructor.

Member Function Documentation

◆ operator new() [1/2]

static void* dueca::GlobalId::operator new ( size_t  size)
static

new operator "new", which places objects not on a heap, but in one of the memory arenas.

This to speed up memory management.

◆ operator delete()

static void dueca::GlobalId::operator delete ( void *  p)
static

new operator "delete", to go with the new version of operator new.

◆ operator new() [2/2]

static void* dueca::GlobalId::operator new ( size_t  size,
GlobalId *&  o 
)
inlinestatic

placement "new", needed for stl.

◆ packData()

void dueca::GlobalId::packData ( ::dueca::AmorphStore s) const

packs the GlobalId into amorphous storage.

◆ packDataDiff()

void dueca::GlobalId::packDataDiff ( ::dueca::AmorphStore s,
const GlobalId ref 
) const

packs the GlobalId into amorphous storage.

only differences with a previous object are packed.

◆ unPackData()

void dueca::GlobalId::unPackData ( ::dueca::AmorphReStore s)

unpacks the GlobalId from an amorphous storage.

◆ unPackDataDiff()

void dueca::GlobalId::unPackDataDiff ( ::dueca::AmorphReStore s)

unpacks the differences for GlobalId from an amorphous storage.

◆ operator==()

bool dueca::GlobalId::operator== ( const GlobalId o) const

Test for equality.

◆ operator!=()

bool dueca::GlobalId::operator!= ( const GlobalId o) const
inline

Test for inequality.

◆ operator=()

GlobalId& dueca::GlobalId::operator= ( const GlobalId o)

Assignment operator.

◆ print()

std::ostream& dueca::GlobalId::print ( std::ostream &  s) const

prints the GlobalId to a stream.

◆ getObjectId()

ObjectId dueca::GlobalId::getObjectId ( ) const
inline

Return the object id.

◆ getLocationId()

LocationId dueca::GlobalId::getLocationId ( ) const
inline

Return the location/node id.

◆ validId()

bool dueca::GlobalId::validId ( ) const
inline

Invalid ID's also exist (for example for incomplete channels), this returns true if the ID is valid.

Member Data Documentation

◆ classname

const char* const dueca::GlobalId::classname
static

The name of this class.

◆ magic_check_number

const uint32_t dueca::GlobalId::magic_check_number
static

a "magic" number, hashed out of the class definition, that will be used to check consistency of the sent objects across the dueca nodes.


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