![]() |
VRS
A file format for sensor data.
|
Helper class to include DataLayout structs containing a sliced array of DataPieceXXX and DataLayoutStruct while preserving the required uniqueness of the field names. Embedded DataPiece objects will have a name automatically prefixed with the name of the DataLayoutStruct, with a '/0'... /Size-1' in between. More...
#include <DataLayout.h>
Public Member Functions | |
T & | operator[] (const size_t index) |
constexpr const T & | operator[] (const size_t index) const |
constexpr std::size_t | size () const noexcept |
![]() | |
DataLayoutStruct (const string &structName) | |
Static Public Member Functions | |
template<typename S , size_t... Indices> | |
static constexpr auto | createArrayHelper (std::index_sequence< Indices... >) |
![]() | |
static void | dataLayoutStructEnd (const string &structName) |
Public Attributes | |
std::array< T, Size > | array {createArrayHelper<T>(std::make_index_sequence<Size>())} |
Helper class to include DataLayout structs containing a sliced array of DataPieceXXX and DataLayoutStruct while preserving the required uniqueness of the field names. Embedded DataPiece objects will have a name automatically prefixed with the name of the DataLayoutStruct, with a '/0'... /Size-1' in between.
DataLayoutStructArray can be nested within other DataLayoutStruct. If nesting arrays is not required consider using DataPieceArray instead of DataLayoutStructArray as it will be more efficient. Example:
struct PoseLayout : public DataLayoutStruct { DATA_LAYOUT_STRUCT(PoseLayout)
vrs::DataPieceVector<vrs::Matrix4Dd> orientation{"orientation"}; vrs::DataPieceVector<vrs::Matrix3Dd> translation{"translation"}; };
struct Tracking : public AutoDataLayout { DataLayoutStructArray<PoseLayout, 2> hands{"hands"};
vrs::AutoDataLayoutEnd endLayout; };
Tracking will declare: