ADTF  3.18.2
MapSource

MapSource represents a mapping source from the configuration file. More...

Public Member Functions

 MapSource (MapConfiguration *config)
 CTOR.
 
 MapSource (MapConfiguration *config, std::string name, std::string type)
 CTOR. More...
 
const std::string & getName () const
 Returns the name of the mapping source.
 
a_util::result::Result setName (const std::string &new_name)
 Set name. More...
 
const std::string & getType () const
 Returns the DataDefinition typename of the mapping source.
 
a_util::result::Result setType (const std::string &type_name)
 Set type. More...
 
bool isValid () const
 Returns the validity for the current description.
 

Private Member Functions

a_util::result::Result loadFromDOM (const a_util::xml::DOMElement &source)
 Initializes the source from a source-dom element. More...
 
a_util::result::Result writeToDOM (a_util::xml::DOMElement &dom_element) const
 Export source to a XML dom element. More...
 

Detailed Description

MapSource represents a mapping source from the configuration file.

Definition at line 31 of file map_source.h.

Constructor & Destructor Documentation

◆ MapSource()

MapSource ( MapConfiguration config,
std::string  name,
std::string  type 
)

CTOR.

Parameters
[in]namesignal name
[in]typesignal type
[in]configthe config

Member Function Documentation

◆ loadFromDOM()

a_util::result::Result loadFromDOM ( const a_util::xml::DOMElement source)
private

Initializes the source from a source-dom element.

Parameters
[in]sourceThe dom element from which to import
Return values
ERR_INVALID_ARGMissing name or type
a_util::result::SUCCESSEverything went fine

◆ setName()

a_util::result::Result setName ( const std::string &  new_name)

Set name.

Parameters
[in]new_nameThe new name of the target
Return values
ERR_INVALID_STATENo description found
ERR_INVALID_ARGSignal name already used in configuration
a_util::result::SUCCESSEverything went fine

◆ setType()

a_util::result::Result setType ( const std::string &  type_name)

Set type.

Parameters
[in]type_nameThe type of the target
Return values
ERR_INVALID_STATENo description found
ERR_INVALID_ARGSignal name already used in configuration
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 source to a XML dom element.

Parameters
[in]dom_elementThe dom element to be written
Return values
a_util::result::SUCCESSEverything went fine