DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExp::ModuleDataBase::ModuleThreadOnlyType Class Reference

Allow exclusive access to some of ModuleDataBase's private methods to the module thread ModuleThreadMain(). More...

Private Member Functions

constexpr ModuleThreadOnlyType (ModuleDataBase &Parent) noexcept
 Construcs an instance - one for each ModuleDataBase instance. More...
 
auto & GetNewEventNotifier () noexcept
 Getter for NewEventNotifier. More...
 
void SetException (std::exception_ptr ModuleException) noexcept
 Setter for ModuleDataBase::ModuleException. More...
 

Private Attributes

ModuleDataBaseParent
 Owning ModuleDataBase instance. More...
 

Friends

class ModuleDataBase
 
int ModuleThreadMain (ModuleInstance, ModuleBase *const)
 Modules run in their own thread. This is the module thread's main function. More...
 

Detailed Description

Allow exclusive access to some of ModuleDataBase's private methods to the module thread ModuleThreadMain().

Definition at line 217 of file Module.h.

Constructor & Destructor Documentation

◆ ModuleThreadOnlyType()

constexpr DynExp::ModuleDataBase::ModuleThreadOnlyType::ModuleThreadOnlyType ( ModuleDataBase Parent)
inlineconstexprprivatenoexcept

Construcs an instance - one for each ModuleDataBase instance.

Parameters
ParentOwning ModuleDataBase instance

Definition at line 226 of file Module.h.

Member Function Documentation

◆ GetNewEventNotifier()

auto& DynExp::ModuleDataBase::ModuleThreadOnlyType::GetNewEventNotifier ( )
inlineprivatenoexcept

Getter for NewEventNotifier.

Returns
Returns NewEventNotifier to notify the module thread about new events.

Definition at line 228 of file Module.h.

◆ SetException()

void DynExp::ModuleDataBase::ModuleThreadOnlyType::SetException ( std::exception_ptr  ModuleException)
inlineprivatenoexcept

Setter for ModuleDataBase::ModuleException.

Definition at line 229 of file Module.h.

Friends And Related Function Documentation

◆ ModuleDataBase

friend class ModuleDataBase
friend

Definition at line 219 of file Module.h.

◆ ModuleThreadMain

int ModuleThreadMain ( ModuleInstance  ,
ModuleBase * const   
)
friend

Modules run in their own thread. This is the module thread's main function.

Parameters
InstanceHandle to the module thread's data related to the module running this thread. The module thread is expected to let the lifetime of Instance expire upon termination.
ModulePointer to the module running this thread
Returns
Util::DynExpErrorCodes::NoError if the thread terminated without an error, the respective error code otherwise.

Definition at line 10 of file Module.cpp.

Member Data Documentation

◆ Parent

ModuleDataBase& DynExp::ModuleDataBase::ModuleThreadOnlyType::Parent
private

Owning ModuleDataBase instance.

Definition at line 231 of file Module.h.


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