DUECA/DUSIME
|
Class to access a communication object. More...
#include <CommObjectWriter.hxx>
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. | |
CommObjectWriter & | operator= (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 char * | getMemberName (unsigned i) const |
Return an element name based on index. | |
const char * | getMemberClass (unsigned i) const |
Return an element's class based on index. | |
const char * | getMemberKeyClass (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 char * | getClassname () 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. | |
CommObjectReaderWriter & | operator= (const CommObjectReaderWriter &o) |
assignment, needed for temporary copy MSGPACKtoDCO | |
Protected Attributes | |
void * | obj |
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 |
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.
ElementWriter dueca::CommObjectWriter::operator[] | ( | const char * | ename | ) |
Return an element accessor based on the element name.
ename | Name of the data member |
ElementWriter dueca::CommObjectWriter::operator[] | ( | unsigned | i | ) |
Return an element accessor based on index.
i | Index of the data member |