|
DUECA/DUSIME
|
Class to access a communication object. More...


Public Member Functions | |
| CommObjectWriter (const char *classname, void *obj=NULL) | |
| Constructor, for testing purposes, and for recursively accessing complex objects. More... | |
| template<typename T > | |
| CommObjectWriter (T &obj) | |
| Templated constructor. More... | |
| ElementWriter | operator[] (const char *ename) |
| Return an element accessor based on the element name. More... | |
| ElementWriter | operator[] (unsigned i) |
| Return an element accessor based on index. More... | |
| ~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. More... | |
| ~CommObjectReaderWriter () | |
| Destructor. | |
| const char * | getMemberName (unsigned i) const |
| Return an element name based on index. More... | |
| const char * | getMemberClass (unsigned i) const |
| Return an element's class based on index. More... | |
| const char * | getMemberKeyClass (unsigned i) const |
| Return an element's key class based on index. More... | |
| 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. | |
| const CommObjectMemberAccessBase & | getMemberAccessor (unsigned i) const |
| Directly reach the MemberAccess 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.
| dueca::CommObjectWriter::CommObjectWriter | ( | const char * | classname, |
| void * | obj = NULL |
||
| ) |
Constructor, for testing purposes, and for recursively accessing complex objects.
| classname | Type of data; must match, or the result is nonsense! |
| obj | Pointer to the object. |
|
inline |
Templated constructor.
| obj | Object to be written. |
| 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 |