|
void | read (std::string &s, std::string &k) |
| read a value. More...
|
|
void | read (boost::any &a, boost::any &k) |
| read a value. More...
|
|
void | read (std::string &s) |
| read a value, no provision for returning a key if it exists. More...
|
|
void | read (boost::any &a) |
| read a value, no provision for returning a key if it exists. More...
|
|
void | peek (std::string &s) |
| read a value, but do not step/iterate/invalidate. More...
|
|
void | peek (boost::any &a) |
| read a value, but do not step/iterate/invalidate. More...
|
|
CommObjectReader | recurse (std::string &k) |
| recursively access a nested object. More...
|
|
CommObjectReader | recurse (boost::any &k) |
| recursively access a nested object. More...
|
|
bool | isEnd () |
| returns true if the last value has been read. More...
|
|
bool | isNested () |
| returns whether the object can be recursed or not
|
|
MemberArity | getArity () |
| returns what type of "Arity" the object has; either a single object, an iterable object, or a mapped object, i.e. More...
|
|
size_t | size () const |
| Returns the current size of an array, map, list, if applicable.
|
|
ElementReader an object to read a member of a DCO object.
The ElementReader enables a generic level (based on std::string or boost::any) interaction with a member of a DCO object. Generally, the ElementReader will be provided by a dueca::CommObjectReader, which in turn may be supplied by a channel through its descendant dueca::DCOReader.
If the member is iterable, it may be read multiple times by read calls, each read call will set an iterator to point to the next element of the member. The isEnd() call can be used to test whether the iteration has ended. If a type is not iterable, there will be only one read until isEnd() returns true.
Single members may be read in std::string or boost::any form, compound members (themselves DCO objects) may be recursively inspected using the recurse() call, producing new ElementReader objects. When attempting to read a single member, but the object is compound, a dueca::ConversionNotDefined exception will be thrown. When attempting to recurse into a compound member, but the member is single, a dueca::TypeIsNotNested exception will be thrown.
The isEnd() call indicates whether all elements of a member have been read.