DynExp
Highly flexible laboratory automation for dynamically changing experiments.
|
Polymorphic base class to allow storing LinkedObjectWrapper
of any type in a single list.
More...
Classes | |
struct | OwnedLinkedObjectWrapperType |
Helper type linking a LinkedObjectWrapperBasePtrType to the corresponding LinkedObjectWrapperContainerBase instance. More... | |
Public Member Functions | |
LinkedObjectWrapperBase (const RunnableInstance &Owner) | |
Constructs a LinkedObjectWrapperBase instance. More... | |
virtual | ~LinkedObjectWrapperBase ()=0 |
const Object & | GetOwner () const noexcept |
Returns the owner of this wrapper. More... | |
Override | |
Override by derived class. | |
virtual bool | IsRegistered () const noexcept=0 |
Returns whether the wrapper has registered its owning Object instance (through Owner) as a user of the target resource (refer to LinkedObjectWrapper::DestinyResource). More... | |
Public Member Functions inherited from Util::INonCopyable | |
INonCopyable (const INonCopyable &)=delete | |
INonCopyable & | operator= (const INonCopyable &)=delete |
Private Types | |
using | LinkedObjectWrapperBasePtrType = std::unique_ptr< LinkedObjectWrapperBase > |
Alias for a smart pointer owning instances of this class. More... | |
using | ListType = std::list< OwnedLinkedObjectWrapperType > |
Type of a list hold by RunnableInstance (RunnableInstance::OwnedLinkedObjectWrappers) that contains pointers to all LinkedObjectWrapperBase instances and their corresponding containers the RunnableInstance instance owns. More... | |
Private Attributes | |
const RunnableInstance & | Owner |
Instance of class RunnableInstance managing the wrapper. More... | |
Friends | |
class | RunnableInstance |
Override (methods for class RunnableInstance) | |
Override by derived class. Accessed directly by class | |
ListType::const_iterator | ListPos |
Position of this wrapper instance in the list of LinkedObjectWrapperBase instances kept by the owning RunnableInstance instance Owner (refer to RunnableInstance::OwnedLinkedObjectWrappers). For std::list, iterators are not invalidaded upon insertion or erasure (for non-affected entries). More... | |
virtual void | Register (const std::chrono::milliseconds Timeout)=0 |
Registers the wrapper's owning Object instance (through Owner) as a user of the target resource (refer to LinkedObjectWrapper::DestinyResource). More... | |
virtual void | Deregister (const std::chrono::milliseconds Timeout)=0 |
Deregisters the wrapper's owning Object instance (through Owner) as a user of the target resource (refer to LinkedObjectWrapper::DestinyResource). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Util::INonCopyable | |
constexpr | INonCopyable ()=default |
~INonCopyable ()=default | |
Polymorphic base class to allow storing LinkedObjectWrapper
of any type in a single list.
|
private |
|
private |
Type of a list hold by RunnableInstance
(RunnableInstance::OwnedLinkedObjectWrappers) that contains pointers to all LinkedObjectWrapperBase
instances and their corresponding containers the RunnableInstance
instance owns.
|
inline |
Constructs a LinkedObjectWrapperBase instance.
Owner | Refer to Owner. |
|
pure virtual |
Definition at line 729 of file Object.cpp.
|
privatepure virtual |
Deregisters the wrapper's owning Object
instance (through Owner) as a user of the target resource (refer to LinkedObjectWrapper::DestinyResource).
Timeout | Timeout of the mutex-locking operation in ObjectUserList |
Implemented in DynExp::LinkedObjectWrapper< ObjectT >.
|
noexcept |
Returns the owner of this wrapper.
Definition at line 733 of file Object.cpp.
|
pure virtualnoexcept |
Returns whether the wrapper has registered its owning Object
instance (through Owner) as a user of the target resource (refer to LinkedObjectWrapper::DestinyResource).
Implemented in DynExp::LinkedObjectWrapper< ObjectT >.
|
privatepure virtual |
Registers the wrapper's owning Object
instance (through Owner) as a user of the target resource (refer to LinkedObjectWrapper::DestinyResource).
Timeout | Timeout of the mutex-locking operation in ObjectUserList |
Implemented in DynExp::LinkedObjectWrapper< ObjectT >.
|
friend |
|
private |
Position of this wrapper instance in the list of LinkedObjectWrapperBase
instances kept by the owning RunnableInstance
instance Owner (refer to RunnableInstance::OwnedLinkedObjectWrappers). For std::list, iterators are not invalidaded upon insertion or erasure (for non-affected entries).
|
private |
Instance of class RunnableInstance
managing the wrapper.