Public Member Functions | Private Member Functions | Private Attributes | List of all members
librealsense::lazy< T > Class Template Reference

#include <types.h>

Public Member Functions

 lazy ()
 
 lazy (std::function< T()> initializer)
 
 lazy (lazy &&other) noexcept
 
T & operator* ()
 
const T & operator* () const
 
T * operator-> () const
 
lazyoperator= (std::function< T()> func) noexcept
 
lazyoperator= (lazy &&other) noexcept
 
void reset () const
 

Private Member Functions

T * operate () const
 

Private Attributes

std::function< T()> _init
 
std::mutex _mtx
 
std::unique_ptr< T > _ptr
 
bool _was_init = false
 

Detailed Description

template<class T>
class librealsense::lazy< T >

Definition at line 405 of file src/types.h.

Constructor & Destructor Documentation

template<class T>
librealsense::lazy< T >::lazy ( )
inline

Definition at line 408 of file src/types.h.

template<class T>
librealsense::lazy< T >::lazy ( std::function< T()>  initializer)
inline

Definition at line 409 of file src/types.h.

template<class T>
librealsense::lazy< T >::lazy ( lazy< T > &&  other)
inlinenoexcept

Definition at line 426 of file src/types.h.

Member Function Documentation

template<class T>
T* librealsense::lazy< T >::operate ( ) const
inlineprivate

Definition at line 477 of file src/types.h.

template<class T>
T& librealsense::lazy< T >::operator* ( )
inline

Definition at line 416 of file src/types.h.

template<class T>
const T& librealsense::lazy< T >::operator* ( ) const
inline

Definition at line 421 of file src/types.h.

template<class T>
T* librealsense::lazy< T >::operator-> ( ) const
inline

Definition at line 411 of file src/types.h.

template<class T>
lazy& librealsense::lazy< T >::operator= ( std::function< T()>  func)
inlinenoexcept

Definition at line 442 of file src/types.h.

template<class T>
lazy& librealsense::lazy< T >::operator= ( lazy< T > &&  other)
inlinenoexcept

Definition at line 447 of file src/types.h.

template<class T>
void librealsense::lazy< T >::reset ( void  ) const
inline

Definition at line 466 of file src/types.h.

Member Data Documentation

template<class T>
std::function<T()> librealsense::lazy< T >::_init
private

Definition at line 490 of file src/types.h.

template<class T>
std::mutex librealsense::lazy< T >::_mtx
mutableprivate

Definition at line 488 of file src/types.h.

template<class T>
std::unique_ptr<T> librealsense::lazy< T >::_ptr
mutableprivate

Definition at line 491 of file src/types.h.

template<class T>
bool librealsense::lazy< T >::_was_init = false
mutableprivate

Definition at line 489 of file src/types.h.


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


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:37