Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
CheckedCore< COR > Class Template Reference

#include "lib/iter-adapter.hpp"

Description

template<class COR>
class lib::CheckedCore< COR >

Adapter to add sanity checks to a »state core«.

Remarks
It is recommended to perform this kind of sanity checking by default, since the performance overhead is minute compared even to a virtual function call. However, there might be high-performance usage scenarios, where it is essential for the optimiser to be able to "strip every wart".

Definition at line 545 of file iter-adapter.hpp.

Public Types

using TAG_CheckedCore_Raw = COR
 marker to allow unwrapping the raw core
 

Public Member Functions

template<typename... ARGS>
 CheckedCore (ARGS &&...init)
 blindly pass-down any argument...
 
 CheckedCore ()=default
 
 CheckedCore (CheckedCore &&)=default
 
 CheckedCore (CheckedCore const &)=default
 
CheckedCoreoperator= (CheckedCore &&)=default
 
CheckedCoreoperator= (CheckedCore const &)=default
 
bool checkPoint () const
 
decltype(auto) yield () const
 
void iterNext ()
 

Protected Member Functions

COR & _rawCore () const
 
void __throw_if_empty () const
 

Constructor & Destructor Documentation

◆ CheckedCore() [1/4]

template<class COR >
template<typename... ARGS>
CheckedCore ( ARGS &&...  init)
inline

blindly pass-down any argument...

Remarks
allows slicing move-initialisation from decorated

Definition at line 569 of file iter-adapter.hpp.

◆ CheckedCore() [2/4]

template<class COR >
CheckedCore ( )
default

◆ CheckedCore() [3/4]

template<class COR >
CheckedCore ( CheckedCore< COR > &&  )
default

◆ CheckedCore() [4/4]

template<class COR >
CheckedCore ( CheckedCore< COR > const &  )
default

Member Typedef Documentation

◆ TAG_CheckedCore_Raw

template<class COR >
using TAG_CheckedCore_Raw = COR

marker to allow unwrapping the raw core

Definition at line 579 of file iter-adapter.hpp.

Member Function Documentation

◆ _rawCore()

template<class COR >
COR & _rawCore ( ) const
inlineprotected

Definition at line 552 of file iter-adapter.hpp.

References util::unConst().

Referenced by CheckedCore< COR >::checkPoint(), CheckedCore< COR >::iterNext(), and CheckedCore< COR >::yield().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __throw_if_empty()

template<class COR >
void __throw_if_empty ( ) const
inlineprotected

Definition at line 558 of file iter-adapter.hpp.

References CheckedCore< COR >::checkPoint().

Referenced by CheckedCore< COR >::iterNext(), and CheckedCore< COR >::yield().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [1/2]

template<class COR >
CheckedCore & operator= ( CheckedCore< COR > &&  )
default

◆ operator=() [2/2]

template<class COR >
CheckedCore & operator= ( CheckedCore< COR > const &  )
default

◆ checkPoint()

template<class COR >
bool checkPoint ( ) const
inline

Definition at line 584 of file iter-adapter.hpp.

References CheckedCore< COR >::_rawCore().

Referenced by CheckedCore< COR >::__throw_if_empty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yield()

template<class COR >
decltype(auto) yield ( ) const
inline

Definition at line 590 of file iter-adapter.hpp.

References CheckedCore< COR >::__throw_if_empty(), and CheckedCore< COR >::_rawCore().

+ Here is the call graph for this function:

◆ iterNext()

template<class COR >
void iterNext ( )
inline

Definition at line 597 of file iter-adapter.hpp.

References CheckedCore< COR >::__throw_if_empty(), and CheckedCore< COR >::_rawCore().

+ Here is the call graph for this function:
+ Inheritance diagram for CheckedCore< COR >:
+ Collaboration diagram for CheckedCore< COR >:

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