|
DynExp
Highly flexible laboratory automation for dynamically changing experiments.
|
Polymorphic base class to allow storing LinkedObjectWrapper of any type in a single list.
More...
#include <Object.h>
Inheritance diagram for DynExp::LinkedObjectWrapperBase: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. | |
| virtual | ~LinkedObjectWrapperBase ()=0 |
| const Object & | GetOwner () const noexcept |
| Returns the owner of this wrapper. | |
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). | |
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. | |
| 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. | |
Private Attributes | |
| const RunnableInstance & | Owner |
Instance of class RunnableInstance managing the wrapper. | |
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). | |
| 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). | |
| 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). | |
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.