DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExp::ResourceManagerBase< PointerType >::LinkBaseOnlyType Class Reference

Allow exclusive access to some of ResourceManagerBase's private methods to LinkBase. More...

Private Member Functions

constexpr LinkBaseOnlyType (ResourceManagerBase &Parent) noexcept
 Construcs an instance - one for each ResourceManagerBase instance. More...
 
auto ShareResourceAsNonConst (ItemIDType ID) const
 Copies and returns the shared pointer pointing to (and owning) the resource identified by ID. The resource itself is neither copied nor changed. The const version of this method returns a shared pointer pointing to a const resource. This method is only available if the resources stored in the resource manager are managed by a shared pointer (i.e. PointerType is std::shared_ptr). More...
 

Private Attributes

ResourceManagerBaseParent
 Owning ResourceManagerBase instance. More...
 

Friends

class ResourceManagerBase
 
class LinkBase
 

Detailed Description

template<typename PointerType>
class DynExp::ResourceManagerBase< PointerType >::LinkBaseOnlyType

Allow exclusive access to some of ResourceManagerBase's private methods to LinkBase.

Definition at line 91 of file Managers.h.

Constructor & Destructor Documentation

◆ LinkBaseOnlyType()

template<typename PointerType >
constexpr DynExp::ResourceManagerBase< PointerType >::LinkBaseOnlyType::LinkBaseOnlyType ( ResourceManagerBase Parent)
inlineconstexprprivatenoexcept

Construcs an instance - one for each ResourceManagerBase instance.

Parameters
ParentOwning ResourceManagerBase instance

Definition at line 100 of file Managers.h.

Member Function Documentation

◆ ShareResourceAsNonConst()

template<typename PointerType >
auto DynExp::ResourceManagerBase< PointerType >::LinkBaseOnlyType::ShareResourceAsNonConst ( ItemIDType  ID) const
inlineprivate

Copies and returns the shared pointer pointing to (and owning) the resource identified by ID. The resource itself is neither copied nor changed. The const version of this method returns a shared pointer pointing to a const resource. This method is only available if the resources stored in the resource manager are managed by a shared pointer (i.e. PointerType is std::shared_ptr).

Template Parameters
TSet to PointerType. Do not pass anything.
Parameters
IDID of the resource to share
Returns
Returns Resource::ResourcePointer of the requested resource.
Exceptions
Util::NotFoundExceptionis thrown if the resource manager does not own a resource with ID (resource not found in Map).

Definition at line 105 of file Managers.h.

Friends And Related Function Documentation

◆ LinkBase

template<typename PointerType >
friend class LinkBase
friend

Definition at line 94 of file Managers.h.

◆ ResourceManagerBase

template<typename PointerType >
friend class ResourceManagerBase
friend

Definition at line 93 of file Managers.h.

Member Data Documentation

◆ Parent

template<typename PointerType >
ResourceManagerBase& DynExp::ResourceManagerBase< PointerType >::LinkBaseOnlyType::Parent
private

Owning ResourceManagerBase instance.

Definition at line 107 of file Managers.h.


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