![]() |
WarpTwin
Documentation for WarpTwin models and classes.
|
#include <DataIOBase.h>

Public Member Functions | |
| DataIOBase () | |
| Default constructor. | |
| ~DataIOBase () | |
| virtual int16 | syncExternal () |
| Synchronize DataIO to some external source – Socket, shared memory, etc. | |
| virtual int | dataSize () |
| Get the size of the core data held by the object. | |
| void | allowWrite () |
| Functions to manipulate write permissions on DataIO object. | |
| void | blockWrite () |
| bool | writeAllowed () |
| void | mapTo (DataIOBase &data_source) |
| Function to map DataIO object to new upstream data source. | |
| void | resetMap () |
| DataIOBase * | dataSource () |
| Access the target to which the DataIO is mapped. | |
| void * | writePtr () |
| Function to write value to mapped location – root data or map. | |
| void * | read () const |
| Function to read value from mapped location – root data or map. | |
| uint8 | dataType () |
| Function to return the type of data held by the DataIO. | |
| virtual int16 | getValueAsString (char *retval, size_t size) |
| Return the value held by the DataIO object as a string. | |
| virtual int16 | setValueFromString (const char *value) |
| Set the value held by the DataIO object from a string. | |
| Public Member Functions inherited from clockwerk::GraphTreeObject | |
| GraphTreeObject (const char *gt_nme="", GraphTreeObject **storage_array=nullptr, uint32 storage_size=0) | |
| Name-based constructor for GraphTreeObject which will have no children by default. | |
| virtual | ~GraphTreeObject () |
| Destructor. | |
| GraphTreeObject * | parent () |
| Functions to get object's parent/children. | |
| GraphTreeObject ** | children () |
| GraphTreeObject * | childAtIndex (uint8 i) const |
| int16 | parent (GraphTreeObject *new_parent) |
| Function to assign the node's parent via pointer. | |
| int16 | parent (GraphTreeObject &new_parent) |
| Function to assign the node's parent via reference. | |
| uint8 | nChildren () const |
| Getters for number of children and descendants. | |
| uint16 | nDescendants () const |
| uint8 | capacity () const |
| const char * | name () const |
| Getter and setter for object name. | |
| int16 | name (const char *new_name) |
| uint8 | rank () |
| Getter for the object rank. | |
| int8 | type () |
| Function to indicate type – -1 by default unless implemented downstream. | |
| bool | loggable () |
| Getter for object logability flag – note no setter because should only be set by this or a derived class in its definition. | |
| GraphTreeObject * | getRootDataPointer () |
| Get the pointer to the highest object in the graph tree. | |
| virtual int16 | str (char *output, size_t size) const |
| Get object represented as string. | |
| virtual int16 | fromStr (const char *val) |
| Set value of graphtreeobject from string. | |
Protected Member Functions | |
| template<typename T> | |
| std::enable_if< std::is_integral< T >::value >::type | _typeID (T var) |
| Overloaded functions to identify type held by DataIO. | |
| template<typename T> | |
| std::enable_if< std::is_floating_point< T >::value >::type | _typeID (T var) |
| template<typename T, long unsigned int N> | |
| void | _typeID (std::array< T, N > var) |
| template<uint32 R, uint32 C> | |
| void | _typeID (Matrix< R, C > var) |
| void | _typeID (const GraphTreeObject &var) |
| void | _typeID (const Time &var) |
| void | _typeID (void *var) |
| void | _typeID (int8 var) |
| void | _typeID (int16 var) |
| void | _typeID (int32 var) |
| void | _typeID (int64 var) |
| void | _typeID (uint8 var) |
| void | _typeID (uint16 var) |
| void | _typeID (uint32 var) |
| void | _typeID (uint64 var) |
| void | _typeID (char *var) |
| Protected Member Functions inherited from clockwerk::GraphTreeObject | |
| int16 | _setStorage (GraphTreeObject **storage_array, uint8 storage_size) |
| Getter for object's string address. | |
| void | _recalculateDescendants () |
| Function to recursively re-calculate the number of descendants of a given node on the tree. | |
| void | _recalculateRank () |
| Function to recursively re-calculate the rank of a given node on the tree. | |
| int16 | _addChild (GraphTreeObject *child) |
| Function to decompose a string into a series of substrings via indexing. | |
| int16 | _removeChild (GraphTreeObject *child) |
| Function to remove a child from the graph node's children. | |
Protected Attributes | |
| DataIOBase * | _data |
| void * | _data_ptr = nullptr |
| bool | _writeAllowed |
| bool | _root |
| dataio_types_e | _type_id = UNDEFINED |
| Protected Attributes inherited from clockwerk::GraphTreeObject | |
| GraphTreeObject * | _parent = nullptr |
| GraphTreeObject ** | _children_ptr = nullptr |
| uint32 | _max_num_children = 0 |
| uint16 | _num_descendants = 0 |
| char | _name [MAXIMUM_NAME_CHARS] = "" |
| String name for object. | |
| uint8 | _num_children = 0 |
| Number of direct children of the tree (not including the tree itself). | |
| uint8 | _rank = 0 |
| int8 | _graph_tree_type = BASE_GRAPH_TREE |
| Variable to store graph tree object type. | |
| bool | _loggable = false |
| Variable to indicate whether the selected object is loggable. Set to false by default. | |
| uint32 | _index = 0 |
| Index pointing to the next write location for the graph tree children. | |
The Data IO Base class is designed to provide the basic interface of the Data IO class (see documentation in DataIO.hpp) without requiring templating. This implementation is to allow for generic access to Data IO objects without needing to know or declare the template in the resulting class.
|
inline |
Default constructor.
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Overloaded functions to identify type held by DataIO.
| var | The variable used to identify type |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inline |
Functions to manipulate write permissions on DataIO object.
|
inline |
|
inlinevirtual |
Get the size of the core data held by the object.
Reimplemented in clockwerk::DataIO< T >, clockwerk::DataIO< bool >, clockwerk::DataIO< char * >, clockwerk::DataIO< clockwerk::CartesianVector< 3 > >, clockwerk::DataIO< clockwerk::CartesianVector< 4 > >, clockwerk::DataIO< clockwerk::Matrix< 16, 16 > >, clockwerk::DataIO< clockwerk::Matrix< 3, 3 > >, clockwerk::DataIO< clockwerk::Quaternion >, clockwerk::DataIO< clockwerk::Time >, clockwerk::DataIO< double >, clockwerk::DataIO< floating_point >, clockwerk::DataIO< GraphTreeObject * >, clockwerk::DataIO< int >, clockwerk::DataIO< std::string >, clockwerk::DataIO< uint32 >, clockwerk::DataIO< uint8 >, clockwerk::DataIO< warptwin::Body * >, clockwerk::DataIO< warptwin::Frame * >, and clockwerk::DataIO< warptwin::Node * >.
|
inline |
Access the target to which the DataIO is mapped.
|
inline |
Function to return the type of data held by the DataIO.
|
inlinevirtual |
Return the value held by the DataIO object as a string.
Return the value held by the DataIO object as a string
Reimplemented in clockwerk::DataIO< T >, clockwerk::DataIO< bool >, clockwerk::DataIO< char * >, clockwerk::DataIO< clockwerk::CartesianVector< 3 > >, clockwerk::DataIO< clockwerk::CartesianVector< 4 > >, clockwerk::DataIO< clockwerk::Matrix< 16, 16 > >, clockwerk::DataIO< clockwerk::Matrix< 3, 3 > >, clockwerk::DataIO< clockwerk::Quaternion >, clockwerk::DataIO< clockwerk::Time >, clockwerk::DataIO< double >, clockwerk::DataIO< floating_point >, clockwerk::DataIO< GraphTreeObject * >, clockwerk::DataIO< int >, clockwerk::DataIO< std::string >, clockwerk::DataIO< uint32 >, clockwerk::DataIO< uint8 >, clockwerk::DataIO< warptwin::Body * >, clockwerk::DataIO< warptwin::Frame * >, and clockwerk::DataIO< warptwin::Node * >.
|
inline |
| void * clockwerk::DataIOBase::read | ( | ) | const |
Function to read value from mapped location – root data or map.
|
inline |
| Function | to break data mapping and reset object to its own internal data |
|
inlinevirtual |
Set the value held by the DataIO object from a string.
| value | The value to set |
Reimplemented in clockwerk::DataIO< T >, clockwerk::DataIO< bool >, clockwerk::DataIO< char * >, clockwerk::DataIO< clockwerk::CartesianVector< 3 > >, clockwerk::DataIO< clockwerk::CartesianVector< 4 > >, clockwerk::DataIO< clockwerk::Matrix< 16, 16 > >, clockwerk::DataIO< clockwerk::Matrix< 3, 3 > >, clockwerk::DataIO< clockwerk::Quaternion >, clockwerk::DataIO< clockwerk::Time >, clockwerk::DataIO< double >, clockwerk::DataIO< floating_point >, clockwerk::DataIO< GraphTreeObject * >, clockwerk::DataIO< int >, clockwerk::DataIO< std::string >, clockwerk::DataIO< uint32 >, clockwerk::DataIO< uint8 >, clockwerk::DataIO< warptwin::Body * >, clockwerk::DataIO< warptwin::Frame * >, and clockwerk::DataIO< warptwin::Node * >.
|
inlinevirtual |
Synchronize DataIO to some external source – Socket, shared memory, etc.
Reimplemented in warptwin::DataIOShmemRelay, and warptwin::DataIOSocketRelay.
|
inline |
| void * clockwerk::DataIOBase::writePtr | ( | ) |
Function to write value to mapped location – root data or map.
|
protected |
Pointer to data held by the object – by default, this will point internally to _default_data, but can be set to point to another object
|
protected |
Generic pointer to hold any data type – will be resolved to point to actual object in inherited class
|
protected |
Variable to indicate whether variable in question is root data source or not
|
protected |
Variable to store the type of data that the DataIO object is holding. Valid types are documented in the enum and determined at runtime. Runtime determination is necessary because of derived types of GraphTreeObject
|
protected |
Variable to indicate whether writing is allowed to this variable Set to false upon mapping by default