![]() |
VRS
A file format for sensor data.
|
Helper class to manage the registration of DataPiece objects within a single DataLayout. More...
Public Member Functions | |
void | dataLayoutBegin (DataLayout &layout) DISABLE_THREAD_SAFETY_ANALYSIS |
DataLayout & | registerDataPiece (DataPiece *dataPiece) |
void | dataLayoutEnd () DISABLE_THREAD_SAFETY_ANALYSIS |
void | dataLayoutStructStart (const string &structName) |
string | dataLayoutPieceLabel (const string &label) |
void | dataLayoutStructEnd (const string &structName) |
Static Public Member Functions | |
static DataLayouter & | get () |
Helper class to manage the registration of DataPiece objects within a single DataLayout.
C++ doesn't support a form of introspection that would allow objects to "find their parent". This technique allows the automatic registration of DataPiece objects.
|
inline |
Start auto-registration of DataPiece objects in the provided DataLayout. Attention! This function acquires a global DataLayout creation lock to prevent mixups if two DataLayouts were to be created concurrently in two threads. You must guarantee that this call is matched by a call to data dataLayoutEnd() to release the global lock. This is called by the constructors of AutoDataLayout and ManualDataLayout.
layout | DataLayout all DataPieces created will register themselves with. |
|
inline |
End the construction of a DataLayout. This is called by AutoDataLayoutEnd's constructor, and on demand by ManualDataLayout.
|
inline |
Get the actual label of a DataPiece. This method adds a prefix to the label, if the DataPiece belongs to a DataLayoutStruct.
label | name requested for the DataPiece. |
|
inline |
End the construction of a DataPieceStruct.
stuctName | name of the structName which construction is being ended. |
|
inline |
Start a sub-structure within a DataLayout, with its own "namespace". The DataPiece objects within that struct will have a label prepended with the namespace. The "namespaces" may be nested, so that you may have a DataLayoutStruct within a DataLayoutStruct.
structName | name of the sub-struct, to be added to the prefix namespace. |
|
inline |
Called by DataPiece constructor to register themselves in the DataLayout currently constructed.
dataPiece | Reference to the DataPiece to register. |