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