Class to access data in a channel without access to the class of that data.
More...
#include <CommObjectReader.hxx>
|
| CommObjectReader (const char *classname, const void *obj=NULL) |
| Constructor, for testing purposes, and for recursively accessing complex objects.
|
|
template<typename T > |
| CommObjectReader (T &obj) |
| Templated constructor.
|
|
ElementReader | operator[] (const char *ename) const |
| Return an element accessor based on the element name.
|
|
ElementReader | operator[] (unsigned i) const |
| Return an element accessor based on index.
|
|
| ~CommObjectReader () |
| Destructor.
|
|
| 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.
|
|
const CommObjectMemberAccessBase & | getMemberAccessor (unsigned i) const |
| Directly reach the MemberAccess object.
|
|
CommObjectReaderWriter & | operator= (const CommObjectReaderWriter &o) |
| assignment, needed for temporary copy MSGPACKtoDCO
|
|
|
const void * | obj |
| Pointer to the currently accessed object, NULL if not used.
|
|
DataClassRegistry_entry_type | entry |
| entry giving the class information
|
|
Class to access data in a channel without access to the class of that data.
Note that using a DataReader is in many cases much more efficient, the CommObjectReader is only applicable for generic or data-agnostic reading.
Given the name of one of the Communication object's members, or the index of a data member (as returned by the DataClassRegistry::getMemberIndex call), an ElementReader can be created.
◆ CommObjectReader() [1/2]
dueca::CommObjectReader::CommObjectReader |
( |
const char * | classname, |
|
|
const void * | obj = NULL ) |
Constructor, for testing purposes, and for recursively accessing complex objects.
- Parameters
-
classname | Type of data; must match, or the result is nonsense! |
obj | Pointer to the object. |
◆ CommObjectReader() [2/2]
template<typename T >
dueca::CommObjectReader::CommObjectReader |
( |
T & | obj | ) |
|
|
inline |
Templated constructor.
- Parameters
-
◆ operator[]() [1/2]
ElementReader dueca::CommObjectReader::operator[] |
( |
const char * | ename | ) |
const |
Return an element accessor based on the element name.
- Parameters
-
ename | Name of the data member
|
◆ operator[]() [2/2]
ElementReader dueca::CommObjectReader::operator[] |
( |
unsigned | i | ) |
const |
Return an element accessor based on index.
- Parameters
-
i | Index of the data member |
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/dueca-4.2.4-build/dueca-4.2.4/dueca/CommObjectReader.hxx