ADTF
3.18.2
|
MapTarget represents a mapped target from the mapping configuration. More...
Public Member Functions | |
MapTarget (MapConfiguration *config) | |
CTOR. | |
MapTarget (MapConfiguration *config, std::string name, std::string type) | |
CTOR. More... | |
~MapTarget () | |
DTOR. | |
MapTarget (const MapTarget &other) | |
CCTOR. | |
MapTarget & | operator= (const MapTarget &other) |
Assignment operator. More... | |
const std::string & | getName () const |
Returns the name of the mapped target. More... | |
a_util::result::Result | setName (const std::string &name) |
Set name. More... | |
const std::string & | getType () const |
Returns the DataDefinition typename of the mapped target. More... | |
a_util::result::Result | setType (const std::string &type) |
Set type. More... | |
bool | isValid () const |
Returns the validity for the current description. More... | |
a_util::result::Result | addAssignment (const MapAssignment &assignment) |
Add an assignment. More... | |
a_util::result::Result | removeAssignment (const std::string &element_name) |
Remove an assignment. More... | |
const MapAssignmentList & | getAssignmentList () const |
Returns all assignments configured for this target. | |
a_util::result::Result | addTrigger (MapTriggerBase *trigger) |
Add a trigger. More... | |
a_util::result::Result | removeTrigger (MapTriggerBase *trigger) |
Remove a trigger. More... | |
const MapTriggerList & | getTriggerList () const |
Returns all triggers configured for this target. | |
const MapSourceNameList & | getReferencedSources () const |
Returns all referenced sources for this target. | |
Private Member Functions | |
a_util::result::Result | loadFromDOM (const a_util::xml::DOMElement &target) |
Initializes the target from a target-dom element. More... | |
a_util::result::Result | writeToDOM (a_util::xml::DOMElement &dom_element) const |
Export target to a XML dom element. More... | |
a_util::result::Result | checkDoubleAssignments () |
Checks if the assignments overlap. More... | |
a_util::result::Result | addAssignmentNoTypeCheck (const MapAssignment &assignment) |
Add an assignment to this target. More... | |
a_util::result::Result | removeAssignmentWithoutClear (const std::string &element_name) |
Remove an assignment from this target. More... | |
a_util::result::Result | addTriggerNoTypeCheck (MapTriggerBase *trigger) |
Add a trigger to this target. More... | |
a_util::result::Result | modifySourceName (const std::string &name, const std::string &new_name) |
Modify a source signal name. More... | |
void | swap (MapTarget &other) |
swap implementation | |
MapTarget represents a mapped target from the mapping configuration.
Definition at line 31 of file map_target.h.
MapTarget | ( | MapConfiguration * | config, |
std::string | name, | ||
std::string | type | ||
) |
CTOR.
[in] | config | config this target belong to |
[in] | name | The signal name |
[in] | type | The signal type |
a_util::result::Result addAssignment | ( | const MapAssignment & | assignment | ) |
Add an assignment.
[in] | assignment | The assignment to add |
ERR_INVALID_STATE | No description found |
ERR_INVALID_ARG | Inconsistency with current configuration |
ERR_INVALID_TYPE | Inconsistency with ddl |
ERR_NOT_SUPPORTED | Assignment overlap with existing assignments |
a_util::result::SUCCESS | Everything went fine |
|
private |
Add an assignment to this target.
[in] | assignment | The assignment to add |
ERR_INVALID_ARG | Missing or erroneous attribute |
a_util::result::SUCCESS | Everything went fine |
a_util::result::Result addTrigger | ( | MapTriggerBase * | trigger | ) |
Add a trigger.
[in] | trigger | The trigger to add |
ERR_INVALID_STATE | No description found |
ERR_NOT_FOUND | Target not found |
ERR_INVALID_ARG | Inconsistency with current configuration |
ERR_INVALID_TYPE | Inconsistency with ddl |
a_util::result::SUCCESS | Everything went fine |
|
private |
Add a trigger to this target.
[in] | trigger | The trigger to add |
a_util::result::SUCCESS | Everything went fine |
|
private |
Checks if the assignments overlap.
ERR_NOT_SUPPORTED | Assignments overlap |
a_util::result::SUCCESS | Everything went fine |
const std::string& getName | ( | ) | const |
Returns the name of the mapped target.
const std::string& getType | ( | ) | const |
Returns the DataDefinition typename of the mapped target.
bool isValid | ( | ) | const |
Returns the validity for the current description.
|
private |
Initializes the target from a target-dom element.
[in] | target | The dom element from which to import |
ERR_INVALID_ARG | Missing name or type |
a_util::result::SUCCESS | Everything went fine |
|
private |
Modify a source signal name.
[in] | name | The name of the target |
[in] | new_name | The new name of the target |
a_util::result::SUCCESS | Everything went fine |
a_util::result::Result removeAssignment | ( | const std::string & | element_name | ) |
Remove an assignment.
[in] | element_name | The name of the assigned element |
ERR_NOT_FOUND | Assignement not found |
a_util::result::SUCCESS | Everything went fine |
|
private |
Remove an assignment from this target.
[in] | element_name | The name of the target element to unassign |
ERR_NOT_FOUND | Assignement not found |
a_util::result::SUCCESS | Everything went fine |
a_util::result::Result removeTrigger | ( | MapTriggerBase * | trigger | ) |
Remove a trigger.
[in] | trigger | The trigger to remove |
ERR_NOT_FOUND | Trigger not found |
a_util::result::SUCCESS | Everything went fine |
a_util::result::Result setName | ( | const std::string & | name | ) |
Set name.
[in] | name | The new name of the target |
ERR_INVALID_STATE | No description found |
ERR_INVALID_ARG | Signal name already used in configuration |
a_util::result::SUCCESS | Everything went fine |
a_util::result::Result setType | ( | const std::string & | type | ) |
Set type.
[in] | type | The type of the target |
ERR_INVALID_STATE | No description found |
ERR_INVALID_ARG | Signal name already used in configuration |
ERR_INVALID_TYPE | Inconsistency with ddl |
a_util::result::SUCCESS | Everything went fine |
|
private |
Export target to a XML dom element.
[in] | dom_element | The dom element to be written |
a_util::result::SUCCESS | Everything went fine |