42 GNEChange(additional->getViewNet()->getNet(), forward),
43 myAdditional(additional),
44 myFirstAdditionalParent(myAdditional->getFirstAdditionalParent()),
45 mySecondAdditionalParent(myAdditional->getSecondAdditionalParent()),
46 myEdgeChilds(myAdditional->getEdgeChilds()),
47 myLaneChilds(myAdditional->getLaneChilds()) {
48 myAdditional->incRef(
"GNEChange_Additional");
50 if (additional->getTagProperty().canBePlacedOverLane()) {
51 myLaneParents.push_back(myNet->retrieveLane(myAdditional->getAttribute(
SUMO_ATTR_LANE)));
53 if (additional->getTagProperty().canBePlacedOverLanes()) {
54 myLaneParents = GNEAttributeCarrier::parse<std::vector<GNELane*> >(additional->getViewNet()->getNet(), myAdditional->getAttribute(
SUMO_ATTR_LANES));
57 if (additional->getTagProperty().canBePlacedOverEdge() && (additional->getTagProperty().getTag() !=
SUMO_TAG_VAPORIZER)) {
58 myEdgeParents.push_back(myNet->retrieveEdge(myAdditional->getAttribute(
SUMO_ATTR_EDGE)));
60 if (additional->getTagProperty().canBePlacedOverEdges()) {
61 myEdgeParents = GNEAttributeCarrier::parse<std::vector<GNEEdge*> >(additional->getViewNet()->getNet(), myAdditional->getAttribute(
SUMO_ATTR_EDGES));
65 myEdgeParents.push_back(myNet->retrieveEdge(myAdditional->getAttribute(
SUMO_ATTR_ID)));
GNEAdditional * mySecondAdditionalParent
pointer to second additional parent (used by additional with parents, for example Entry/exits) ...
void insertAdditional(GNEAdditional *additional)
Insert a additional element int GNENet container.
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_MODE_INSPECT
the function-object for an editing operation (abstract base)
GNEAdditional * myFirstAdditionalParent
pointer to first additional parent (used by additional with parents, for example Entry/exits) ...
void removeAdditionalChild(GNEAdditional *additional)
remove additional child from this additional
bool additionalExist(GNEAdditional *additional)
return true if additional exist (use pointer instead ID)
FXString redoName() const
get Redo name
std::vector< GNEEdge * > myEdgeParents
pointer to edge parents (used by additionals with edge parents)
GNEViewParent * getViewParent() const
get the net object
std::vector< GNEEdge * > myEdgeChilds
list of Edge childs (used by Rerouters)
~GNEChange_Additional()
Destructor.
bool deleteAdditional(GNEAdditional *additional)
delete additional element of GNENet container
FXString undoName() const
return undoName
GNEAdditional * myAdditional
full information regarding the additional element that is to be created/deleted
GNEFrame::ACHierarchy * getACHierarchy() const
get ACHierarchy
void refreshACHierarchy()
refresh ACHierarchy
void requiereSaveAdditionals(bool value)
inform that additionals has to be saved
const std::string getID() const
function to support debugging
void decRef(const std::string &debugMsg="")
Decrease reference.
GNENet * myNet
the net to which operations shall be applied or which shall be informed about gui updates (we are not...
std::vector< GNELane * > myLaneParents
pointer to lane parents (used by additionals with lane parent)
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getTagStr() const
get tag assigned to this object in string format
std::vector< GNELane * > myLaneChilds
list of Edge childs (used by VSS)
bool myForward
we group antagonistic commands (create junction/delete junction) and keep them apart by this flag ...
void addAdditionalChild(GNEAdditional *additional)
add additional child to this additional
bool unreferenced()
check if object ins't referenced
GNEViewNet * getViewNet() const
get view net