ChimeraTK-DeviceAccess
03.18.00
|
Provides interface to a struct that is mapped onto a 1D array of ValType StructHeader must be derived from OpaqueStructHeader. More...
#include <MappedImage.h>
Public Types | |
enum | InitData { InitData::Yes, InitData::No } |
Public Member Functions | |
MappedStruct (ChimeraTK::OneDRegisterAccessor< unsigned char > &accToData, InitData doInitData=InitData::No) | |
This keeps a reference to given OneDRegisterAccessor. More... | |
unsigned char * | data () |
returns pointer to data for header and struct content. More... | |
size_t | capacity () const |
capacity of used container More... | |
size_t | size () const |
currently used size More... | |
StructHeader * | header () |
returns header, e.g. for setting meta data More... | |
void | initData () |
default initialize header and zero out data that follows More... | |
Protected Attributes | |
ChimeraTK::OneDRegisterAccessor< unsigned char > & | _accToData |
Provides interface to a struct that is mapped onto a 1D array of ValType StructHeader must be derived from OpaqueStructHeader.
Variable-length structs are supported, as long as they do not grow beyond the size of the given 1D array.
NOTE: MappedStruct concept is discouraged. Use DataConsistencyGroup of struct members instead if possible. It is still required for MappedImage.
Definition at line 38 of file MappedImage.h.
|
strong |
Enumerator | |
---|---|
Yes | |
No |
Definition at line 40 of file MappedImage.h.
|
explicit |
This keeps a reference to given OneDRegisterAccessor.
If its underlying vector is swapped out, the MappedStruct stays valid only if the swapped-in vector was also setup as MappedStruct.
Definition at line 180 of file MappedImage.h.
size_t ChimeraTK::MappedStruct< StructHeader >::capacity |
capacity of used container
Definition at line 196 of file MappedImage.h.
unsigned char * ChimeraTK::MappedStruct< StructHeader >::data |
returns pointer to data for header and struct content.
The returned pointer stays valid until write() or read() is called for the underlying accessor.
Definition at line 191 of file MappedImage.h.
|
inline |
returns header, e.g. for setting meta data
Definition at line 54 of file MappedImage.h.
void ChimeraTK::MappedStruct< StructHeader >::initData |
default initialize header and zero out data that follows
Definition at line 202 of file MappedImage.h.
|
inline |
currently used size
Definition at line 52 of file MappedImage.h.
|
protected |
Definition at line 61 of file MappedImage.h.