39 myDeterministic(deterministic) {
64 int numReferences = 0;
65 for (
const auto& vTypeChild : refChild->getParentDemandElements().at(1)->getChildDemandElements()) {
70 if (numReferences == 1) {
71 refChild->getParentDemandElements().at(1)->writeDemandElement(device);
73 refChild->writeDemandElement(device);
103 if (childDemandElement->getTagProperty()->hasAttribute(
SUMO_ATTR_REFID)) {
104 return childDemandElement->getVClass();
114 if (childDemandElement->getTagProperty()->hasAttribute(
SUMO_ATTR_REFID)) {
115 return childDemandElement->getColor();
149 return Boundary(-0.1, -0.1, 0.1, 0.1);
210 if (childDemandElement->getTagProperty()->hasAttribute(
SUMO_ATTR_REFID)) {
211 return childDemandElement->getParentDemandElements().at(1)->getAttribute(key);
223 if (childDemandElement->getTagProperty()->hasAttribute(
SUMO_ATTR_REFID)) {
224 return childDemandElement->getParentDemandElements().at(1)->getAttributeDouble(key);
242 if (childDemandElement->getTagProperty()->hasAttribute(
SUMO_ATTR_REFID)) {
243 return childDemandElement->getAttributePosition(key);
273 if ((value ==
"-1") || value.empty()) {
276 return canParse<int>(value) && (parse<int>(value) >= 0);
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_IGNORING
vehicles ignoring classes
@ GNE_TAG_VTYPEREF
reference to a vType (used in VType distributions)
@ SUMO_TAG_VTYPE_DISTRIBUTION
distribution of a vehicle type
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ 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
get ID (all Attribute Carriers have one)
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
const std::string & getTagStr() const
get tag assigned to this object in string format
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
GNENet * myNet
pointer to net
bool isCommonValid(SumoXMLAttr key, const std::string &value) 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
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
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
A NBNetBuilder extended by visualisation and editing capabilities.
int getDefaultIntValue(SumoXMLAttr attr) const
get default int value
std::string getParentName() const
Returns the name of the parent object.
void computePathElement()
compute pathElement
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform demand element changes
Problem isDemandElementValid() const
check if current demand element is valid to be written into XML
void writeDemandElement(OutputDevice &device) const
write demand element element into a xml file
~GNEVTypeDistribution()
destructor
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
GNELane * getFirstPathLane() const
get first path lane
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
Position getPositionInView() const
Returns position of additional in view.
void updateGeometry()
update pre-computed geometry information
GNEVTypeDistribution(GNENet *net)
default constructor
const RGBColor & getColor() const
get color
void drawJunctionPartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over junction.
double getAttributeDouble(SumoXMLAttr key) const
void drawLanePartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over lane.
int myDeterministic
deterministic distribution
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
SUMOVehicleClass getVClass() const
obtain VClass related with this demand element
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
const Parameterised::Map & getACParametersMap() const
get parameters map
GNELane * getLastPathLane() const
get last path lane
Position getAttributePosition(SumoXMLAttr key) const
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GNEMoveOperation * getMoveOperation()
get move operation
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
void fixDemandElementProblem()
fix demand element problem
std::string getDemandElementProblem() const
return a string with the current demand element problem
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.
std::map< std::string, std::string > Map
parameters map
A point in 2D or 3D with translation and scaling methods.
static const RGBColor YELLOW