libcopp 2.3.1
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
stackful_channel_context< TVALUE > Class Template Reference

#include <stackful_channel.h>

Inheritance diagram for stackful_channel_context< TVALUE >:
Inheritance graph
Collaboration diagram for stackful_channel_context< TVALUE >:
Collaboration graph

Public Types

using value_type = TVALUE
 
using handle_delegate = stackful_channel_context_base::handle_delegate
 
using handle_delegate_hash = stackful_channel_context_base::handle_delegate_hash
 

Public Member Functions

LIBCOPP_UTIL_FORCEINLINE stackful_channel_context () noexcept(std::is_nothrow_constructible< future::future< value_type > >::value)
 
LIBCOPP_UTIL_FORCEINLINE ~stackful_channel_context () noexcept(std::is_nothrow_destructible< future::future< value_type > >::value)
 
LIBCOPP_UTIL_FORCEINLINE bool is_ready () const noexcept
 
LIBCOPP_UTIL_FORCEINLINE bool is_pending () const noexcept
 
LIBCOPP_UTIL_FORCEINLINE void reset_value () noexcept(noexcept(std::declval< future::future< TVALUE > >().reset_data()))
 
template<class U >
LIBCOPP_UTIL_FORCEINLINE void set_value (U &&in) noexcept(noexcept(std::declval< future::future< TVALUE > >().reset_data(std::forward< U >(in))))
 
LIBCOPP_UTIL_FORCEINLINE const value_typeget_value () const noexcept
 
LIBCOPP_UTIL_FORCEINLINE value_typeget_value () noexcept
 
template<class TCONTEXT , class TERROR_TRANSFORM , class = nostd::enable_if_t<!std::is_base_of<coroutine_context, nostd::remove_cvref_t<TCONTEXT>>::value >>
LIBCOPP_UTIL_FORCEINLINE value_type inject_await (TCONTEXT *ctx, TERROR_TRANSFORM &&error_transform) noexcept(std::is_nothrow_copy_constructible< value_type >::value &&noexcept(error_transform(COPP_EC_ARGS_ERROR)))
 
template<class TERROR_TRANSFORM >
LIBCOPP_UTIL_FORCEINLINE value_type inject_await (coroutine_context *ctx, TERROR_TRANSFORM &&error_transform) noexcept(std::is_nothrow_copy_constructible< value_type >::value &&noexcept(error_transform(COPP_EC_ARGS_ERROR)))
 
LIBCOPP_COPP_API void add_caller (handle_delegate handle) noexcept
 
LIBCOPP_COPP_API bool remove_caller (handle_delegate handle) noexcept
 
LIBCOPP_COPP_API size_t resume_callers ()
 
LIBCOPP_COPP_API bool has_multiple_callers () const noexcept
 

Protected Member Functions

LIBCOPP_COPP_API void wake ()
 

Private Types

using multi_caller_set = std::unordered_set< handle_delegate, handle_delegate_hash >
 

Private Member Functions

template<class TCONTEXT , class TERROR_TRANSFORM >
value_type internal_inject_await (TCONTEXT *ctx, TERROR_TRANSFORM &&error_transform) noexcept(std::is_nothrow_copy_constructible< value_type >::value &&noexcept(error_transform(COPP_EC_ARGS_ERROR)))
 

Private Attributes

future::future< TVALUE > data_
 
handle_delegate unique_caller_
 
std::unique_ptr< multi_caller_setmultiple_callers_
 

Detailed Description

template<class TVALUE>
class stackful_channel_context< TVALUE >

Definition at line 236 of file stackful_channel.h.

Member Typedef Documentation

◆ handle_delegate

template<class TVALUE >
using stackful_channel_context< TVALUE >::handle_delegate = stackful_channel_context_base::handle_delegate

Definition at line 239 of file stackful_channel.h.

◆ handle_delegate_hash

template<class TVALUE >
using stackful_channel_context< TVALUE >::handle_delegate_hash = stackful_channel_context_base::handle_delegate_hash

Definition at line 240 of file stackful_channel.h.

◆ multi_caller_set

Definition at line 225 of file stackful_channel.h.

◆ value_type

template<class TVALUE >
using stackful_channel_context< TVALUE >::value_type = TVALUE

Definition at line 238 of file stackful_channel.h.

Constructor & Destructor Documentation

◆ stackful_channel_context()

template<class TVALUE >
LIBCOPP_UTIL_FORCEINLINE stackful_channel_context< TVALUE >::stackful_channel_context ( )
inlinenoexcept

Definition at line 243 of file stackful_channel.h.

◆ ~stackful_channel_context()

template<class TVALUE >
LIBCOPP_UTIL_FORCEINLINE stackful_channel_context< TVALUE >::~stackful_channel_context ( )
inlinenoexcept

Definition at line 246 of file stackful_channel.h.

Member Function Documentation

◆ add_caller()

LIBCOPP_COPP_API void stackful_channel_context_base::add_caller ( handle_delegate  handle)
noexceptinherited

Definition at line 41 of file stackful_channel.cpp.

◆ get_value() [1/2]

template<class TVALUE >
LIBCOPP_UTIL_FORCEINLINE const value_type * stackful_channel_context< TVALUE >::get_value ( ) const
inlinenoexcept

Definition at line 267 of file stackful_channel.h.

◆ get_value() [2/2]

template<class TVALUE >
LIBCOPP_UTIL_FORCEINLINE value_type * stackful_channel_context< TVALUE >::get_value ( )
inlinenoexcept

Definition at line 269 of file stackful_channel.h.

◆ has_multiple_callers()

LIBCOPP_COPP_API bool stackful_channel_context_base::has_multiple_callers ( ) const
noexceptinherited

◆ inject_await() [1/2]

template<class TVALUE >
template<class TERROR_TRANSFORM >
LIBCOPP_UTIL_FORCEINLINE value_type stackful_channel_context< TVALUE >::inject_await ( coroutine_context ctx,
TERROR_TRANSFORM &&  error_transform 
)
inlinenoexcept

Definition at line 284 of file stackful_channel.h.

◆ inject_await() [2/2]

template<class TVALUE >
template<class TCONTEXT , class TERROR_TRANSFORM , class = nostd::enable_if_t<!std::is_base_of<coroutine_context, nostd::remove_cvref_t<TCONTEXT>>::value >>
LIBCOPP_UTIL_FORCEINLINE value_type stackful_channel_context< TVALUE >::inject_await ( TCONTEXT *  ctx,
TERROR_TRANSFORM &&  error_transform 
)
inlinenoexcept

Definition at line 278 of file stackful_channel.h.

◆ internal_inject_await()

template<class TVALUE >
template<class TCONTEXT , class TERROR_TRANSFORM >
value_type stackful_channel_context< TVALUE >::internal_inject_await ( TCONTEXT *  ctx,
TERROR_TRANSFORM &&  error_transform 
)
inlineprivatenoexcept

◆ is_pending()

template<class TVALUE >
LIBCOPP_UTIL_FORCEINLINE bool stackful_channel_context< TVALUE >::is_pending ( ) const
inlinenoexcept

Definition at line 252 of file stackful_channel.h.

◆ is_ready()

template<class TVALUE >
LIBCOPP_UTIL_FORCEINLINE bool stackful_channel_context< TVALUE >::is_ready ( ) const
inlinenoexcept

Definition at line 250 of file stackful_channel.h.

◆ remove_caller()

LIBCOPP_COPP_API bool stackful_channel_context_base::remove_caller ( handle_delegate  handle)
noexceptinherited

Definition at line 75 of file stackful_channel.cpp.

◆ reset_value()

template<class TVALUE >
LIBCOPP_UTIL_FORCEINLINE void stackful_channel_context< TVALUE >::reset_value ( )
inlinenoexcept

Definition at line 254 of file stackful_channel.h.

◆ resume_callers()

LIBCOPP_COPP_API size_t stackful_channel_context_base::resume_callers ( )
inherited

◆ set_value()

template<class TVALUE >
template<class U >
LIBCOPP_UTIL_FORCEINLINE void stackful_channel_context< TVALUE >::set_value ( U &&  in)
inlinenoexcept

Definition at line 259 of file stackful_channel.h.

◆ wake()

LIBCOPP_COPP_API void stackful_channel_context_base::wake ( )
protectedinherited

Field Documentation

◆ data_

template<class TVALUE >
future::future<TVALUE> stackful_channel_context< TVALUE >::data_
private

Definition at line 334 of file stackful_channel.h.

◆ multiple_callers_

std::unique_ptr<multi_caller_set> stackful_channel_context_base::multiple_callers_
privateinherited

◆ unique_caller_

handle_delegate stackful_channel_context_base::unique_caller_
privateinherited

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