VRS
A file format for sensor data.
Loading...
Searching...
No Matches
vrs::DataLayoutStructArray< T, Size > Struct Template Reference

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>

Inheritance diagram for vrs::DataLayoutStructArray< T, Size >:
vrs::DataLayoutStruct

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
Public Member Functions inherited from vrs::DataLayoutStruct
 DataLayoutStruct (const string &structName)

Static Public Member Functions

template<typename S, size_t... Indices>
static constexpr auto createArrayHelper (std::index_sequence< Indices... >)
Static Public Member Functions inherited from vrs::DataLayoutStruct
static void dataLayoutStructEnd (const string &structName)

Public Attributes

std::array< T, Size > array {createArrayHelper<T>(std::make_index_sequence<Size>())}

Detailed Description

template<typename T, size_t Size>
struct vrs::DataLayoutStructArray< T, 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:


The documentation for this struct was generated from the following file: