ADTF
Loading...
Searching...
No Matches
ddl::mapping::MapTarget Class Reference

#include <map_target.h>

Public Member Functions

 MapTarget (MapConfiguration *config)
 
 MapTarget (MapConfiguration *config, std::string name, std::string type)
 
 ~MapTarget ()
 
 MapTarget (const MapTarget &other)
 
MapTargetoperator= (const MapTarget &other)
 
const std::string & getName () const
 
a_util::result::Result setName (const std::string &name)
 
const std::string & getType () const
 
a_util::result::Result setType (const std::string &type)
 
bool isValid () const
 
a_util::result::Result addAssignment (const MapAssignment &assignment)
 
a_util::result::Result removeAssignment (const std::string &element_name)
 
const MapAssignmentListgetAssignmentList () const
 
a_util::result::Result addTrigger (MapTriggerBase *trigger)
 
a_util::result::Result removeTrigger (MapTriggerBase *trigger)
 
const MapTriggerListgetTriggerList () const
 
const MapSourceNameListgetReferencedSources () const
 

Detailed Description

MapTarget represents a mapped target from the mapping configuration

Constructor & Destructor Documentation

◆ MapTarget() [1/3]

ddl::mapping::MapTarget::MapTarget ( MapConfiguration * config)

CTOR

◆ MapTarget() [2/3]

ddl::mapping::MapTarget::MapTarget ( MapConfiguration * config,
std::string name,
std::string type )

CTOR

Parameters
[in]configconfig this target belong to
[in]nameThe signal name
[in]typeThe signal type

◆ ~MapTarget()

ddl::mapping::MapTarget::~MapTarget ( )

DTOR

◆ MapTarget() [3/3]

ddl::mapping::MapTarget::MapTarget ( const MapTarget & other)

CCTOR

Member Function Documentation

◆ addAssignment()

a_util::result::Result ddl::mapping::MapTarget::addAssignment ( const MapAssignment & assignment)

Add an assignment

Parameters
[in]assignmentThe assignment to add
Return values
ERR_INVALID_STATENo description found
ERR_INVALID_ARGInconsistency with current configuration
ERR_INVALID_TYPEInconsistency with ddl
ERR_NOT_SUPPORTEDAssignment overlap with existing assignments
a_util::result::SUCCESSEverything went fine

◆ addTrigger()

a_util::result::Result ddl::mapping::MapTarget::addTrigger ( MapTriggerBase * trigger)

Add a trigger

Parameters
[in]triggerThe trigger to add
Return values
ERR_INVALID_STATENo description found
ERR_NOT_FOUNDTarget not found
ERR_INVALID_ARGInconsistency with current configuration
ERR_INVALID_TYPEInconsistency with ddl
a_util::result::SUCCESSEverything went fine

◆ getAssignmentList()

const MapAssignmentList & ddl::mapping::MapTarget::getAssignmentList ( ) const

Returns all assignments configured for this target

◆ getName()

const std::string & ddl::mapping::MapTarget::getName ( ) const

Returns the name of the mapped target

Returns
the name

◆ getReferencedSources()

const MapSourceNameList & ddl::mapping::MapTarget::getReferencedSources ( ) const

Returns all referenced sources for this target.

◆ getTriggerList()

const MapTriggerList & ddl::mapping::MapTarget::getTriggerList ( ) const

Returns all triggers configured for this target

◆ getType()

const std::string & ddl::mapping::MapTarget::getType ( ) const

Returns the DataDefinition typename of the mapped target

Returns
the type

◆ isValid()

bool ddl::mapping::MapTarget::isValid ( ) const

Returns the validity for the current description

Returns
the valid state

◆ operator=()

MapTarget & ddl::mapping::MapTarget::operator= ( const MapTarget & other)

Assignment operator

Parameters
otherthe other
Returns
MapTarget&

◆ removeAssignment()

a_util::result::Result ddl::mapping::MapTarget::removeAssignment ( const std::string & element_name)

Remove an assignment

Parameters
[in]element_nameThe name of the assigned element
Return values
ERR_NOT_FOUNDAssignement not found
a_util::result::SUCCESSEverything went fine

◆ removeTrigger()

a_util::result::Result ddl::mapping::MapTarget::removeTrigger ( MapTriggerBase * trigger)

Remove a trigger

Parameters
[in]triggerThe trigger to remove
Return values
ERR_NOT_FOUNDTrigger not found
a_util::result::SUCCESSEverything went fine

◆ setName()

a_util::result::Result ddl::mapping::MapTarget::setName ( const std::string & name)

Set name

Parameters
[in]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 ddl::mapping::MapTarget::setType ( const std::string & type)

Set type

Parameters
[in]typeThe 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

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