DUECA/DUSIME
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Friends | List of all members
dueca::CommObjectWriter Class Reference

Class to access a communication object. More...

#include <CommObjectWriter.hxx>

Inheritance diagram for dueca::CommObjectWriter:
Inheritance graph
[legend]
Collaboration diagram for dueca::CommObjectWriter:
Collaboration graph
[legend]

Public Member Functions

 CommObjectWriter (const char *classname, void *obj=NULL)
 Constructor.
 
ElementWriter operator[] (const char *ename)
 Return an element accessor based on the element name.
 
ElementWriter operator[] (unsigned i)
 Return an element accessor based on index.
 
 ~CommObjectWriter ()
 Destructor.
 
CommObjectWriteroperator= (const CommObjectWriter &o)
 assignment, needed for temporary copy MSGPACKtoDCO
 
- Public Member Functions inherited from dueca::CommObjectReaderWriter
 CommObjectReaderWriter (const char *classname)
 Constructor, for testing purposes, and for recursively accessing complex objects.
 
 ~CommObjectReaderWriter ()
 Destructor.
 
const chargetMemberName (unsigned i) const
 Return an element name based on index.
 
const chargetMemberClass (unsigned i) const
 Return an element's class based on index.
 
const chargetMemberKeyClass (unsigned i) const
 Return an element's key class based on index.
 
MemberArity getMemberArity (unsigned i) const
 Return the member arity.
 
size_t getMemberSize (unsigned i) const
 Get member fixed length, if available.
 
const chargetClassname () const
 Return the classname of the currently written or read type; typically for debugging messages.
 
size_t getNumMembers () const
 Determine the number of members in the object.
 
CommObjectReaderWriteroperator= (const CommObjectReaderWriter &o)
 assignment, needed for temporary copy MSGPACKtoDCO
 

Protected Attributes

voidobj
 Pointer to the currently accessed object, NULL if not used.
 
- Protected Attributes inherited from dueca::CommObjectReaderWriter
DataClassRegistry_entry_type entry
 entry giving the class information
 

Friends

class ddff::DDFFDataRecorder
 

Detailed Description

Class to access a communication object.

Is returned by querying a channel, the most common way to get these is by creating a DCOWriter.

This class implements introspection-based access to DCO objects. If you have a void pointer and know the classname, this can also be created directly.

Based on either the name of the data member, or on the index of a data member (as returned by the DataClassRegistry::getMemberIndex call) you can create an ElementWriter. With such a writer the members of the encapsulated object can be manipulated.

Member Function Documentation

◆ operator[]() [1/2]

ElementWriter dueca::CommObjectWriter::operator[] ( const char * ename)

Return an element accessor based on the element name.

Parameters
enameName of the data member

◆ operator[]() [2/2]

ElementWriter dueca::CommObjectWriter::operator[] ( unsigned i)

Return an element accessor based on index.

Parameters
iIndex of the data member

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