41 myProbability(probability) {
43 setParents<GNEDemandElement*>({distributionParent, vTypeParent});
250 return canParse<double>(value) && (parse<double>(value) >= 0);
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ GNE_TAG_VTYPEREF
reference to a vType (used in VType distributions)
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_VTYPE_DISTRIBUTION
vehicle type distribution
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
bool mySelected
boolean to check if this AC is selected (more quickly as checking GUIGlObjectStorage)
std::string getCommonAttribute(const Parameterised *parameterised, 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
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
Problem
enum class for demandElement problems
const GNEHierarchicalContainerParents< GNEDemandElement * > & getParentDemandElements() const
get parent 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.
GNEViewNet * getViewNet() const
get view net
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
double getDefaultDoubleValue(SumoXMLAttr attr) const
get default double value
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
double getAttributeDouble(SumoXMLAttr key) const
double myProbability
probability
Position getAttributePosition(SumoXMLAttr key) const
void computePathElement()
compute pathElement
std::string getParentName() const
Returns the name of the parent object.
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
bool isAttributeEnabled(SumoXMLAttr key) const
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform demand element changes
Position getPositionInView() const
Returns position of additional in view.
void drawJunctionPartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over junction.
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
void drawLanePartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over lane.
const RGBColor & getColor() const
get color
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void updateGeometry()
update pre-computed geometry information
SUMOVehicleClass getVClass() const
obtain VClass related with this demand element
void fixDemandElementProblem()
fix demand element problem (by default throw an exception, has to be reimplemented in children)
GNELane * getFirstPathLane() const
get first path lane
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
GNEMoveOperation * getMoveOperation()
get move operation
GNELane * getLastPathLane() const
get last path lane
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
std::string getDemandElementProblem() const
return a string with the current demand element problem (by default empty, can be reimplemented in ch...
Problem isDemandElementValid() const
check if current demand element is valid to be written into XML (by default true, can be reimplemente...
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GNEVTypeRef(GNENet *net)
default constructor
const Parameterised::Map & getACParametersMap() const
get parameters map
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
void writeDemandElement(OutputDevice &device) const
write demand element element into a xml file
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void buildPopUpMenuCommonOptions(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, GUISUMOAbstractView *parent, const SumoXMLTag tag, const bool selected, bool addSeparator=true)
Stores the information about how to visualize structures.
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
const Parameterised::Map & getParametersMap() const
Returns the inner key/value map.
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
A point in 2D or 3D with translation and scaling methods.