ReactivePlusPlus
ReactiveX implementation for C++20
Loading...
Searching...
No Matches
rpp::composite_disposable_impl< Container > Class Template Reference

Disposable which can keep some other sub-disposables. When this root disposable is disposed, then all sub-disposables would be disposed too. More...

#include <composite_disposable.hpp>

Public Member Functions

 composite_disposable_impl (const composite_disposable_impl &)=delete
 
 composite_disposable_impl (composite_disposable_impl &&other) noexcept=delete
 
bool is_disposed () const noexcept final
 Check if this disposable is just disposed.
 
void dispose_impl (interface_disposable::Mode mode) noexcept final
 
void add (disposable_wrapper disposable) override
 
void remove (const disposable_wrapper &disposable) override
 
void clear () override
 
template<rpp::constraint::is_nothrow_invocable Fn>
disposable_wrapper add (Fn &&invocable)
 
- Public Member Functions inherited from rpp::interface_composite_disposable
template<rpp::constraint::is_nothrow_invocable Fn>
disposable_wrapper add (Fn &&invocable)
 
- Public Member Functions inherited from rpp::interface_disposable
void dispose () noexcept
 Dispose disposable and free any underlying resources and etc.
 

Protected Member Functions

virtual void composite_dispose_impl (interface_disposable::Mode) noexcept
 
- Protected Member Functions inherited from rpp::interface_disposable

Additional Inherited Members

- Protected Types inherited from rpp::interface_disposable
enum class  Mode : bool { Disposing = 0 , Destroying = 1 }
 

Detailed Description

template<details::disposables::constraint::disposables_container Container>
class rpp::composite_disposable_impl< Container >

Disposable which can keep some other sub-disposables. When this root disposable is disposed, then all sub-disposables would be disposed too.

Template Parameters
Containeris type of internal storage used to keep dependencies

Member Function Documentation

◆ add()

template<details::disposables::constraint::disposables_container Container>
void rpp::composite_disposable_impl< Container >::add ( disposable_wrapper disposable)
inlineoverridevirtual

◆ clear()

template<details::disposables::constraint::disposables_container Container>
void rpp::composite_disposable_impl< Container >::clear ( )
inlineoverridevirtual

◆ dispose_impl()

template<details::disposables::constraint::disposables_container Container>
void rpp::composite_disposable_impl< Container >::dispose_impl ( interface_disposable::Mode mode)
inlinefinalvirtualnoexcept

◆ is_disposed()

template<details::disposables::constraint::disposables_container Container>
bool rpp::composite_disposable_impl< Container >::is_disposed ( ) const
inlinefinalvirtualnoexcept

Check if this disposable is just disposed.

Attention
This function must be thread-safe

Implements rpp::interface_disposable.

◆ remove()

template<details::disposables::constraint::disposables_container Container>
void rpp::composite_disposable_impl< Container >::remove ( const disposable_wrapper & disposable)
inlineoverridevirtual

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