SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GNENetElement.cpp
Go to the documentation of this file.
1 /****************************************************************************/
7 // A abstract class for netElements
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #ifdef _MSC_VER
26 #include <windows_config.h>
27 #else
28 #include <config.h>
29 #endif
30 /*
31 #include <string>
32 #include <iostream>
33 #include <utility>
34 #include <time.h>
35 #include <foreign/polyfonts/polyfonts.h>
36 #include <utils/foxtools/MFXUtils.h>
37 #include <utils/geom/PositionVector.h>
38 #include <utils/gui/windows/GUISUMOAbstractView.h>
39 #include <utils/common/ToString.h>
40 #include <utils/gui/windows/GUIAppEnum.h>
41 #include <utils/gui/div/GUIParameterTableWindow.h>
42 #include <utils/gui/globjects/GUIGLObjectPopupMenu.h>
43 #include <utils/gui/div/GUIGlobalSelection.h>
44 #include <utils/gui/div/GLHelper.h>
45 #include <utils/gui/globjects/GLIncludes.h>
46 */
47 #include "GNENetElement.h"
48 #include "GNENet.h"
49 
50 #ifdef CHECK_MEMORY_LEAKS
51 #include <foreign/nvwa/debug_new.h>
52 #endif // CHECK_MEMORY_LEAKS
53 
54 // ===========================================================================
55 // method definitions
56 // ===========================================================================
57 
58 
59 GNENetElement::GNENetElement(GNENet* net, const std::string& id, GUIGlObjectType type, SumoXMLTag tag) :
60  GUIGlObject(type, id),
62  myNet(net) {
63 }
64 
65 
67 
68 
69 GNENet*
71  return myNet;
72 }
73 
74 
75 const std::string&
77  return myNet->getMicrosimID();
78 }
79 
80 
81 /****************************************************************************/
SumoXMLTag
Numbers representing SUMO-XML - element names.
GNENet * myNet
the net to inform about updates
GUIGlObjectType
virtual const std::string & getParentName() const
Returns the name of the parent object (if any)
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:87
~GNENetElement()
Destructor.
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
GNENetElement(GNENet *net, const std::string &id, GUIGlObjectType type, SumoXMLTag tag)
Constructor.
GNENet * getNet() const
get Net in which this element is placed
GNENet * myNet
the net to which operations shall be applied or which shall be informed about gui updates (we are not...
Definition: GNEChange.h:82