 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
45 myPersonFrameParent(vehicleFrameParent) {
71 std::ostringstream information;
73 switch (myPersonFrameParent->myPersonPlanTagSelector->getCurrentTagProperties().getTag()) {
76 <<
"- Click over edges to\n"
81 <<
"- Click over an edge and\n"
82 <<
" a bus to create a trip.";
86 <<
"- Click over a sequenz of\n"
87 <<
" consecutive edges to\n"
92 <<
"- Click over edges to\n"
97 <<
"- Click over an edge and\n"
98 <<
" a bus to create a walk.";
102 <<
"- Click over a route";
106 <<
"- Click over edges to\n"
107 <<
" create a ride.";
111 <<
"- Click over an edge and\n"
112 <<
" a bus to create a ride";
116 <<
"- Click over a busStop\n"
117 <<
" to create a stop";
121 <<
"- Click over a lane\n"
122 <<
" to create a stop";
128 myInformationLabel->setText(information.str().c_str());
136 GNEFrame(horizontalFrameParent, viewNet,
"Persons") {
421 std::vector<std::string> types = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[
SUMO_ATTR_VTYPES]);
422 std::vector<std::string> modes = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[
SUMO_ATTR_MODES]);
438 std::vector<std::string> types = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[
SUMO_ATTR_VTYPES]);
439 std::vector<std::string> modes = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[
SUMO_ATTR_MODES]);
477 std::vector<std::string> lines = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[
SUMO_ATTR_LINES]);
486 std::vector<std::string> lines = GNEAttributeCarrier::parse<std::vector<std::string> >(valuesMap[
SUMO_ATTR_LINES]);
585 delete personParameters;
601 delete personFlowParameters;
GNEPersonFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
@ SVC_PEDESTRIAN
pedestrian
An Element which don't belongs to GNENet but has influency in the simulation.
An Element which don't belongs to GNENet but has influency in the simulation.
static void buildPersonTripFromTo(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, GNEEdge *fromEdge, GNEEdge *toEdge, double arrivalPos, const std::vector< std::string > &types, const std::vector< std::string > &modes)
build trip using a from-to edges
const std::string getID() const
function to support debugging
void setVClass(SUMOVehicleClass vClass)
set SUMOVehicleClass
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
static void buildStop(GNEViewNet *viewNet, bool undoDemandElements, const SUMOVehicleParameter::Stop &stopParameters, GNEDemandElement *stopParent)
build stop
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
static void buildRideFromTo(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, GNEEdge *fromEdge, GNEEdge *toEdge, const std::vector< std::string > &lines, double arrivalPos)
build ride using a from-to edges
void showEdgePathCreator()
show EdgePathCreator
void edgePathCreated()
finish edge path creation
GNEFrameAttributesModuls::AttributesCreator * myPersonAttributes
internal vehicle attributes
void refreshDemandElementSelector()
refresh demand element selector
bool areValuesValid() const
check if parameters of attributes are valid
void setStatusBarText(const std::string &text)
set staturBar text
void showDemandElementSelector()
show demand element selector
bool addBusStop(GNEAdditional *busStop)
add busStop to route
GNEFrameModuls::EdgePathCreator * myEdgePathCreator
edge path creator (used for Walks, rides and trips)
static void buildRideBusStop(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, GNEEdge *fromEdge, GNEAdditional *busStop, const std::vector< std::string > &lines)
build ride using a from edge and a busStop
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
@ SUMO_TAG_PTYPE
description of a person type (used in NETEDIT)
bool buildPersonOverStop(GNELane *lane, GNEAdditional *busStop)
build person over stop
GNEFrameModuls::TagSelector * myPersonPlanTagSelector
person plan selector (used to select diffent kind of person plan)
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn't)
Structure representing possible vehicle parameter.
@ SUMO_TAG_NOTHING
invalid tag
GNEFrameModuls::DemandElementSelector * myPTypeSelector
Person Type selectors.
GNEFrameAttributesModuls::AttributesCreator * myPersonPlanAttributes
internal person plan attributes
HelpCreation * myHelpCreation
Help creation.
SumoXMLTag
Numbers representing SUMO-XML - element names.
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool addEdge(GNEEdge *edge)
add edge to route
static SUMOVehicleParameter * parseVehicleAttributes(const SUMOSAXAttributes &attrs, const bool hardFail, const bool optionalID=false, const bool skipDepart=false, const bool isPerson=false)
Parses a vehicle's attributes.
@ SUMO_ATTR_BEGIN
weights: time range begin
void hideAttributesCreatorModul()
hide group box
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
~GNEPersonFrame()
Destructor.
static void buildWalkRoute(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, GNEDemandElement *route, double arrivalPos)
build walk using a list of consecutive edges
std::map< SumoXMLAttr, std::string > getAttributesAndValues(bool includeAll) const
get attributes and their values
GNENet * getNet() const
get the net object
static bool getStopParameter(SUMOVehicleParameter::Stop &stop, const SumoXMLTag stopTag, GNEViewNet *viewNet, GNEFrameAttributesModuls::AttributesCreator *stopAttributes, const GNEFrameAttributesModuls::NeteditAttributes *myNeteditAttributes, const GNELane *lane, const GNEAdditional *stoppingPlace)
get stop parameters
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
void tagSelected()
Tag selected in TagSelector.
void showHelpCreation()
show HelpCreation
Encapsulated Xerces-SAX-attributes.
@ SUMO_TAG_PERSONSTOP_LANE
void hideEdgePathCreator()
show EdgePathCreator
class used to group all variables related with objects under cursor after a click over view
void edgePathCreatorName(const std::string &name)
update EdgePathCreator name
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
GNEDemandElement * getCurrentDemandElement() const
get current demand element
void setEdgePathCreatorModes(int edgePathCreatorModes)
set EdgePathCreatorModes
static void buildWalkBusStop(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, GNEEdge *fromEdge, GNEAdditional *busStop)
build walk using a from edge an a busStop
GNEViewNet * myViewNet
View Net.
GNEUndoList * getUndoList() const
get the undoList object
const std::map< int, std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
GNEDemandElement * buildPerson()
build person and return it (note: function includes a call to p_begin(...), but NOT a call to p_end(....
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
bool isWalk() const
return true if tag correspond to a walk element
void showNeteditAttributesModul(const GNEAttributeCarrier::TagProperties &tagValue)
show Netedit attributes modul
const GNEAttributeCarrier::TagProperties & getCurrentTagProperties() const
get current type tag
static void buildPerson(GNEViewNet *viewNet, bool undoDemandElements, const SUMOVehicleParameter &personParameters)
build person
@ SUMO_TAG_PERSONTRIP_BUSSTOP
HelpCreation(GNEPersonFrame *vehicleFrameParent)
constructor
~HelpCreation()
destructor
GNEFrameModuls::EdgePathCreator * getEdgePathCreator() const
get EdgePathCreator modul
void p_abort()
reverts and discards ALL active command groups
void hideTagSelector()
hide item selector
void refreshRows()
refresh rows (called after creating an element)
bool isPersonTrip() const
return true if tag correspond to a person trip
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
@ SUMO_TAG_BUS_STOP
A bus stop.
void setCurrentTag(SumoXMLTag newTag)
set current type manually
static SUMOVehicleParameter * parseFlowAttributes(const SUMOSAXAttributes &attrs, const bool hardFail, const SUMOTime beginDefault, const SUMOTime endDefault, bool isPerson=false)
Parses a flow's attributes.
bool buildPersonOverRoute(GNEDemandElement *route)
build person over route
bool isPersonStop() const
return true if tag correspond to a person stop element
void refreshTagProperties()
due myCurrentTagProperties is a Reference, we need to refresh it when frameParent is show
static void buildPersonFlow(GNEViewNet *viewNet, bool undoDemandElements, const SUMOVehicleParameter &personFlowParameters)
build person flow
GNEDemandElement * getDemandElementFront() const
get front net element element (or a pointer to nullptr if there isn't)
GNEFrameAttributesModuls::NeteditAttributes * myNeteditAttributes
Netedit parameter.
@ SUMO_TAG_PERSONTRIP_FROMTO
static void buildPersonTripBusStop(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, GNEEdge *fromEdge, GNEAdditional *busStop, const std::vector< std::string > &types, const std::vector< std::string > &modes)
build trip using a from edge and a busStop
void updateHelpCreation()
update HelpCreation
void demandElementSelected()
selected demand element in DemandElementSelector
bool addPerson(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
@ SUMO_TAG_ROUTE
begin/end of the description of a route
GNELane * getLaneFront() const
get front lane (or a pointer to nullptr if there isn't)
void hideDemandElementSelector()
hide demand element selector
@ SUMO_ATTR_END
weights: time range end
FXLabel * myInformationLabel
Label with creation information.
std::vector< GNEEdge * > getClickedEdges() const
get current clicked edges
bool isRide() const
return true if tag correspond to a ride element
std::string generateDemandElementID(const std::string &prefix, SumoXMLTag type) const
generate demand element id
@ SUMO_TAG_PERSONSTOP_BUSSTOP
void showTagSelector()
show item selector
void hideNeteditAttributesModul()
hide Netedit attributes modul
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...
virtual void show()
show Frame
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
GNEFrameModuls::TagSelector * myPersonTagSelector
person tag selector (used to select diffent kind of persons)
GNEAdditional * getClickedBusStop() const
get current clicked edges
void showAttributesCreatorModul(const GNEAttributeCarrier::TagProperties &tagProperties, const std::vector< SumoXMLAttr > &hiddenAttributes)
show AttributesCreator modul
static void buildWalkFromTo(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, GNEEdge *fromEdge, GNEEdge *toEdge, double arrivalPos)
build walk using a from-to edges
virtual void hide()
hide Frame
GNEAdditional * getAdditionalFront() const
get front additional element (or a pointer to nullptr if there isn't)
Definition of vehicle stop (position and duration)
static void buildWalkEdges(GNEViewNet *viewNet, bool undoDemandElements, GNEDemandElement *personParent, const std::vector< GNEEdge * > &edges, double arrivalPos)
build walk using a list of consecutive edges
void hideHelpCreation()
hide HelpCreation