74 if (refChild->getTagProperty()->isDistributionReference() &&
75 (refChild->getParentDemandElements().front() ==
this)) {
76 refChild->writeDemandElement(device);
106 if (vTypeRef->getTagProperty()->isDistributionReference()) {
107 return vTypeRef->getParentDemandElements().at(1)->getVClass();
119 if (vTypeRef->getTagProperty()->isDistributionReference()) {
120 return vTypeRef->getParentDemandElements().at(1)->getColor();
138 if (vTypeRef->getTagProperty()->isDistributionReference()) {
139 return vTypeRef->getParentDemandElements().at(1)->getPositionInView();
149 return myNet->getMicrosimID();
155 return Boundary(-0.1, -0.1, 0.1, 0.1);
217 if (vTypeRef->getTagProperty()->isDistributionReference() &&
218 (vTypeRef->getParentDemandElements().at(1)->getTagProperty()->getTag() ==
SUMO_TAG_VTYPE)) {
219 return vTypeRef->getParentDemandElements().at(1)->getAttribute(key);
232 if (vTypeRef->getTagProperty()->isDistributionReference() &&
233 (vTypeRef->getParentDemandElements().at(1)->getTagProperty()->getTag() ==
SUMO_TAG_VTYPE)) {
234 return vTypeRef->getParentDemandElements().at(1)->getAttributeDouble(key);
246 if (vTypeRef->getTagProperty()->isDistributionReference() &&
247 (vTypeRef->getParentDemandElements().at(1)->getTagProperty()->getTag() ==
SUMO_TAG_VTYPE)) {
248 return vTypeRef->getParentDemandElements().at(1)->getAttributePosition(key);
const std::string invalid_return< std::string >::value
const std::string DEFAULT_VTYPE_ID
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ SUMO_TAG_VTYPE_DISTRIBUTION
distribution of a vehicle type
@ SUMO_TAG_TYPE
type (edge)
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_DEMAND_FILE
demand demand file
@ SUMO_ATTR_DETERMINISTIC
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
const std::string getID() const override
get ID (all Attribute Carriers have one)
static T parse(const std::string &string)
parses a value of type T from string (used for basic types: int, double, bool, etc....
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
const std::string & getTagStr() const
get tag assigned to this object in string format
static bool canParse(const std::string &string)
true if a value of type T can be parsed from string
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
const GNETagProperties * myTagProperty
reference to tagProperty associated with this attribute carrier
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
GNEDemandElement(const std::string &id, GNENet *net, const std::string &filename, SumoXMLTag tag, const GNEPathElement::Options pathOptions)
Constructor.
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.
GNEPathElement(const GNEPathElement::Options options)
constructor
std::string getDemandElementProblem() const override
return a string with the current demand element problem
Parameterised * getParameters() override
get parameters associated with this vTypeDistribution
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
~GNEVTypeDistribution()
destructor
void computePathElement() override
compute pathElement
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
Boundary getCenteringBoundary() const override
Returns the boundary to which the view shall be centered in order to show the object.
double getAttributeDouble(SumoXMLAttr key) const override
void drawJunctionPartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const override
Draws partial object over junction.
bool isValid(SumoXMLAttr key, const std::string &value) override
GNEVTypeDistribution(GNENet *net)
default constructor
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
void updateGeometry() override
update pre-computed geometry information
void writeDemandElement(OutputDevice &device) const override
write demand element element into a xml file
SUMOVehicleClass getVClass() const override
obtain VClass related with this demand element
void fixDemandElementProblem() override
fix demand element problem
std::string getParentName() const override
Returns the name of the parent object.
int myDeterministic
deterministic distribution
Position getPositionInView() const override
Returns position of additional in view.
GNELane * getLastPathLane() const override
get last path lane
Position getAttributePosition(SumoXMLAttr key) const override
Problem isDemandElementValid() const override
check if current demand element is valid to be written into XML
std::string getAttribute(SumoXMLAttr key) const override
inherited from GNEAttributeCarrier
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList) override
split geometry
void drawLanePartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const override
Draws partial object over lane.
const RGBColor & getColor() const override
get color
GNELane * getFirstPathLane() const override
get first path lane
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this vTypeDistribution
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
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.