71 int numReferences = 0;
72 for (
const auto& routeChild : refChild->getParentDemandElements().at(1)->getChildDemandElements()) {
77 if (numReferences == 1) {
78 refChild->getParentDemandElements().at(1)->writeDemandElement(device);
80 refChild->writeDemandElement(device);
154 return Boundary(-0.1, -0.1, 0.1, 0.1);
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_IGNORING
vehicles ignoring classes
@ SUMO_TAG_ROUTE_DISTRIBUTION
distribution of a route
@ GNE_TAG_ROUTEREF
virtual element used to reference routes with distributions
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
A class that stores a 2D geometrical boundary.
const std::string getID() const
get ID (all Attribute Carriers have one)
double getCommonAttributeDouble(SumoXMLAttr key) const
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
const std::string & getTagStr() const
get tag assigned to this object in string format
Position getCommonAttributePosition(SumoXMLAttr key) const
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
GNENet * myNet
pointer to net
bool isCommonAttributeValid(SumoXMLAttr key, const std::string &value) const
std::string getCommonAttribute(SumoXMLAttr key) const
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
bool isValidDemandElementID(const std::string &value) const
check if a new demand element ID is valid
void setDemandElementID(const std::string &newID)
set demand element id
Problem
enum class for demandElement problems
const GNEHierarchicalContainerChildren< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
A NBNetBuilder extended by visualisation and editing capabilities.
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this routeDistribution
GNELane * getFirstPathLane() const
get first path lane
bool isValid(SumoXMLAttr key, const std::string &value) override
Parameterised * getParameters() override
get parameters associated with this routeDistribution
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::string getDemandElementProblem() const
return a string with the current demand element problem
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
std::string getParentName() const
Returns the name of the parent object.
Problem isDemandElementValid() const
check if current demand element is valid to be written into XML
const RGBColor & getColor() const
get color
std::string getAttribute(SumoXMLAttr key) const override
inherited from GNEAttributeCarrier
double getAttributeDouble(SumoXMLAttr key) const override
SUMOVehicleClass getVClass() const
obtain VClass related with this demand element
~GNERouteDistribution()
destructor
Position getAttributePosition(SumoXMLAttr key) const override
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void updateGeometry() override
update pre-computed geometry information
void computePathElement()
compute pathElement
void fixDemandElementProblem()
fix demand element problem
void writeDemandElement(OutputDevice &device) const
write demand element element into a xml file
void drawJunctionPartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over junction.
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
Position getPositionInView() const
Returns position of additional in view.
GNERouteDistribution(GNENet *net)
default constructor
GNELane * getLastPathLane() const
get last path lane
void drawLanePartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over lane.
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
Stores the information about how to visualize structures.
static const std::vector< SumoXMLTag > routes
route namespace
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
An upper class for objects with additional parameters.
A point in 2D or 3D with translation and scaling methods.
static const RGBColor INVISIBLE