ADTF  3.18.2
MapDataTrigger

implementation of a data trigger in the configuration api More...

Inheritance diagram for MapDataTrigger:
[legend]

Public Member Functions

 MapDataTrigger (MapConfiguration *config)
 CTOR. More...
 
virtual std::string getSourceDependency () const
 Overrides MapTriggerBase. More...
 
const std::string & getVariable () const
 Returns the variable to compare. More...
 
const std::string & getSource () const
 Returns the source signal.
 
const std::string & getOperator () const
 Returns the operator for the comparison.
 
double getValue () const
 Returns the value to compare to.
 
a_util::result::Result setComparison (const std::string &source_element_path, const std::string &comp_operator, const std::string &value)
 Set the comparison. More...
 
bool isEqual (const MapTriggerBase &other) const
 Polymorphic comparison method (impl. More...
 
- Public Member Functions inherited from MapTriggerBase
 MapTriggerBase (MapConfiguration *config)
 CTOR.
 
virtual ~MapTriggerBase ()
 DTOR.
 
bool isValid () const
 Returns the validity for the current description.
 
bool checkValidity ()
 Check Trigger validity and set validity flag. More...
 
a_util::result::Result checkTriggerReferences () const
 Checks the configuration for consistency of a new trigger. More...
 

Protected Member Functions

MapTriggerBaseclone () const
 Polymorphic clone method.
 

Private Member Functions

a_util::result::Result loadFromDom (const a_util::xml::DOMElement &trigger_element)
 creates a trigger instance from a trigger-dom element More...
 
a_util::result::Result writeToDOM (a_util::xml::DOMElement &dom_element) const
 Export trigger to a XML dom element. More...
 
a_util::result::Result setComparisonNoTypeCheck (const std::string &source_element_path, const std::string &comp_operator, const std::string &value)
 Set the comparison. More...
 
a_util::result::Result setSourceNoTypeCheck (const std::string &source)
 Set the source. More...
 

Detailed Description

implementation of a data trigger in the configuration api

Definition at line 240 of file map_trigger.h.

Constructor & Destructor Documentation

◆ MapDataTrigger()

CTOR.

Parameters
[in]configThe configuration

Member Function Documentation

◆ getSourceDependency()

virtual std::string getSourceDependency ( ) const
virtual

Overrides MapTriggerBase.

Returns
the source dependency name

Reimplemented from MapTriggerBase.

◆ getVariable()

const std::string& getVariable ( ) const

Returns the variable to compare.

Returns
the variable name

◆ isEqual()

bool isEqual ( const MapTriggerBase other) const
virtual

Polymorphic comparison method (impl.

from MapTriggerBase)

Parameters
[in]otherThe other instance
Returns
True if both are equal

Implements MapTriggerBase.

◆ loadFromDom()

a_util::result::Result loadFromDom ( const a_util::xml::DOMElement trigger_element)
private

creates a trigger instance from a trigger-dom element

Parameters
[in]trigger_elementThe dom element from which to import
Return values
ERR_INVALID_ARGMissing attribute
a_util::result::SUCCESSEverything went fine

◆ setComparison()

a_util::result::Result setComparison ( const std::string &  source_element_path,
const std::string &  comp_operator,
const std::string &  value 
)

Set the comparison.

Parameters
[in]source_element_pathThe path to the element ([SourceSignal].[Element])
[in]comp_operatorThe operator for the comparison
[in]valueThe value to compare to
Return values
ERR_INVALID_ARGMissing attribute
ERR_INVALID_TYPEDefinition is inconsistent with ddl
a_util::result::SUCCESSEverything went fine

◆ setComparisonNoTypeCheck()

a_util::result::Result setComparisonNoTypeCheck ( const std::string &  source_element_path,
const std::string &  comp_operator,
const std::string &  value 
)
private

Set the comparison.

Parameters
[in]source_element_pathThe path to the element ([SourceSignal].[Element])
[in]comp_operatorThe operator for the comparison
[in]valueThe value to compare to
Return values
ERR_INVALID_ARGMissing attribute
a_util::result::SUCCESSEverything went fine

◆ setSourceNoTypeCheck()

a_util::result::Result setSourceNoTypeCheck ( const std::string &  source)
private

Set the source.

Parameters
[in]sourceThe source signal
Return values
a_util::result::SUCCESSEverything went fine

◆ writeToDOM()

a_util::result::Result writeToDOM ( a_util::xml::DOMElement dom_element) const
private

Export trigger to a XML dom element.

Parameters
[in]dom_elementThe dom element from which to import
Return values
a_util::result::SUCCESSEverything went fine