DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExp::RunnableObjectParams Class Referenceabstract

Parameter class for RunnableObject. More...

+ Inheritance diagram for DynExp::RunnableObjectParams:

Public Types

enum  StartupType { OnCreation , Automatic , Manual }
 Determines when a RunnableObject instance is started. More...
 
- Public Types inherited from DynExp::ParamsBase
enum  UsageType { Unique , Shared }
 Determines whether an Object can be linked to only one (unique) or multiple (shared) other objects. More...
 
using ObjectLinkParamsType = std::vector< std::reference_wrapper< LinkBase > >
 Type of a list of all owned object link parameters. More...
 
using EnumParamSignedIntegerType = intmax_t
 Parameter type to convert signed eumeration parameters to. More...
 
using EnumParamUnsignedIntegerType = uintmax_t
 Parameter type to convert unsigned eumeration parameters to. More...
 
template<typename EnumType >
using LargestEnumUnderlyingType = std::conditional_t< std::is_signed_v< std::underlying_type_t< EnumType > >, EnumParamSignedIntegerType, EnumParamUnsignedIntegerType >
 Type trait providing an integer type for enumeration types which allows to store the value of enumeration variables of that type in a file. More...
 
using Text = Util::TextType
 String type of text-type parameters (DynExp::ParamsBase::Param) More...
 
template<typename ArithmeticType >
using UnderlyingArithmeticParamType = TypedParamBase< ArithmeticType >
 
using UnderlyingTextParamType = TypedParamBase< Util::TextType >
 
using UnderlyingTextListParamType = TypedParamBase< Util::TextType >
 
using UnderlyingIndexedTextListParamType = TypedParamBase< Util::TextListIndexType >
 
template<typename EnumType >
using UnderlyingEnumParamType = TypedParamBase< LargestEnumUnderlyingType< EnumType > >
 If ParamType is an enum, then use largest signed/unsigned integral type as the underlying type since the enum's underlying type has to be integral. More...
 
using UnderlyingLinkParamType = TypedParamBase< ItemIDType >
 
template<typename ArithmeticType >
using UnderlyingArithmeticListParamType = TypedListParamBase< ArithmeticType >
 
using UnderlyingLinkListParamType = TypedListParamBase< ItemIDType >
 

Public Member Functions

 RunnableObjectParams (ItemIDType ID, const DynExpCore &Core)
 Constructs the base class of an object parameter class. More...
 
virtual ~RunnableObjectParams ()=0
 
virtual const char * GetParamClassTag () const noexcept override
 This function is intended to be overridden once in each derived class returning the name of the respective class. Parameters defined in any class within the ParamsBase hierarchy will receive a 'this' pointer pointing to ParamsBase when their ParamBase constructors are called. The ParamBase constructors will register the respective parameter in ParamsBase::OwnedParams calling GetParamClassTag() on the given 'this' pointer. This allows the ParamBase constructor to obtain the name of the class where the respective parameter was declared in. The name is used as an XML tag containing related parameters in the project files. Here, it is fully intended that the virtual call to GetParamClassTag() leads only to a call of GetParamClassTag() of the current dynamic type of ParamsBase! More...
 
bool ConfigureStartupType () const noexcept
 Determines whether the Startup parameter should be user-configurable in settings dialogs. Override ConfigureStartupTypeChild() in order to adjust. More...
 
- Public Member Functions inherited from DynExp::ParamsBase
 ParamsBase (ItemIDType ID, const DynExpCore &Core)
 Constructs the base class of an object parameter class. More...
 
virtual ~ParamsBase ()=0
 
QDomElement ConfigToXML (QDomDocument &Document) const
 Creates an XML node with a tag name as determined by GetParamClassTag() containing all parameters belonging to this ParamsBase instance. More...
 
void ConfigFromXML (const QDomElement &XMLElement) const
 Retrieves all parameters belonging to this ParamsBase instance from an XML node with a tag name as determined by GetParamClassTag() More...
 
void ConfigFromDialog (ParamsConfigDialog &Dialog)
 Adds all parameters belonging to this ParamsBase instance to a settings dialog to let the user configure the parameter values. More...
 
bool Validate () const
 Refer to ParamBase::Validate(). More...
 
ItemIDType GetID () const noexcept
 Returns the ID of the Object this parameter class instance belongs to. More...
 
const auto & GetCore () const noexcept
 Returns a reference to DynExp's core. More...
 
const auto & GetObjectLinkParams () const noexcept
 Returns a list of all object link parameters owned by this parameter class instance. More...
 
bool ConfigureUsageType () const noexcept
 Determines whether the Usage parameter should be configurable in the settings dialog. Override ConfigureUsageTypeChild() in order to adjust. More...
 
const NetworkParamsExtensionGetNetworkAddressParams () const noexcept
 Returns the network address parameters of a derived gRPC instrument. Override GetNetworkAddressParamsChild() in order to adjust. More...
 
- Public Member Functions inherited from Util::INonCopyable
 INonCopyable (const INonCopyable &)=delete
 
INonCopyableoperator= (const INonCopyable &)=delete
 

Static Public Member Functions

static Util::TextValueListType< StartupTypeAvlblStartupTypeStrList ()
 Maps description strings to the RunnableObjectParams::StartupType enum's items. More...
 
- Static Public Member Functions inherited from DynExp::ParamsBase
static Util::TextValueListType< UsageTypeAvlblUsageTypeStrList ()
 Maps description strings to the ParamsBase::UsageType enum's items. More...
 
static void DisableUserEditable (ParamBase &Param) noexcept
 Sets the UserEditable property of the parameter Param to false. Refer to ParamBase::UserEditable. More...
 

Public Attributes

Param< StartupTypeStartup
 Determines when the runnable object is started. Refer to RunnableObjectParams::StartupType. More...
 
- Public Attributes inherited from DynExp::ParamsBase
Param< ParamsConfigDialog::TextTypeObjectName = { *this, "ObjectName", "Name", "Name to identify this item", false }
 String set by the user to identify the object this parameter class instance belongs to. More...
 
Param< UsageTypeUsage
 Determines whether an object can be used by only one other ("unique") or by multiple other ("shared") objects. More...
 

Private Member Functions

void ConfigureParamsImpl (dispatch_tag< ParamsBase >) override final
 Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to descend the inheritance hierarchy. Override to add functionality to ConfigureParams(). Refer to DynExp::ParamsBase::dispatch_tag. More...
 
virtual void ConfigureParamsImpl (dispatch_tag< RunnableObjectParams >)
 Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to descend the inheritance hierarchy. Override to add functionality to ConfigureParams(). Refer to DynExp::ParamsBase::dispatch_tag. More...
 
Override

Override by derived class to make public versions of these functions behave as described above.

virtual bool ConfigureStartupTypeChild () const noexcept
 Determines whether the Startup parameter should be user-configurable in settings dialogs. Override ConfigureStartupTypeChild() in order to adjust. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Util::ISynchronizedPointerLockable
 ISynchronizedPointerLockable ()
 
 ~ISynchronizedPointerLockable ()
 Object should never be destroyed before completely unlocked. More...
 
- Protected Member Functions inherited from Util::INonCopyable
constexpr INonCopyable ()=default
 
 ~INonCopyable ()=default
 

Detailed Description

Parameter class for RunnableObject.

Definition at line 2348 of file Object.h.

Member Enumeration Documentation

◆ StartupType

Determines when a RunnableObject instance is started.

Enumerator
OnCreation 

The runnable instance is started as soon as it is created or when the entire project is started.

Automatic 

The runnable instance is started as soon as it is needed by another Object instance to become ready.

Manual 

The runnable instance is started only manually by the user.

Definition at line 2354 of file Object.h.

Constructor & Destructor Documentation

◆ RunnableObjectParams()

DynExp::RunnableObjectParams::RunnableObjectParams ( ItemIDType  ID,
const DynExpCore Core 
)
inline

Constructs the base class of an object parameter class.

Parameters
IDID of the Object this parameter class instance belongs to
CoreReference to DynExp's core

Definition at line 2371 of file Object.h.

◆ ~RunnableObjectParams()

DynExp::RunnableObjectParams::~RunnableObjectParams ( )
pure virtual

Definition at line 485 of file Object.cpp.

Member Function Documentation

◆ AvlblStartupTypeStrList()

Util::TextValueListType< RunnableObjectParams::StartupType > DynExp::RunnableObjectParams::AvlblStartupTypeStrList ( )
static

Maps description strings to the RunnableObjectParams::StartupType enum's items.

Returns
List containing the description-value mapping

Definition at line 489 of file Object.cpp.

◆ ConfigureParamsImpl() [1/2]

void DynExp::RunnableObjectParams::ConfigureParamsImpl ( dispatch_tag< ParamsBase )
finaloverrideprivatevirtual

Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to descend the inheritance hierarchy. Override to add functionality to ConfigureParams(). Refer to DynExp::ParamsBase::dispatch_tag.

Reimplemented from DynExp::ParamsBase.

Definition at line 500 of file Object.cpp.

◆ ConfigureParamsImpl() [2/2]

virtual void DynExp::RunnableObjectParams::ConfigureParamsImpl ( dispatch_tag< RunnableObjectParams )
inlineprivatevirtual

Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to descend the inheritance hierarchy. Override to add functionality to ConfigureParams(). Refer to DynExp::ParamsBase::dispatch_tag.

Reimplemented in DynExp::ModuleParamsBase, and DynExp::InstrumentParamsBase.

Definition at line 2398 of file Object.h.

◆ ConfigureStartupType()

bool DynExp::RunnableObjectParams::ConfigureStartupType ( ) const
inlinenoexcept

Determines whether the Startup parameter should be user-configurable in settings dialogs. Override ConfigureStartupTypeChild() in order to adjust.

Returns
Returns true if the Startup parameter should be included in settings dialogs, false otherwise.

Definition at line 2394 of file Object.h.

◆ ConfigureStartupTypeChild()

virtual bool DynExp::RunnableObjectParams::ConfigureStartupTypeChild ( ) const
inlineprivatevirtualnoexcept

Determines whether the Startup parameter should be user-configurable in settings dialogs. Override ConfigureStartupTypeChild() in order to adjust.

Returns
Returns true if the Startup parameter should be included in settings dialogs, false otherwise.

Definition at line 2404 of file Object.h.

◆ GetParamClassTag()

virtual const char* DynExp::RunnableObjectParams::GetParamClassTag ( ) const
inlineoverridevirtualnoexcept

This function is intended to be overridden once in each derived class returning the name of the respective class. Parameters defined in any class within the ParamsBase hierarchy will receive a 'this' pointer pointing to ParamsBase when their ParamBase constructors are called. The ParamBase constructors will register the respective parameter in ParamsBase::OwnedParams calling GetParamClassTag() on the given 'this' pointer. This allows the ParamBase constructor to obtain the name of the class where the respective parameter was declared in. The name is used as an XML tag containing related parameters in the project files. Here, it is fully intended that the virtual call to GetParamClassTag() leads only to a call of GetParamClassTag() of the current dynamic type of ParamsBase!

Returns
Name of the class this function is defined in

Reimplemented from DynExp::ParamsBase.

Reimplemented in DynExpModule::Widefield::WidefieldMicroscopeParams, DynExpModule::Trajectory1DParams, DynExpModule::StreamManipulatorParams, DynExpModule::Stage1DParams, DynExpModule::SpectrumViewer::SpectrumViewerParams, DynExpModule::SignalPlotterParams, DynExpModule::SignalDesignerParams, DynExpModule::OutputPortWriterParams, DynExpModule::ODMR::ODMRParams, DynExpModule::NetworkTimeTaggerParams< gRPCServices >, DynExpModule::NetworkDigitalOutParams< gRPCServices >, DynExpModule::NetworkDigitalInParams< gRPCServices >, DynExpModule::NetworkDataStreamInstrumentParams< gRPCServices >, DynExpModule::NetworkDataStreamInstrumentParams< gRPCServices... >, DynExpModule::NetworkAnalogOutParams< gRPCServices >, DynExpModule::NetworkAnalogInParams< gRPCServices >, DynExpModule::LockinAmplifierControlParams, DynExpModule::InputPortReaderParams, DynExpModule::ImageViewer::ImageViewerParams, DynExpModule::gRPCModuleParams< gRPCServices >, DynExpModule::gRPCModuleParams< gRPCServices... >, DynExpModule::ArbitraryFunctionFromCSVParams, DynExp::QModuleParamsBase, DynExp::ModuleParamsBase, DynExpInstr::TimeTaggerParams, DynExpInstr::PositionerStageParams, DynExpInstr::SpectrometerParams, DynExpInstr::OutputPortParams, DynExpInstr::LockinAmplifierParams, DynExpInstr::InputPortParams, DynExpInstr::FunctionGeneratorParams, DynExpInstr::DigitalOutParams, DynExpInstr::DigitalInParams, DynExpInstr::DataStreamInstrumentParams, DynExpInstr::CameraParams, DynExpInstr::AnalogOutParams, DynExpInstr::AnalogInParams, DynExpInstr::ZI_MFLIParams, DynExpInstr::SwabianInstrumentsPulseStreamerParams, DynExpInstr::SmarActParams, DynExpInstr::RS_SMC100AParams, DynExpInstr::RS_SMB100BParams, DynExpInstr::QutoolsQuTAGParams, DynExpInstr::PVCamParams, DynExpInstr::PI_C_862_Params, DynExpInstr::NIDAQDigitalOutParams, DynExpInstr::NIDAQDigitalInParams, DynExpInstr::NIDAQAnalogOutParams, DynExpInstr::NIDAQAnalogInParams, DynExpInstr::NenionLeakvalveF3Params, DynExpInstr::InterModuleCommunicatorParams, DynExpInstr::DummyDataStreamInstrumentParams, DynExpInstr::DummyCameraParams, and DynExp::InstrumentParamsBase.

Definition at line 2375 of file Object.h.

Member Data Documentation

◆ Startup

Param<StartupType> DynExp::RunnableObjectParams::Startup
Initial value:
= { *this, AvlblStartupTypeStrList(), "Startup", "Startup type",
"Determines when the item is started", false, StartupType::Automatic }
static Util::TextValueListType< StartupType > AvlblStartupTypeStrList()
Maps description strings to the RunnableObjectParams::StartupType enum's items.
Definition: Object.cpp:489

Determines when the runnable object is started. Refer to RunnableObjectParams::StartupType.

Definition at line 2386 of file Object.h.


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