SUMO - Simulation of Urban MObility
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-2017 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 
32 #include "GNENetElement.h"
33 #include "GNENet.h"
34 
35 // ===========================================================================
36 // method definitions
37 // ===========================================================================
38 
39 
40 GNENetElement::GNENetElement(GNENet* net, const std::string& id, GUIGlObjectType type, SumoXMLTag tag, GUIIcon icon) :
41  GUIGlObject(type, id),
42  GNEAttributeCarrier(tag, icon),
43  myNet(net) {
44 }
45 
46 
48 
49 
50 GNENet*
52  return myNet;
53 }
54 
55 
56 const std::string&
58  return myNet->getMicrosimID();
59 }
60 
61 
62 /****************************************************************************/
SumoXMLTag
Numbers representing SUMO-XML - element names.
GNENet * myNet
the net to inform about updates
GUIGlObjectType
GNENet * getNet() const
get Net in which this element is placed
GUIIcon
An enumeration of icons used by the gui applications.
Definition: GUIIcons.h:43
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:88
virtual const std::string & getParentName() const
Returns the name of the parent object (if any)
~GNENetElement()
Destructor.
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
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
GNENetElement(GNENet *net, const std::string &id, GUIGlObjectType type, SumoXMLTag tag, GUIIcon icon)
Constructor.