|
DUECA/DUSIME
|
Another Template specialization of the GenericVarIO. More...
#include <VarProbe.hxx>


Public Member Functions | |
| VarProbeElt (Ta C ::*d, int idx) | |
| Constructor. | |
| bool | poke (void *obj, const Te &v) const |
| Change a member variable in a class. | |
| bool | peek (void *obj, Te &v) const |
| Read a data member in a class. | |
Public Member Functions inherited from dueca::GenericVarIO | |
| GenericVarIO () | |
| constructor | |
| virtual | ~GenericVarIO () |
| destructor | |
| ProbeType | getType () const |
| returns the argument type required | |
| DECLARE_IN_GENERICVAR_IO (int) | |
| Use handy macro to declare stuff for int. | |
| DECLARE_IN_GENERICVAR_IO (uint32_t) | |
| Use handy macro to declare stuff for int. | |
| DECLARE_IN_GENERICVAR_IO (uint16_t) | |
| Use handy macro to declare stuff for int. | |
| DECLARE_IN_GENERICVAR_IO (double) | |
| Use handy macro to declare stuff for double. | |
| DECLARE_IN_GENERICVAR_IO (float) | |
| Use handy macro to declare stuff for float. | |
| DECLARE_IN_GENERICVAR_IO (bool) | |
| Use handy macro to declare stuff for bool. | |
| DECLARE_IN_GENERICVAR_IO (TimeSpec) | |
| Use handy macro to declare stuff for TimeSpec. | |
| DECLARE_IN_GENERICVAR_IO (PeriodicTimeSpec) | |
| Use handy macro to declare stuff for PeriodicTimeSpec. | |
| DECLARE_IN_GENERICVAR_IO (PrioritySpec) | |
| Use handy macro to declare stuff for PrioritySpec. | |
| DECLARE_IN_GENERICVAR_IO (vstring) | |
| Use handy macro to declare stuff for vstring. | |
| DECLARE_IN_GENERICVAR_IO (SCM) | |
| Use handy macro to declare stuff for SCM. | |
| DECLARE_IN_GENERICVAR_IO (vector_int) | |
| Use handy macro to declare stuff for vector<int> | |
| DECLARE_IN_GENERICVAR_IO (vector_float) | |
| Use handy macro to declare stuff for vector<float> | |
| DECLARE_IN_GENERICVAR_IO (vector_double) | |
| Use handy macro to declare stuff for vector<double> | |
| DECLARE_IN_GENERICVAR_IO (vector_vstring) | |
| Use handy macro to declare stuff for vector<vstring> | |
| DECLARE_IN_GENERICVAR_IO (ScriptCreatable) | |
| Objects creatable from scripts. | |
| DECLARE_IN_GENERICVAR_IO (string8) | |
| Dstring8. | |
| DECLARE_IN_GENERICVAR_IO (string16) | |
| Dstring. | |
| DECLARE_IN_GENERICVAR_IO (string32) | |
| Dstring. | |
| DECLARE_IN_GENERICVAR_IO (string64) | |
| Dstring. | |
| DECLARE_IN_GENERICVAR_IO (string128) | |
| Dstring. | |
Additional Inherited Members | |
Protected Attributes inherited from dueca::GenericVarIO | |
| ProbeType | ptype |
| type of argument passed/inserted/read | |
Another Template specialization of the GenericVarIO.
The VarProbeElt takes a a pointer to a member variable in that class, and this member variable must be of an array type (so elements of this thing are accessed with []). As a second argument it takes an index, and with that information and a pointer to an object of that class it can insert data directly into an element of the member. Seems dirty, but provides a really useful service. For neater IO, use the MemberCall objects, but remember that these can only put data into the object, not take it out.
Caveat: There is no bounds check, so if you supply a wrong index, you get to keep the pieces your program breaks into.
Template parameters:
| C | Class that is being probed |
| Ta | Type of the array, e.g. int[10]. A pointer can also be used, e.g. double* |
| Te | Type of the array elements, must match the first type, e.g. int. |