36 GNEChange(additional, forward, additional->isAttributeCarrierSelected()),
37 myAdditional(additional),
38 myPath(additional->getPath()) {
39 myAdditional->incRef(
"GNEChange_Additional");
53 for (
const auto& pathElement :
myPath) {
54 pathElement.getLane()->removePathAdditionalElement(
myAdditional);
55 if (pathElement.getJunction()) {
56 pathElement.getJunction()->removePathAdditionalElement(
myAdditional);
77 for (
const auto& pathElement :
myPath) {
78 pathElement.getLane()->removePathAdditionalElement(
myAdditional);
79 if (pathElement.getJunction()) {
80 pathElement.getJunction()->removePathAdditionalElement(
myAdditional);
125 for (
const auto& pathElement :
myPath) {
126 pathElement.getLane()->removePathAdditionalElement(
myAdditional);
127 if (pathElement.getJunction()) {
128 pathElement.getJunction()->removePathAdditionalElement(
myAdditional);
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getID() const
get ID
const std::string & getTagStr() const
get tag assigned to this object in string format
void unselectAttributeCarrier(const bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
GNENet * getNet() const
get pointer to net
void selectAttributeCarrier(const bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
FXString undoName() const
return undoName
GNEAdditional * myAdditional
full information regarding the additional element that is to be created/deleted
const std::vector< GNEPathElements::PathElement > & myPath
reference to path vector
FXString redoName() const
get Redo name
~GNEChange_Additional()
Destructor.
the function-object for an editing operation (abstract base)
bool myForward
we group antagonistic commands (create junction/delete junction) and keep them apart by this flag
const bool mySelectedElement
flag for check if element is selected
void addElementInParentsAndChildren(T *element)
add given element into parents and children (only use in redo() function)
void removeElementFromParentsAndChildren(T *element)
remove given element from parents and children (only use in redo() function)
void restoreHierarchicalContainers()
restore container (only use in undo() function)
void deleteAdditional(GNEAdditional *additional)
delete additional element of GNENet container
bool additionalExist(const GNEAdditional *additional) const
return true if given additional exist
void insertAdditional(GNEAdditional *additional)
Insert a additional element int GNENet container.
void requireSaveAdditionals(bool value)
inform that additionals has to be saved
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
retrieve all attribute carriers of Net
void decRef(const std::string &debugMsg="")
Decrease reference.
bool unreferenced()
check if object ins't referenced