SObjectizer 5.8
Loading...
Searching...
No Matches
timertt::details::buffer_allocated_object< T > Class Template Reference

A special storage to be used for holding non-default constructible objects which are created by demand. More...

#include <all.hpp>

Public Types

using pointer = T*
 
using element_type = T
 
using reference = typename std::add_lvalue_reference<T>::type
 

Public Member Functions

 buffer_allocated_object () TIMERTT_NOEXCEPT=default
 
 buffer_allocated_object (const buffer_allocated_object &)=delete
 
 buffer_allocated_object (buffer_allocated_object &&)=delete
 
 ~buffer_allocated_object ()
 
template<typename... Args>
void allocate (Args &&...args)
 
void destroy ()
 
 operator bool () const TIMERTT_NOEXCEPT
 
pointer get () const TIMERTT_NOEXCEPT
 
pointer operator-> () const TIMERTT_NOEXCEPT
 
reference operator* () const TIMERTT_NOEXCEPT
 

Private Member Functions

void destroy_if_allocated ()
 

Private Attributes

TIMERTT_ALIGNAS_WORKAROUND(T) std bool allocated_ { false }
 

Detailed Description

template<typename T>
class timertt::details::buffer_allocated_object< T >

A special storage to be used for holding non-default constructible objects which are created by demand.

Note
In C++17 std::optional can be used instead of this class.
Since
v.1.2.0

Definition at line 554 of file 3rd_party/timertt/all.hpp.

Member Typedef Documentation

◆ element_type

template<typename T >
using timertt::details::buffer_allocated_object< T >::element_type = T

Definition at line 570 of file 3rd_party/timertt/all.hpp.

◆ pointer

template<typename T >
using timertt::details::buffer_allocated_object< T >::pointer = T*

Definition at line 569 of file 3rd_party/timertt/all.hpp.

◆ reference

template<typename T >
using timertt::details::buffer_allocated_object< T >::reference = typename std::add_lvalue_reference<T>::type

Definition at line 571 of file 3rd_party/timertt/all.hpp.

Constructor & Destructor Documentation

◆ buffer_allocated_object() [1/3]

template<typename T >
timertt::details::buffer_allocated_object< T >::buffer_allocated_object ( )
default

◆ buffer_allocated_object() [2/3]

template<typename T >
timertt::details::buffer_allocated_object< T >::buffer_allocated_object ( const buffer_allocated_object< T > & )
delete

◆ buffer_allocated_object() [3/3]

template<typename T >
timertt::details::buffer_allocated_object< T >::buffer_allocated_object ( buffer_allocated_object< T > && )
delete

◆ ~buffer_allocated_object()

template<typename T >
timertt::details::buffer_allocated_object< T >::~buffer_allocated_object ( )
inline

Definition at line 577 of file 3rd_party/timertt/all.hpp.

Member Function Documentation

◆ allocate()

template<typename T >
template<typename... Args>
void timertt::details::buffer_allocated_object< T >::allocate ( Args &&... args)
inline

Definition at line 583 of file 3rd_party/timertt/all.hpp.

◆ destroy()

template<typename T >
void timertt::details::buffer_allocated_object< T >::destroy ( )
inline

Definition at line 590 of file 3rd_party/timertt/all.hpp.

◆ destroy_if_allocated()

template<typename T >
void timertt::details::buffer_allocated_object< T >::destroy_if_allocated ( )
inlineprivate

Definition at line 559 of file 3rd_party/timertt/all.hpp.

◆ get()

template<typename T >
pointer timertt::details::buffer_allocated_object< T >::get ( ) const
inline

Definition at line 600 of file 3rd_party/timertt/all.hpp.

◆ operator bool()

template<typename T >
timertt::details::buffer_allocated_object< T >::operator bool ( ) const
inline

Definition at line 595 of file 3rd_party/timertt/all.hpp.

◆ operator*()

template<typename T >
reference timertt::details::buffer_allocated_object< T >::operator* ( ) const
inline

Definition at line 610 of file 3rd_party/timertt/all.hpp.

◆ operator->()

template<typename T >
pointer timertt::details::buffer_allocated_object< T >::operator-> ( ) const
inline

Definition at line 605 of file 3rd_party/timertt/all.hpp.

Member Data Documentation

◆ allocated_

template<typename T >
TIMERTT_ALIGNAS_WORKAROUND (T) std bool timertt::details::buffer_allocated_object< T >::allocated_ { false }
private

Definition at line 557 of file 3rd_party/timertt/all.hpp.


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