DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExp::LinkedObjectWrapperContainerList< ObjectT > Class Template Reference

This class defines a list of LinkedObjectWrapperContainer instances. The list owns the contained LinkedObjectWrapperContainer instances. 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 list parameters (ListParam). The list's entries are exclusively managed by the respective instance of class RunnableInstance. RunnableInstance stores references to list entries. Every list manipulation RunnableInstance is not aware of might cause dangling references! More...

Public Member Functions

 LinkedObjectWrapperContainerList ()=default
 
 ~LinkedObjectWrapperContainerList ()=default
 
const auto & GetList () const noexcept
 Returns Containers. More...
 
const auto & GetLabels () const noexcept
 Returns ObjectLabels. More...
 
std::string_view GetIconPath () const
 Returns IconPath. More...
 
template<typename IndexType >
auto & operator[] (IndexType Index)
 Returns a stored LinkedObjectWrapperContainer instance selected by its list index. More...
 

Private Types

using ContainerType = LinkedObjectWrapperContainer< ObjectT >
 Type of the owned LinkedObjectWrapperContainer instances. More...
 

Private Attributes

std::vector< std::unique_ptr< ContainerType > > Containers
 List of the owned LinkedObjectWrapperContainer instances. std::vector of pointers since insertion and erasure do invalidate references to elements. More...
 
Util::TextListType ObjectLabels
 Holds a human-readable identifier for each linked object. More...
 
std::string IconPath
 Holds the path to the icon of the linked objects' base type (e.g. hardware adapter, instrument). More...
 

Friends

class RunnableInstance
 

Detailed Description

template<typename ObjectT>
class DynExp::LinkedObjectWrapperContainerList< ObjectT >

This class defines a list of LinkedObjectWrapperContainer instances. The list owns the contained LinkedObjectWrapperContainer instances. 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 list parameters (ListParam). The list's entries are exclusively managed by the respective instance of class RunnableInstance. RunnableInstance stores references to list entries. Every list manipulation RunnableInstance is not aware of might cause dangling references!

Template Parameters
ObjectTType of the managed Object.

Definition at line 3302 of file Object.h.

Member Typedef Documentation

◆ ContainerType

template<typename ObjectT >
using DynExp::LinkedObjectWrapperContainerList< ObjectT >::ContainerType = LinkedObjectWrapperContainer<ObjectT>
private

Type of the owned LinkedObjectWrapperContainer instances.

Definition at line 3309 of file Object.h.

Constructor & Destructor Documentation

◆ LinkedObjectWrapperContainerList()

template<typename ObjectT >
DynExp::LinkedObjectWrapperContainerList< ObjectT >::LinkedObjectWrapperContainerList ( )
default

◆ ~LinkedObjectWrapperContainerList()

template<typename ObjectT >
DynExp::LinkedObjectWrapperContainerList< ObjectT >::~LinkedObjectWrapperContainerList ( )
default

Member Function Documentation

◆ GetIconPath()

template<typename ObjectT >
std::string_view DynExp::LinkedObjectWrapperContainerList< ObjectT >::GetIconPath ( ) const
inline

Returns IconPath.

Definition at line 3317 of file Object.h.

◆ GetLabels()

template<typename ObjectT >
const auto& DynExp::LinkedObjectWrapperContainerList< ObjectT >::GetLabels ( ) const
inlinenoexcept

Returns ObjectLabels.

Definition at line 3316 of file Object.h.

◆ GetList()

template<typename ObjectT >
const auto& DynExp::LinkedObjectWrapperContainerList< ObjectT >::GetList ( ) const
inlinenoexcept

Returns Containers.

Definition at line 3315 of file Object.h.

◆ operator[]()

template<typename ObjectT >
template<typename IndexType >
auto& DynExp::LinkedObjectWrapperContainerList< ObjectT >::operator[] ( IndexType  Index)
inline

Returns a stored LinkedObjectWrapperContainer instance selected by its list index.

Template Parameters
IndexTypeType of Index. Needs to be castable to size_t
Parameters
IndexIndex of the entry in Containers to return
Returns
Returns the element of Containers at the position Index.
Exceptions
Util::OutOfRangeExceptionis thrown if Index exceeds the amount of list entries in Containers.

Definition at line 3327 of file Object.h.

Friends And Related Function Documentation

◆ RunnableInstance

template<typename ObjectT >
friend class RunnableInstance
friend

Definition at line 3304 of file Object.h.

Member Data Documentation

◆ Containers

template<typename ObjectT >
std::vector<std::unique_ptr<ContainerType> > DynExp::LinkedObjectWrapperContainerList< ObjectT >::Containers
private

List of the owned LinkedObjectWrapperContainer instances. std::vector of pointers since insertion and erasure do invalidate references to elements.

Definition at line 3342 of file Object.h.

◆ IconPath

template<typename ObjectT >
std::string DynExp::LinkedObjectWrapperContainerList< ObjectT >::IconPath
private

Holds the path to the icon of the linked objects' base type (e.g. hardware adapter, instrument).

Definition at line 3345 of file Object.h.

◆ ObjectLabels

template<typename ObjectT >
Util::TextListType DynExp::LinkedObjectWrapperContainerList< ObjectT >::ObjectLabels
private

Holds a human-readable identifier for each linked object.

Definition at line 3344 of file Object.h.


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