|
DUECA/DUSIME
|
Introspective access to data in a channel. More...
#include <CommObjectWriter.hxx>


Public Member Functions | |
| DCOWriter (const char *classname, ChannelWriteToken &token, const DataTimeSpec &ts) | |
| Constructor. | |
| DCOWriter (ChannelWriteToken &token, const DataTimeSpec &ts) | |
| Constructor. | |
| DCOWriter (ChannelWriteToken &token, TimeTickType ts=SimTime::getTimeTick()) | |
| Constructor with time tick, for event writing. | |
| ~DCOWriter () | |
| Destructor. | |
| void | failed () |
| Flag a failure or error. | |
Public Member Functions inherited from dueca::CommObjectWriter | |
| CommObjectWriter (const char *classname, void *obj=NULL) | |
| Constructor, for testing purposes, and for recursively accessing complex objects. | |
| template<typename T > | |
| CommObjectWriter (T &obj) | |
| Templated 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. | |
| const CommObjectMemberAccessBase & | getMemberAccessor (unsigned i) const |
| Directly reach the MemberAccess object. | |
| CommObjectReaderWriter & | operator= (const CommObjectReaderWriter &o) |
| assignment, needed for temporary copy MSGPACKtoDCO | |
Additional Inherited Members | |
Protected Attributes inherited from dueca::CommObjectWriter | |
| 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 | |
Introspective access to data in a channel.
The DCOWriter accesses the data in a channel. These objects should be created on the stack, and when they go out of scope, the access to the channel is released again.
A DCOWriter is an alternative to using a DataWriter. This variant is for generic, introspective access, using a DataWriter is much more efficient when you can program for the data type.
| dueca::DCOWriter::DCOWriter | ( | const char * | classname, |
| ChannelWriteToken & | token, | ||
| const DataTimeSpec & | ts ) |
Constructor.
Note that these objects are light-weight, and meant to be constructed (on the stack) and discarded.
| classname | Type of data to be read; must match the data type in the entry accessed with the write token. |
| token | Read token. |
| ts | Time specification. |
| dueca::DCOWriter::DCOWriter | ( | ChannelWriteToken & | token, |
| const DataTimeSpec & | ts ) |
Constructor.
Note that these objects are light-weight, and meant to be constructed (on the stack) and discarded. This version assumes the data type from the channel entry.
| token | Write token. |
| ts | Time specification. |
| dueca::DCOWriter::DCOWriter | ( | ChannelWriteToken & | token, |
| TimeTickType | ts = SimTime::getTimeTick() ) |
Constructor with time tick, for event writing.
Note that these objects are light-weight, and meant to be constructed (on the stack) and discarded. This version assumes the data type from the channel entry.
| token | Write token. |
| ts | Time specification, if omitted, takes current tick. |