CGRA-ME
Public Types | Public Member Functions | Private Attributes | List of all members
LazyPointer< Gen, Value_ > Struct Template Reference

#include <Functional.h>

Public Types

using Value = Value_
 

Public Member Functions

template<typename G >
 LazyPointer (G &&g)
 
 LazyPointer (LazyPointer &&src)
 
LazyPointeroperator= (LazyPointer &&rhs)
 
Valueoperator* ()
 
const Valueoperator* () const
 
Valueoperator-> ()
 
const Valueoperator-> () const
 
bool isResolved () const
 
void resolve () const
 

Private Attributes

Gen gen
 
std::unique_ptr< Valuestorage = nullptr
 
std::once_flag is_resolved = {}
 

Detailed Description

template<typename Gen, typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
struct LazyPointer< Gen, Value_ >

Definition at line 18 of file Functional.h.

Member Typedef Documentation

◆ Value

template<typename Gen , typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
using LazyPointer< Gen, Value_ >::Value = Value_

Definition at line 51 of file Functional.h.

Constructor & Destructor Documentation

◆ LazyPointer() [1/2]

template<typename Gen , typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
template<typename G >
LazyPointer< Gen, Value_ >::LazyPointer ( G &&  g)
inline

Definition at line 54 of file Functional.h.

◆ LazyPointer() [2/2]

template<typename Gen , typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
LazyPointer< Gen, Value_ >::LazyPointer ( LazyPointer< Gen, Value_ > &&  src)
inline

Definition at line 56 of file Functional.h.

Member Function Documentation

◆ isResolved()

template<typename Gen , typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
bool LazyPointer< Gen, Value_ >::isResolved ( ) const
inline

Definition at line 72 of file Functional.h.

◆ operator*() [1/2]

template<typename Gen , typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
Value& LazyPointer< Gen, Value_ >::operator* ( )
inline

Definition at line 66 of file Functional.h.

◆ operator*() [2/2]

template<typename Gen , typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
const Value& LazyPointer< Gen, Value_ >::operator* ( ) const
inline

Definition at line 67 of file Functional.h.

◆ operator->() [1/2]

template<typename Gen , typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
Value* LazyPointer< Gen, Value_ >::operator-> ( )
inline

Definition at line 69 of file Functional.h.

◆ operator->() [2/2]

template<typename Gen , typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
const Value* LazyPointer< Gen, Value_ >::operator-> ( ) const
inline

Definition at line 70 of file Functional.h.

◆ operator=()

template<typename Gen , typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
LazyPointer& LazyPointer< Gen, Value_ >::operator= ( LazyPointer< Gen, Value_ > &&  rhs)
inline

Definition at line 61 of file Functional.h.

◆ resolve()

template<typename Gen , typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
void LazyPointer< Gen, Value_ >::resolve ( ) const
inline

Definition at line 74 of file Functional.h.

Member Data Documentation

◆ gen

template<typename Gen , typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
Gen LazyPointer< Gen, Value_ >::gen
mutableprivate

Definition at line 82 of file Functional.h.

◆ is_resolved

template<typename Gen , typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
std::once_flag LazyPointer< Gen, Value_ >::is_resolved = {}
mutableprivate

Definition at line 84 of file Functional.h.

◆ storage

template<typename Gen , typename Value_ = std::remove_cv_t<std::remove_reference_t<decltype(std::declval<Gen>()())>>
std::unique_ptr<Value> LazyPointer< Gen, Value_ >::storage = nullptr
mutableprivate

Definition at line 83 of file Functional.h.


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