14 #ifndef HEADER_MAP_TRIGGER_H
15 #define HEADER_MAP_TRIGGER_H
25 class MapConfiguration;
234 std::string _variable;
285 const std::string& comp_operator,
286 const std::string& value);
324 const std::string& comp_operator,
325 const std::string& value);
338 std::string _variable;
340 std::string _operator;
A common result class usable as return value throughout.
Representation for an element in the DOM.
MapConfiguration is the central class of the mapping::dd namespace.
implementation of a data trigger in the configuration api
const std::string & getVariable() const
Returns the variable to compare.
a_util::result::Result setComparisonNoTypeCheck(const std::string &source_element_path, const std::string &comp_operator, const std::string &value)
Set the comparison.
virtual std::string getSourceDependency() const
Overrides MapTriggerBase.
bool isEqual(const MapTriggerBase &other) const
Polymorphic comparison method (impl.
const std::string & getOperator() const
Returns the operator for the comparison.
MapTriggerBase * clone() const
Polymorphic clone method.
a_util::result::Result loadFromDom(const a_util::xml::DOMElement &trigger_element)
creates a trigger instance from a trigger-dom element
const std::string & getSource() const
Returns the source signal.
double getValue() const
Returns the value to compare to.
a_util::result::Result setSourceNoTypeCheck(const std::string &source)
Set the source.
MapDataTrigger(MapConfiguration *config)
CTOR.
a_util::result::Result setComparison(const std::string &source_element_path, const std::string &comp_operator, const std::string &value)
Set the comparison.
a_util::result::Result writeToDOM(a_util::xml::DOMElement &dom_element) const
Export trigger to a XML dom element.
implementation of a periodic trigger in the configuration api
MapPeriodicTrigger(MapConfiguration *config)
CTOR.
bool isEqual(const MapTriggerBase &other) const
Polymorphic comparison method (impl.
a_util::result::Result setPeriod(const std::string &period, const std::string &unit)
Set the period.
MapTriggerBase * clone() const
Polymorphic clone method.
a_util::result::Result loadFromDom(const a_util::xml::DOMElement &dom_element)
creates a trigger instance from a trigger-dom element
double getPeriod() const
Returns the period of the trigger in ms.
a_util::result::Result writeToDOM(a_util::xml::DOMElement &dom_element) const
Export trigger to a XML dom element.
implementation of a signal trigger in the configuration api
MapSignalTrigger(MapConfiguration *config)
CTOR.
const std::string & getVariable() const
Returns the source signal.
a_util::result::Result setVariableNoTypeCheck(const std::string &signal_name)
Set the source signal.
virtual std::string getSourceDependency() const
Overrides MapTriggerBase.
bool isEqual(const MapTriggerBase &other) const
Polymorphic comparison method (impl.
MapTriggerBase * clone() const
Polymorphic clone method.
a_util::result::Result loadFromDom(const a_util::xml::DOMElement &dom_element)
creates a trigger instance from a trigger-dom element
a_util::result::Result setVariable(const std::string &signal_name)
Set the source signal.
a_util::result::Result writeToDOM(a_util::xml::DOMElement &dom_element) const
Export trigger to a XML dom element.
MapTarget represents a mapped target from the mapping configuration.
cMapTrigger forms a base class for a trigger contained in the configuration
virtual bool isEqual(const MapTriggerBase &other) const =0
Polymorphic comparison method.
a_util::result::Result checkTriggerReferences() const
Checks the configuration for consistency of a new trigger.
static a_util::result::Result createFromDOM(MapConfiguration *config, const a_util::xml::DOMElement &dom_element, MapTriggerBase *&destination)
creates a polymorphic trigger instance from a trigger-dom element
virtual std::string getSourceDependency() const
returns an optional dependency on a source name
bool isValid() const
Returns the validity for the current description.
virtual MapTriggerBase * clone() const =0
Polymorphic clone method.
a_util::result::Result setSourceDependency(const std::string &new_name)
Change name for source signal.
virtual ~MapTriggerBase()
DTOR.
MapTriggerBase(MapConfiguration *config)
CTOR.
bool checkValidity()
Check Trigger validity and set validity flag.
a_util::result::Result writeToDOM(a_util::xml::DOMElement &dom_element) const
Export trigger to a XML dom element.
@ unit
the unit is a unit (Unit)
std::vector< MapTriggerBase * > MapTriggerList
Public composite types used in the mapping::dd namespace.
definition of the ddl namespace
Common include for component a_util::result.
Common include for component a_util::xml.