Dev Essential
Loading...
Searching...
No Matches
ddl::mapping::datamodel::Trigger Class Reference

Datamodel trigger class use within Target. More...

#include <datamodel_configuration_items.h>

Inherits ddl::utility::TypeAccessVectorSubject< Trigger >, and ddl::dd::datamodel::InfoMap.

Classes

struct  Data
 Data type of the trigger. More...
 
struct  Period
 Period type of the trigger. More...
 
struct  Source
 Source type of the trigger. More...
 

Public Types

enum class  Type { source , data , period }
 The type of the trigger. More...
 

Public Member Functions

 Trigger ()=delete
 no CTOR
 
 Trigger (const Trigger &other)
 copy CTOR
 
 Trigger (Trigger &&other)
 move CTOR
 
 Trigger (const Source &source)
 CTOR.
 
 Trigger (const Data &data)
 CTOR.
 
 Trigger (const Period &period)
 CTOR.
 
 ~Trigger ()
 DTOR.
 
Triggeroperator= (const Trigger &other)
 copy operator
 
Triggeroperator= (Trigger &&other)
 move operator
 
bool operator== (const Trigger &other) const
 equality operator
 
bool operator!= (const Trigger &other) const
 inequality operator
 
Type getType () const
 Get the type.
 
Source getSource () const
 Get the source value if type is set to Type::source.
 
void setAsSource (const Source &source)
 Set as source trigger.
 
Data getData () const
 Get the data value if type is set to Type::data.
 
void setAsData (const Data &data)
 Set as data trigger.
 
Period getPeriod () const
 Get the period value if type is set to Type::period.
 
void setAsPeriod (const Period &period)
 Set as periodic trigger.
 
const std::string & getTimeStrategy () const
 
void setTimeStrategy (const std::string &time_strategy)
 
- Public Member Functions inherited from ddl::dd::datamodel::InfoMap
 InfoMap ()=default
 CTOR.
 
 InfoMap (const InfoMap &)
 copy CTOR
 
 InfoMap (InfoMap &&)
 move CTOR
 
InfoMapoperator= (const InfoMap &)
 copy assignment operator
 
InfoMapoperator= (InfoMap &&)
 move assignment operator
 
template<typename INFO_T>
const INFO_T * getInfo () const
 Get the Info Pointer.
 
template<typename INFO_T>
INFO_T * getInfo ()
 Get the Info Pointer.
 
template<typename INFO_T>
void setInfo (const std::shared_ptr< INFO_T > &info)
 Set the Info object as shared pointer.
 

Static Public Attributes

static constexpr auto strategy_trigger = "trigger"
 
static constexpr auto strategy_first_in_config = "first_in_config"
 
static constexpr auto strategy_latest = "latest"
 
static constexpr auto strategy_earliest = "earliest"
 

Detailed Description

Datamodel trigger class use within Target.

Remarks
This class is observable within ddl::utility::TypeAccessVector

Member Enumeration Documentation

◆ Type

The type of the trigger.

Enumerator
source 

The trigger is a source trigger.

See also
Trigger::getSource, Trigger::Source
data 

The trigger is a data trigger.

See also
Trigger::getData, Trigger::Data
period 

The trigger is a periodic trigger.

See also
Trigger::getPeriod, Trigger::Period

Constructor & Destructor Documentation

◆ Trigger() [1/5]

ddl::mapping::datamodel::Trigger::Trigger ( const Trigger & other)

copy CTOR

Parameters
otherthe object to copy

◆ Trigger() [2/5]

ddl::mapping::datamodel::Trigger::Trigger ( Trigger && other)

move CTOR

Parameters
otherthe object to move

◆ Trigger() [3/5]

ddl::mapping::datamodel::Trigger::Trigger ( const Source & source)

CTOR.

the type will be set to Type::source

Parameters
sourcethe source to set

◆ Trigger() [4/5]

ddl::mapping::datamodel::Trigger::Trigger ( const Data & data)

CTOR.

the type will be set to Type::data

Parameters
datathe data to set

◆ Trigger() [5/5]

ddl::mapping::datamodel::Trigger::Trigger ( const Period & period)

CTOR.

the type will be set to Type::period

Parameters
periodthe period to set

Member Function Documentation

◆ getData()

Data ddl::mapping::datamodel::Trigger::getData ( ) const

Get the data value if type is set to Type::data.

Returns
Data
See also
getType

◆ getPeriod()

Period ddl::mapping::datamodel::Trigger::getPeriod ( ) const

Get the period value if type is set to Type::period.

Returns
Period
See also
getType

◆ getSource()

Source ddl::mapping::datamodel::Trigger::getSource ( ) const

Get the source value if type is set to Type::source.

Returns
Source
See also
getType

◆ getTimeStrategy()

const std::string & ddl::mapping::datamodel::Trigger::getTimeStrategy ( ) const

Gets the update strategy of the trigger

◆ getType()

Type ddl::mapping::datamodel::Trigger::getType ( ) const

Get the type.

◆ operator!=()

bool ddl::mapping::datamodel::Trigger::operator!= ( const Trigger & other) const

inequality operator

Parameters
otherthe other object to compare
Returns
true is not equal
false is equal

◆ operator=() [1/2]

Trigger & ddl::mapping::datamodel::Trigger::operator= ( const Trigger & other)

copy operator

Parameters
otherthe object to copy
Returns
Trigger&

◆ operator=() [2/2]

Trigger & ddl::mapping::datamodel::Trigger::operator= ( Trigger && other)

move operator

Parameters
otherthe object to move
Returns
Trigger&

◆ operator==()

bool ddl::mapping::datamodel::Trigger::operator== ( const Trigger & other) const

equality operator

Parameters
otherthe other object to compare
Returns
true is equal
false is not equal

◆ setAsData()

void ddl::mapping::datamodel::Trigger::setAsData ( const Data & data)

Set as data trigger.

the type will be set to Type::data

Parameters
datathe data value to set
Remarks
This change is observable, the additional_info is set to "values"!

◆ setAsPeriod()

void ddl::mapping::datamodel::Trigger::setAsPeriod ( const Period & period)

Set as periodic trigger.

the type will be set to Type::period

Parameters
periodthe period value to set
Remarks
This change is observable, the additional_info is set to "values"!

◆ setAsSource()

void ddl::mapping::datamodel::Trigger::setAsSource ( const Source & source)

Set as source trigger.

the type will be set to Type::source

Parameters
sourcethe source value to set
Remarks
This change is observable, the additional_info is set to "values"!

◆ setTimeStrategy()

void ddl::mapping::datamodel::Trigger::setTimeStrategy ( const std::string & time_strategy)

Sets the update strategy of the trigger

Parameters
time_strategyudate strategy as string.
See also
strategy_trigger, strategy_first_in_config, strategy_latest, strategy_earliest

Member Data Documentation

◆ strategy_earliest

auto ddl::mapping::datamodel::Trigger::strategy_earliest = "earliest"
staticconstexpr

Sets the target trigger update time to the earliest source value time of the assignments.

◆ strategy_first_in_config

auto ddl::mapping::datamodel::Trigger::strategy_first_in_config = "first_in_config"
staticconstexpr

Sets the target trigger update time to the first source value time in list of the assignments.

Remarks
: assignments are done only on trigger occures, not when source values arrive!

◆ strategy_latest

auto ddl::mapping::datamodel::Trigger::strategy_latest = "latest"
staticconstexpr

Sets the target trigger update time to the latest source value time of the assignments.

◆ strategy_trigger

auto ddl::mapping::datamodel::Trigger::strategy_trigger = "trigger"
staticconstexpr

Sets the target trigger update time to the trigger time point itself. This is default!


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