Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
toolbox::io::BasicDisposer< DerivedT > Class Template Reference

#include <toolbox/io/Disposer.hpp>

Public Member Functions

 BasicDisposer () noexcept=default
 
 BasicDisposer (const BasicDisposer &)=delete
 
BasicDisposeroperator= (const BasicDisposer &)=delete
 
 BasicDisposer (BasicDisposer &&)=delete
 
BasicDisposeroperator= (BasicDisposer &&)=delete
 
void dispose (CyclTime now) noexcept
 The dispose method may be safely called from callback functions while a lock is held.
 

Protected Member Functions

 ~BasicDisposer ()=default
 
bool is_locked () const noexcept
 Returns true if the lock is held or the object has been disposed.
 
auto lock_this (CyclTime now) noexcept
 

Detailed Description

template<typename DerivedT>
class toolbox::io::BasicDisposer< DerivedT >

The BasicDisposer class template exposes a public dispose method that may be safely called from callback functions while a lock is held.

Definition at line 29 of file Disposer.hpp.

Constructor & Destructor Documentation

◆ BasicDisposer() [1/3]

template<typename DerivedT >
toolbox::io::BasicDisposer< DerivedT >::BasicDisposer ( )
defaultnoexcept

◆ BasicDisposer() [2/3]

template<typename DerivedT >
toolbox::io::BasicDisposer< DerivedT >::BasicDisposer ( const BasicDisposer< DerivedT > &  )
delete

◆ BasicDisposer() [3/3]

template<typename DerivedT >
toolbox::io::BasicDisposer< DerivedT >::BasicDisposer ( BasicDisposer< DerivedT > &&  )
delete

◆ ~BasicDisposer()

template<typename DerivedT >
toolbox::io::BasicDisposer< DerivedT >::~BasicDisposer ( )
protecteddefault

Member Function Documentation

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ dispose()

template<typename DerivedT >
void toolbox::io::BasicDisposer< DerivedT >::dispose ( CyclTime  now)
inlinenoexcept

The dispose method may be safely called from callback functions while a lock is held.

Definition at line 42 of file Disposer.hpp.

◆ is_locked()

template<typename DerivedT >
bool toolbox::io::BasicDisposer< DerivedT >::is_locked ( ) const
inlineprotectednoexcept

Returns true if the lock is held or the object has been disposed.

Definition at line 58 of file Disposer.hpp.

◆ lock_this()

template<typename DerivedT >
auto toolbox::io::BasicDisposer< DerivedT >::lock_this ( CyclTime  now)
inlineprotectednoexcept

Returns a lock that prevents the disposer instance from being deleted while the lock is held.

Definition at line 62 of file Disposer.hpp.


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