DynExp
Highly flexible laboratory automation for dynamically changing experiments.
|
This class holds a pointer (LinkedObjectWrapperPointer
) to a LinkedObjectWrapper
. Intances of this class should be owned by classes derived from class InstrumentDataBase
or class ModuleDataBase
. These instances provide access to objects referenced by object link parameters. LinkedObjectWrapperContainer
does not own the referenced LinkedObjectWrapper
. The LinkedObjectWrapper
itself is owned by class RunnableInstance
. The pointer hold here is also set and managed by class RunnableInstance
. Also refer to class RunnableInstance
.
More...
Public Member Functions | |
LinkedObjectWrapperContainer (bool PerformReadyCheck=true) noexcept | |
Constructs a LinkedObjectWrapperContainer instance. More... | |
virtual | ~LinkedObjectWrapperContainer ()=default |
Logical const-ness | |
Const methods to also operate on const | |
auto | get () const |
Returns the LinkedObjWrapperPtr and checks (depending on PerformReadyCheck) whether the Object LinkedObjWrapperPtr points to is ready. If this is not the case, this LinkedObjectWrapperContainer instance remembers the linked object's state updating LinkedObjectWrapperContainerBase::LinkedObjectState. More... | |
auto & | operator* () const |
Dereferences and returns the result of a call to get() . More... | |
auto | operator-> () const |
Returns the result of a call to get() . More... | |
bool | valid () const noexcept |
Checks whether LinkedObjWrapperPtr points to a valid distination. More... | |
Public Member Functions inherited from DynExp::LinkedObjectWrapperContainerBase | |
auto | GetState () const noexcept |
Returns LinkedObjectState. More... | |
std::string | GetLinkedObjectDesc () const |
Builds and returns a human-readable string uniquely identifying the Object instance which is wrapped by the linked LinkedObjectWrapper . More... | |
bool | CheckIfReady () |
Returns whether the Object instance which is wrapped by the linked LinkedObjectWrapper is in a ready state. More... | |
Public Member Functions inherited from Util::INonCopyable | |
INonCopyable (const INonCopyable &)=delete | |
INonCopyable & | operator= (const INonCopyable &)=delete |
Private Member Functions | |
virtual void | ResetChild () noexcept override |
Removes any linked LinkedObjectWrapper and updates LinkedObjectState. More... | |
virtual std::string | GetLinkedObjectDescChild () const override |
Builds and returns a human-readable string uniquely identifying the Object instance which is wrapped by the linked LinkedObjectWrapper . More... | |
virtual bool | CheckIfReadyChild () override |
Returns whether the Object instance which is wrapped by the linked LinkedObjectWrapper is in a ready state. More... | |
void | CheckIfNullptr () const |
Checks whether LinkedObjWrapperPtr is nullptr. Does nothing if this is not the case. More... | |
auto & | GetLinkedObjWrapperPtr () const |
Returns LinkedObjWrapperPtr after checking whether LinkedObjWrapperPtr is nullptr. More... | |
void | SetLinkedObjWrapperPtr (LinkedObjectWrapperPointer< ObjectT > NewLinkedObjWrapperPtr) noexcept |
Sets LinkedObjWrapperPtr to a new destination and updates LinkedObjectWrapperContainerBase::LinkedObjectState. More... | |
Private Attributes | |
LinkedObjectWrapperPointer< ObjectT > | LinkedObjWrapperPtr |
Pointer to a LinkedObjectWrapper instance holding a pointer to the destiny object instance of type const ObjectT . More... | |
const bool | PerformReadyCheck |
Determines whether a call to get() checks the return value of Object::IsReady() before returning LinkedObjWrapperPtr. More... | |
Friends | |
class | RunnableInstance |
Additional Inherited Members | |
Public Types inherited from DynExp::LinkedObjectWrapperContainerBase | |
enum class | LinkedObjectStateType { NotLinked , Ready , NotReady } |
Indicates the current state of the Object referenced by the linked LinkedObjectWrapper . More... | |
Protected Member Functions inherited from DynExp::LinkedObjectWrapperContainerBase | |
LinkedObjectWrapperContainerBase () noexcept | |
Constructs a LinkedObjectWrapperContainerBase instance which is not linked to any LinkedObjectWrapper . More... | |
virtual | ~LinkedObjectWrapperContainerBase ()=0 |
void | Reset () noexcept |
Removes any linked LinkedObjectWrapper and updates LinkedObjectState. More... | |
Protected Member Functions inherited from Util::INonCopyable | |
constexpr | INonCopyable ()=default |
~INonCopyable ()=default | |
Protected Attributes inherited from DynExp::LinkedObjectWrapperContainerBase | |
LinkedObjectStateType | LinkedObjectState |
Stores the current state of this LinkedObjectWrapperContainerBase instance. Refer to LinkedObjectStateType . Mutable to be updated in calls to LinkedObjectWrapperContainer::get(). More... | |
This class holds a pointer (LinkedObjectWrapperPointer
) to a LinkedObjectWrapper
. Intances of this class should be owned by classes derived from class InstrumentDataBase
or class ModuleDataBase
. These instances provide access to objects referenced by object link parameters. LinkedObjectWrapperContainer
does not own the referenced LinkedObjectWrapper
. The LinkedObjectWrapper
itself is owned by class RunnableInstance
. The pointer hold here is also set and managed by class RunnableInstance
. Also refer to class RunnableInstance
.
ObjectT | Type of the managed Object . |
|
inlinenoexcept |
Constructs a LinkedObjectWrapperContainer instance.
PerformReadyCheck | Refer to LinkedObjectWrapperContainer::PerformReadyCheck. |
|
virtualdefault |
|
inlineprivate |
Checks whether LinkedObjWrapperPtr is nullptr. Does nothing if this is not the case.
Util::LinkedObjectNotLockedException | is thrown if LinkedObjWrapperPtr is nullptr. |
|
inlineoverrideprivatevirtual |
Returns whether the Object
instance which is wrapped by the linked LinkedObjectWrapper
is in a ready state.
Object::IsReady()
on the related Object
instance. Implements DynExp::LinkedObjectWrapperContainerBase.
|
inline |
Returns the LinkedObjWrapperPtr and checks (depending on PerformReadyCheck) whether the Object
LinkedObjWrapperPtr points to is ready. If this is not the case, this LinkedObjectWrapperContainer
instance remembers the linked object's state updating LinkedObjectWrapperContainerBase::LinkedObjectState.
LinkedObjectWrapperPointer
.
|
inlineoverrideprivatevirtual |
Builds and returns a human-readable string uniquely identifying the Object
instance which is wrapped by the linked LinkedObjectWrapper
.
Object
instance Implements DynExp::LinkedObjectWrapperContainerBase.
|
inlineprivate |
Returns LinkedObjWrapperPtr after checking whether LinkedObjWrapperPtr is nullptr.
|
inline |
|
inline |
|
inlineoverrideprivatevirtualnoexcept |
Removes any linked LinkedObjectWrapper
and updates LinkedObjectState.
Implements DynExp::LinkedObjectWrapperContainerBase.
|
inlineprivatenoexcept |
Sets LinkedObjWrapperPtr to a new destination and updates LinkedObjectWrapperContainerBase::LinkedObjectState.
NewLinkedObjWrapperPtr | Pointer to a LinkedObjectWrapper as a new destination |
|
inlinenoexcept |
Checks whether LinkedObjWrapperPtr points to a valid distination.
|
friend |
|
private |
Pointer to a LinkedObjectWrapper
instance holding a pointer to the destiny object instance of type const ObjectT
.
|
private |
Determines whether a call to get()
checks the return value of Object::IsReady() before returning LinkedObjWrapperPtr.