DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExp::Object::LinkedObjectWrapperOnlyType Class Reference

Allow exclusive access to some of Object's private methods to any LinkedObjectWrapper<T>. More...

Private Member Functions

constexpr LinkedObjectWrapperOnlyType (Object &Parent) noexcept
 Construcs an instance - one for each Object instance. More...
 
(De)Registering @p Object's making use of this @p Object instance

Logical const-ness: users are allowed to make use of const Objects. So, registering and deregistering them to const objects must be allowed

void RegisterUser (const Object &User, const std::chrono::milliseconds Timeout) const
 Registers a user in a thread-safe way. More...
 
void DeregisterUser (const Object &User, const std::chrono::milliseconds Timeout) const
 Deregisters a user in a thread-safe way. More...
 

Private Attributes

ObjectParent
 Owning Object instance. More...
 

Friends

class Object
 
template<typename >
class LinkedObjectWrapper
 

Detailed Description

Allow exclusive access to some of Object's private methods to any LinkedObjectWrapper<T>.

Definition at line 2035 of file Object.h.

Constructor & Destructor Documentation

◆ LinkedObjectWrapperOnlyType()

constexpr DynExp::Object::LinkedObjectWrapperOnlyType::LinkedObjectWrapperOnlyType ( Object Parent)
inlineconstexprprivatenoexcept

Construcs an instance - one for each Object instance.

Parameters
ParentOwning Object instance

Definition at line 2046 of file Object.h.

Member Function Documentation

◆ DeregisterUser()

void DynExp::Object::LinkedObjectWrapperOnlyType::DeregisterUser ( const Object User,
const std::chrono::milliseconds  Timeout 
) const
private

Deregisters a user in a thread-safe way.

Parameters
UserInstance of class Object to be deregistered as a user.
TimeoutTimeout of the mutex-locking operation.

Definition at line 398 of file Object.cpp.

◆ RegisterUser()

void DynExp::Object::LinkedObjectWrapperOnlyType::RegisterUser ( const Object User,
const std::chrono::milliseconds  Timeout 
) const
private

Registers a user in a thread-safe way.

Parameters
UserInstance of class Object to be registered as a user.
TimeoutTimeout of the mutex-locking operation.
Exceptions
Util::InvalidStateExceptionis thrown if Parent is not ready. Refer to Object::IsReady().
Util::NotAvailableExceptionis thrown if shared usage for Parent is not enabled and if Parent is not unused. Refer to ParamsBase::UsageType.

Definition at line 375 of file Object.cpp.

Friends And Related Function Documentation

◆ LinkedObjectWrapper

template<typename >
friend class LinkedObjectWrapper
friend

Definition at line 2040 of file Object.h.

◆ Object

friend class Object
friend

Definition at line 2037 of file Object.h.

Member Data Documentation

◆ Parent

Object& DynExp::Object::LinkedObjectWrapperOnlyType::Parent
private

Owning Object instance.

Definition at line 2068 of file Object.h.


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