Lumiera  0.pre.03
»edit your freedom«
StorageFrame< seg, DATA > Struct Template Reference

#include "lib/hetero-data.hpp"

Description

template<size_t seg, typename... DATA>
struct lib::StorageFrame< seg, DATA >

individual storage frame in a chain, holding a data tuple

Definition at line 103 of file hetero-data.hpp.

Public Types

using Tuple = std::tuple< DATA... >
 

Public Member Functions

template<size_t slot>
auto & get () noexcept
 
template<typename X >
auto & get () noexcept
 
template<typename SPEC >
void linkInto (HeteroData< SPEC > &)
 Attach a new storage frame at the end of an existing HeteroData-chain. More...
 

Additional Inherited Members

- Protected Member Functions inherited from NonCopyable
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 
- Protected Attributes inherited from StorageLoc
StorageLocnext {nullptr}
 

Member Function Documentation

◆ linkInto()

void linkInto ( HeteroData< SPEC > &  prefixChain)
inline

Attach a new storage frame at the end of an existing HeteroData-chain.

Template Parameters
segthe number of the separate data segment, must match target
Parameters
prefixChainwith seg - 1 existing chained tuple-segments
Remarks
The core function actually to extend a chain with a new segment, which should have been built using a suitable nested HeteroData::Chain constructor type. Further segments can be defined working from there, since each such constructor in turn has a member type ChainExtension
Note
Always use this strongly typed extension and access path, to prevent out-of-bounds memory access. The actual HeteroData stores no run time type information, and thus a force-cast is necessary internally to access the follow-up data tuple frames. The typing, and especially the seg template parameter used to mark each StorageFrame is the only guard-rail provided, and ensures safe data access.
Examples:
/Werk/devel/lumi/src/lib/hetero-data.hpp.

Definition at line 365 of file hetero-data.hpp.

+ Inheritance diagram for StorageFrame< seg, DATA >:
+ Collaboration diagram for StorageFrame< seg, DATA >:

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