ADTF  3.18.2
MapTransformationBaseabstract

cMapTransformation forms a base class for a single transformation More...

Inheritance diagram for MapTransformationBase:
[legend]

Public Member Functions

 MapTransformationBase (MapConfiguration *config, const std::string &name)
 CTOR. More...
 
virtual ~MapTransformationBase ()
 DTOR.
 
const std::string & getName () const
 Returns the name of the transformation.
 
bool isValid () const
 Returns the validity for the current description.
 
virtual bool isEqual (const MapTransformationBase &other) const =0
 Polymorphic comparison method.
 
virtual MapTransformationBaseclone () const =0
 Polymorphic clone method.
 
virtual double evaluate (double value) const =0
 Polymorphic evaluation template method. More...
 

Private Member Functions

a_util::result::Result writeToDOM (a_util::xml::DOMElement &dom_element) const
 Export transformation to a XML dom element. More...
 
a_util::result::Result setTypeFromDDL ()
 Set Float values from Enumeration definition in DataDefinition-File. More...
 

Static Private Member Functions

static a_util::result::Result createFromDOM (MapConfiguration *config, const a_util::xml::DOMElement &dom_element, MapTransformationBase *&destination)
 creates a polymorphic transformation instance from a dom element More...
 
static a_util::result::Result create (MapConfiguration *config, const std::string &name, const std::string &type, MapTransformationBase *&destination)
 creates a polymorphic transformation instance from a dom element More...
 

Detailed Description

cMapTransformation forms a base class for a single transformation

Definition at line 30 of file map_transformation.h.

Constructor & Destructor Documentation

◆ MapTransformationBase()

MapTransformationBase ( MapConfiguration config,
const std::string &  name 
)

CTOR.

Parameters
[in]configThe configuration
[in]nameThe transformation name

Member Function Documentation

◆ create()

static a_util::result::Result create ( MapConfiguration config,
const std::string &  name,
const std::string &  type,
MapTransformationBase *&  destination 
)
staticprivate

creates a polymorphic transformation instance from a dom element

Parameters
[in]configThe mapping configuration
[in]nameName of the element
[in]typeType of the element
[out]destinationThe Transformation object to fill
Return values
ERR_INVALID_ARGMissing name or type
a_util::result::SUCCESSEverything went fine

◆ createFromDOM()

static a_util::result::Result createFromDOM ( MapConfiguration config,
const a_util::xml::DOMElement dom_element,
MapTransformationBase *&  destination 
)
staticprivate

creates a polymorphic transformation instance from a dom element

Parameters
[in]configThe configuration
[in]dom_elementThe dom element from which to import
[out]destinationThe Transformation object to fill
Return values
ERR_INVALID_ARGMissing name or type
a_util::result::SUCCESSEverything went fine

◆ evaluate()

virtual double evaluate ( double  value) const
pure virtual

Polymorphic evaluation template method.

Parameters
[in]valueThe value to evaluate

Implemented in MapEnumTableTransformation, and MapPolynomTransformation.

◆ setTypeFromDDL()

a_util::result::Result setTypeFromDDL ( )
private

Set Float values from Enumeration definition in DataDefinition-File.

Return values
ERR_INVALID_TYPEInconsistency with ddl
a_util::result::SUCCESSEverything went fine

◆ writeToDOM()

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

Export transformation to a XML dom element.

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