PLYwoot
Header-only C++17 library for parsing and writing PLY files
Loading...
Searching...
No Matches
plywoot::reflect::Layout< Ts > Class Template Reference

#include <reflect.hpp>

Public Member Functions

 Layout ()=default
 Constructor for an empty layout (no data will be read/written).
 
template<typename T >
 Layout (const std::vector< T > &v)
 
const std::uint8_t * data () const
 
std::size_t size () const
 
std::size_t alignment () const
 

Detailed Description

template<typename... Ts>
class plywoot::reflect::Layout< Ts >

Used to define the layout of some structure that is either read from or written to by the PLY I/O functions. Note that it is important that the order of data types specified in the layout matches the order of the data types in the data type that is read from or written to. This will automatically take default C/C++ padding into account. In case not all properties in some layout structure are written, use reflect::Stride to skip properties. Properties at the end of the structure that are not read from or written do not need to be specified and will automatically be skipped.

Definition at line 94 of file reflect.hpp.

Constructor & Destructor Documentation

◆ Layout()

template<typename... Ts>
template<typename T >
plywoot::reflect::Layout< Ts >::Layout ( const std::vector< T > &  v)
inline

Constructs a layout representation of some element, and specifies a target list of elements that will be read from by the PLY writer.

Parameters
vlist of elements to be read from by the PLY writer

Definition at line 105 of file reflect.hpp.

Member Function Documentation

◆ alignment()

template<typename... Ts>
std::size_t plywoot::reflect::Layout< Ts >::alignment ( ) const
inline

Alignment requirements of this structure.

Returns
alignment requirements of the elements of type T in this layout

Definition at line 129 of file reflect.hpp.

◆ data()

template<typename... Ts>
const std::uint8_t * plywoot::reflect::Layout< Ts >::data ( ) const
inline

Returns a pointer to the read-only memory area storing instances of type T associated with this layout.

Returns
a pointer to the read-only memory area storing instances of type T associated with this layout.

Definition at line 117 of file reflect.hpp.

◆ size()

template<typename... Ts>
std::size_t plywoot::reflect::Layout< Ts >::size ( ) const
inline

Returns the number of elements that are or may be stored in the memory block pointer to by the associated data block.

Returns
the number of elements that are or may be stored in the memory block pointer to by the associated data block

Definition at line 124 of file reflect.hpp.


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