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

Name tuple as used in DUECA. More...

Public Types

typedef NameSet __ThisDCOType__
 typedef for internal reference
 

Public Member Functions

 NameSet ()
 default constructor. More...
 
 NameSet (const std::string &name)
 Constructor with arguments.
 
 NameSet (const NameSet &o)
 copy constructor. More...
 
 NameSet (::dueca::AmorphReStore &r)
 constructor to restore an NameSet from amorphous storage. More...
 
 ~NameSet ()
 destructor. More...
 
void packData (::dueca::AmorphStore &s) const
 packs the NameSet into amorphous storage. More...
 
void packDataDiff (::dueca::AmorphStore &s, const NameSet &ref) const
 packs the NameSet into amorphous storage. More...
 
void unPackData (::dueca::AmorphReStore &s)
 unpacks the NameSet from an amorphous storage. More...
 
void unPackDataDiff (::dueca::AmorphReStore &s)
 unpacks the differences for NameSet from an amorphous storage. More...
 
bool operator== (const NameSet &o) const
 Test for equality. More...
 
bool operator!= (const NameSet &o) const
 Test for inequality. More...
 
NameSetoperator= (const NameSet &o)
 Assignment operator. More...
 
std::ostream & print (std::ostream &s) const
 prints the NameSet to a stream. More...
 
 NameSet (const std::string &e, const std::string &c, const std::string &p)
 Old compatibility constructor for a complete name, using a three-part structure, results in name c://e/p or c://e if p is an empty string. More...
 
 NameSet (const std::string &e, const std::string &c, int p)
 Old compatibility constructor for a complete name, with the part as an integer. More...
 
std::string getEntity () const
 Return the entity part only.
 
std::string getClass () const
 Return class name part only. More...
 
std::string getPart () const
 Return part name(s) only. More...
 
bool operator< (const NameSet &o) const
 A nameset is considered smaller, when its name is alphabetically smaller. More...
 
bool operator> (const NameSet &o) const
 A nameset is considered larger, when its name is alphabetically larger. More...
 
void validate_set ()
 validate, and throw an dueca::improper_nameset exception if required. More...
 

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, NameSet *&o)
 placement "new", needed for stl. More...
 

Public Attributes

std::string name
 A class member.
 

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

Detailed Description

Name tuple as used in DUECA.

The tuple is typically written in URL-type fashion, with the data class type before the dots, e.g., MyDataClass://entity/part, or MyDataClass://something

Originally, the naming in DUECA was limited to three-part names

  1. Entity. The name of the (bigger) entity this object (module or channel) belongs or corresponds to.
  2. Class. The type of thing it is. The module class name for a module, or the data class name for a channel.
  3. Part. In order to distinguish between multiple channels/modules of the same type within one Entity.

This is now re-coded to a name of Class://Entity/Part, and if part is omitted, to Class://Entity

Constructor & Destructor Documentation

◆ NameSet() [1/5]

dueca::NameSet::NameSet ( )

default constructor.

◆ NameSet() [2/5]

dueca::NameSet::NameSet ( const NameSet o)

copy constructor.

◆ NameSet() [3/5]

dueca::NameSet::NameSet ( ::dueca::AmorphReStore r)

constructor to restore an NameSet from amorphous storage.

◆ ~NameSet()

dueca::NameSet::~NameSet ( )

destructor.

◆ NameSet() [4/5]

dueca::NameSet::NameSet ( const std::string &  e,
const std::string &  c,
const std::string &  p 
)

Old compatibility constructor for a complete name, using a three-part structure, results in name c://e/p or c://e if p is an empty string.

Parameters
eEntity part
cClass part
ppart

◆ NameSet() [5/5]

dueca::NameSet::NameSet ( const std::string &  e,
const std::string &  c,
int  p 
)

Old compatibility constructor for a complete name, with the part as an integer.

Often used for automatically generating a series of names, results in name c://e/p.

Parameters
eEntity part
cClass part
ppart, converted to string from integer

Member Function Documentation

◆ operator new() [1/2]

static void* dueca::NameSet::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::NameSet::operator delete ( void *  p)
static

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

◆ operator new() [2/2]

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

placement "new", needed for stl.

◆ packData()

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

packs the NameSet into amorphous storage.

◆ packDataDiff()

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

packs the NameSet into amorphous storage.

only differences with a previous object are packed.

◆ unPackData()

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

unpacks the NameSet from an amorphous storage.

◆ unPackDataDiff()

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

unpacks the differences for NameSet from an amorphous storage.

◆ operator==()

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

Test for equality.

◆ operator!=()

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

Test for inequality.

◆ operator=()

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

Assignment operator.

◆ print()

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

prints the NameSet to a stream.

◆ getClass()

std::string dueca::NameSet::getClass ( ) const

Return class name part only.

◆ getPart()

std::string dueca::NameSet::getPart ( ) const

Return part name(s) only.

◆ operator<()

bool dueca::NameSet::operator< ( const NameSet o) const
inline

A nameset is considered smaller, when its name is alphabetically smaller.

Parameters
oThe other nameset
Returns
true if smaller

◆ operator>()

bool dueca::NameSet::operator> ( const NameSet o) const
inline

A nameset is considered larger, when its name is alphabetically larger.

Parameters
oThe other nameset
Returns
true if larger

◆ validate_set()

void dueca::NameSet::validate_set ( )

validate, and throw an dueca::improper_nameset exception if required.

Member Data Documentation

◆ classname

const char* const dueca::NameSet::classname
static

The name of this class.

◆ magic_check_number

const uint32_t dueca::NameSet::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: