YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
yaclib::detail::BaseCore Class Reference

#include <base_core.hpp>

Inheritance diagram for yaclib::detail::BaseCore:
[legend]
Collaboration diagram for yaclib::detail::BaseCore:
[legend]

Public Types

enum  State : std::uintptr_t { kEmpty = std::uintptr_t{0} , kResult = std::numeric_limits<std::uintptr_t>::max() }
 

Public Member Functions

bool Empty () const noexcept
 
void MoveExecutorTo (BaseCore &callback) noexcept
 
void CopyExecutorTo (BaseCore &callback) noexcept
 
- Public Member Functions inherited from yaclib::detail::InlineCore
virtual InlineCoreHere (InlineCore &caller) noexcept=0
 
- Public Member Functions inherited from yaclib::Job
virtual void Drop () noexcept
 
- Public Member Functions inherited from yaclib::IFunc
virtual void Call () noexcept
 
- Public Member Functions inherited from yaclib::IRef
virtual void IncRef () noexcept
 Increments reference counter.
 
virtual void DecRef () noexcept
 Decrements reference counter.
 
virtual std::size_t GetRef () noexcept
 
virtual ~IRef () noexcept=default
 

Public Attributes

IExecutorPtr _executor {NoRefTag{}, &MakeInline()}
 
- Public Attributes inherited from yaclib::detail::Node
Nodenext = nullptr
 

Protected Member Functions

 BaseCore (State state) noexcept
 
void StoreCallbackImpl (InlineCore &callback) noexcept
 
template<bool Shared>
bool SetCallbackImpl (InlineCore &callback) noexcept
 
bool ResetImpl () noexcept
 
template<bool SymmetricTransfer, bool Shared>
Transfer< SymmetricTransferSetInlineImpl (InlineCore &callback) noexcept
 
template<bool SymmetricTransfer, bool Shared>
Transfer< SymmetricTransferSetResultImpl () noexcept
 

Protected Attributes

yaclib_std::atomic_uintptr_t _callback
 

Friends

struct UniqueHandle
 
struct SharedHandle
 

Detailed Description

Definition at line 16 of file base_core.hpp.

Member Enumeration Documentation

◆ State

Enumerator
kEmpty 
kResult 

Definition at line 21 of file base_core.hpp.

Constructor & Destructor Documentation

◆ BaseCore()

yaclib::detail::BaseCore::BaseCore ( State  state)
inlineexplicitprotectednoexcept

Definition at line 55 of file base_core.hpp.

References yaclib::MakeContract().

Member Function Documentation

◆ CopyExecutorTo()

void yaclib::detail::BaseCore::CopyExecutorTo ( BaseCore callback)
inlinenoexcept

Definition at line 38 of file base_core.hpp.

References _executor, yaclib::MakeContract(), and YACLIB_ASSERT.

◆ Empty()

bool yaclib::detail::BaseCore::Empty ( ) const
inlinenoexcept

Definition at line 26 of file base_core.hpp.

References _callback, kEmpty, and yaclib::MakeContract().

◆ MoveExecutorTo()

void yaclib::detail::BaseCore::MoveExecutorTo ( BaseCore callback)
inlinenoexcept

Definition at line 31 of file base_core.hpp.

References _executor, yaclib::MakeContract(), and YACLIB_ASSERT.

◆ ResetImpl()

bool yaclib::detail::BaseCore::ResetImpl ( )
protectednoexcept

Definition at line 30 of file base_core.cpp.

References _callback, kEmpty, kResult, and yaclib::MakeContract().

◆ SetCallbackImpl()

template<bool Shared>
template bool yaclib::detail::BaseCore::SetCallbackImpl< true > ( InlineCore callback)
protectednoexcept

Definition at line 6 of file base_core.cpp.

References yaclib::MakeContract(), yaclib::detail::Shared, and YACLIB_ASSERT.

◆ SetInlineImpl()

template<bool SymmetricTransfer, bool Shared>
template Transfer< false > yaclib::detail::BaseCore::SetInlineImpl< false, true > ( InlineCore callback)
protectednoexcept

Definition at line 37 of file base_core.cpp.

References yaclib::MakeContract().

◆ SetResultImpl()

template<bool SymmetricTransfer, bool Shared>
template Transfer< false > yaclib::detail::BaseCore::SetResultImpl< false, true > ( )
protectednoexcept

◆ StoreCallbackImpl()

void yaclib::detail::BaseCore::StoreCallbackImpl ( InlineCore callback)
inlineprotectednoexcept

Friends And Related Symbol Documentation

◆ SharedHandle

Definition at line 18 of file base_core.hpp.

◆ UniqueHandle

Definition at line 17 of file base_core.hpp.

Member Data Documentation

◆ _callback

yaclib_std::atomic_uintptr_t yaclib::detail::BaseCore::_callback
protected

◆ _executor


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