46 edges, {}, {}, {}, {personParent}, {}, {}, {}, {}, {}),
55 edges, {}, {}, {busStop}, {personParent}, {}, {}, {}, {}, {}),
74 new FXMenuCommand(ret, (
"Copy " +
getTagStr() +
" name to clipboard").c_str(),
nullptr, ret,
MID_COPY_NAME);
76 new FXMenuSeparator(ret);
83 new FXMenuSeparator(ret);
137 return (
"A ride need at least one edge");
142 return (
"Edge '" +
getEdgeParents().at((
int)i - 1)->getID() +
"' and edge '" +
getEdgeParents().at(i)->getID() +
"' aren't consecutives");
217 newPosition.
add(offset);
270 rideBoundary.
add(i->getCenteringBoundary());
276 return Boundary(-0.1, -0.1, 0.1, 0.1);
386 return canParse<std::vector<std::string> >(value);
388 if (canParse<double>(value)) {
389 double parsedValue = canParse<double>(value);
391 if (parsedValue == -1) {
394 return parsedValue >= 0;
400 return canParse<bool>(value);
442 result += i.first +
"=" + i.second +
"|";
445 if (!result.empty()) {
452 std::vector<std::pair<std::string, std::string> >
454 std::vector<std::pair<std::string, std::string> > result;
457 result.push_back(std::make_pair(i.first, i.second));
468 std::vector<std::string> parsedValues;
471 parsedValues.push_back(stValues.
next());
474 for (
auto i : parsedValues) {
475 std::vector<std::string> parsedParameters;
478 parsedParameters.push_back(stParam.
next());
482 setParameter(parsedParameters.front(), parsedParameters.back());
496 std::vector<std::string> FromViaToEdges;
498 FromViaToEdges.push_back(value);
509 std::vector<std::string> FromViaToEdges;
513 FromViaToEdges.push_back(value);
524 myLines = GNEAttributeCarrier::parse<std::vector<std::string> >(value);
530 if (parse<bool>(value)) {
bool mySelected
boolean to check if this AC is selected (instead of GUIGlObjectStorage)
std::vector< std::pair< std::string, std::string > > getGenericParameters() const
return generic parameters as vector of pairs format
const TagProperties & myTagProperty
the xml tag to which this attribute carrier corresponds
Copy object name - popup entry.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
std::vector< GNEEdge * > calculateDijkstraRoute(SUMOVehicleClass vClass, const std::vector< GNEEdge *> &partialEdges) const
calculate Dijkstra route between a list of partial edges
void startGeometryMoving()
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
void selectAttributeCarrier(bool changeFlag=true)
inherited from GNEAttributeCarrier
double getAttributeDouble(SumoXMLAttr key) const
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
void addedLockedObject(const GUIGlObjectType type)
set object selected
Boundary movingGeometryBoundary
boundary used during moving of elements (to avoid insertion in RTREE)
std::string next()
returns the next substring when it exists. Otherwise the behaviour is undefined
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
void add(const Position &pos)
Adds the given position to this one.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
bool isAttributeEnabled(SumoXMLAttr key) const
std::string firstOriginalLanePosition
value for saving first original position over lane before moving
std::string getDemandElementProblem() const
return a string with the current demand element problem (by default empty, can be reimplemented in ch...
Stores the information about how to visualize structures.
void changeAdditionalParent(GNEShape *shapeTobeChanged, const std::string &newAdditionalParentID, int additionalParentIndex)
change additional parent of a shape
void select(GUIGlID id, bool update=true)
Adds the object with the given id.
GNEViewParent * getViewParent() const
get the net object
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
DemandElementMove myRideMove
variable for move rides
Position originalViewPosition
value for saving first original position over lane before moving
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void writeDemandElement(OutputDevice &device) const
writte demand element element into a xml file
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
GNERide(GNEViewNet *viewNet, GNEDemandElement *personParent, const std::vector< GNEEdge *> &edges, double arrivalPosition, const std::vector< std::string > &lines)
parameter constructor
FXIcon * getIcon() const
get FXIcon associated to this AC
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
void endGeometryMoving()
end geometry movement
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
bool hasNext()
returns the information whether further substrings exist
static bool isValidGenericParameterKey(const std::string &value)
whether the given string is a valid key for a generic parameter
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
GNEEdge * getFromEdge() const
A class that stores a 2D geometrical boundary.
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
static RouteCalculator * getRouteCalculatorInstance()
obtain instance of RouteCalculator
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
const std::vector< GNEEdge * > & getEdgeParents() const
get edge parents
const std::vector< GNEDemandElement * > & getDemandElementChildren() const
return vector of demand elements that have as Parent this edge (For example, Calibrators) ...
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
LockGLObjectTypes * getLockGLObjectTypes() const
get selected items Modul
static bool isValidGenericParameterValue(const std::string &value)
whether the given string is a valid value for a generic parameter
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
void updateGeometry()
update pre-computed geometry information
void fixDemandElementProblem()
fix demand element problem (by default throw an exception, has to be reimplemented in children) ...
double myArrivalPosition
arrival position
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform demand element changes ...
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
A point in 2D or 3D with translation and scaling methods.
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
void removeLockedObject(const GUIGlObjectType type)
set object unselected
friend class GNEChange_Attribute
declare friend class
const std::vector< GNEAdditional * > & getAdditionalParents() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
const std::string & getDemandElementID() const
returns DemandElement ID
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_NMODE_SELECT
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
const std::string getID() const
function to support debugging
void setEnabledAttribute(const int enabledAttributes)
method for enabling the attribute and nothing else (used in GNEChange_EnableAttribute) ...
vehicle is a passenger car (a "normal" car)
bool areEdgesConsecutives(SUMOVehicleClass vClass, GNEEdge *from, GNEEdge *to) const
check if exist a route between the two given consecutives edges
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
SUMOVehicleClass getVClass() const
obtain VClass related with this demand element
A road/street connecting two junctions (netedit-version)
const std::vector< GNEDemandElement * > & getDemandElementParents() const
return vector of demand elements that have as Parent this edge (For example, Calibrators) ...
std::vector< std::string > myLines
valid line or vehicle ids or ANY
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
void reset()
Resets the boundary.
std::string getParentName() const
Returns the name of the parent object.
void deselect(GUIGlID id)
Deselects the object with the given id.
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
std::string getAttribute(SumoXMLAttr key) const
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getTagStr() const
get tag assigned to this object in string format
std::string getGenericParametersStr() const
return generic parameters in string format
const RGBColor & getColor() const
get color
bool isInitialised() const
check if Boundary is Initialised
void enableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
open additional dialog (used in netedit)
bool isDemandElementValid() const
check if current demand element is valid to be writed into XML (by default true, can be reimplemented...
Parameterised()
Constructor.
GNENet * getNet() const
get the net object
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
GUIGlID getGlID() const
Returns the numerical id of the object.
void changeEdgeParents(GNEShape *elementChild, const std::string &newEdgeIDs)
change edge parents of a shape
GNEViewNet * myViewNet
The GNEViewNet this demand element element belongs.
Position getPositionInView() const
Returns position of additional in view.
Static storage of an output device and its base (abstract) implementation.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
parent of an additional element
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
bool hasDialog() const
return true if tag correspond to an element that can be edited using a dialog
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
GUISelectedStorage gSelected
A global holder of selected objects.
Copy typed object name - popup entry.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void compute()
compute demand element
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
An Element which don't belongs to GNENet but has influency in the simulation.
void clearParameter()
Clears the parameter map.
GNEEdge * getToEdge() const
obtain to edge of this demand element