 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
44 myVehicleFrameParent(vehicleFrameParent) {
69 std::ostringstream information;
71 switch (myVehicleFrameParent->myVehicleTagSelector->getCurrentTagProperties().getTag()) {
74 <<
"- Click over a route to\n"
75 <<
" create a vehicle.";
79 <<
"- Select two edges to\n"
84 <<
"- Click over a route to\n"
85 <<
" create a routeFlow.";
89 <<
"- Select two edges to\n"
96 myInformationLabel->setText(information.str().c_str());
104 GNEFrame(horizontalFrameParent, viewNet,
"Vehicles") {
196 if (vehicleParameters) {
204 delete vehicleParameters;
219 if (routeFlowParameters) {
227 delete routeFlowParameters;
317 delete tripParameters;
333 delete flowParameters;
void hideHelpCreation()
hide HelpCreation
FXLabel * myInformationLabel
Label with creation information.
virtual SUMOVehicleClass getVClass() const =0
obtain VClass related with this demand element
const std::string getID() const
function to support debugging
void setVClass(SUMOVehicleClass vClass)
set SUMOVehicleClass
static void buildVehicleOverRoute(GNEViewNet *viewNet, bool undoDemandElements, const SUMOVehicleParameter &vehicleParameters)
build functions
GNEVehicleFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
void showEdgePathCreator()
show EdgePathCreator
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 isRoute() const
return true if tag correspond to a route element
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn't)
const std::vector< GNEEdge * > & getEdgeParents() const
get edge parents
Structure representing possible vehicle parameter.
description of a vehicle type
~HelpCreation()
destructor
void showHelpCreation()
show HelpCreation
SumoXMLTag
Numbers representing SUMO-XML - element names.
bool addVehicle(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
void tagSelected()
Tag selected in TagSelector.
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
void showAttributesCreatorModul(const GNEAttributeCarrier::TagProperties &myTagProperties)
show AttributesCreator modul
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.
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...
GNEFrameModuls::DemandElementSelector * myVTypeSelector
Vehicle Type selectors.
std::map< SumoXMLAttr, std::string > getAttributesAndValues(bool includeAll) const
get attributes and their values
GNENet * getNet() const
get the net object
a flow definition nusing a route instead of a from-to edges route (used in NETEDIT)
a flow definitio nusing a from-to edges instead of a route (used by router)
static void buildTrip(GNEViewNet *viewNet, bool undoDemandElements, const SUMOVehicleParameter &vehicleParameters, const std::vector< GNEEdge * > &edges)
build trip
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
HelpCreation * myHelpCreation
Help creation.
Encapsulated Xerces-SAX-attributes.
void hideEdgePathCreator()
show EdgePathCreator
class used to group all variables related with objects under cursor after a click over view
virtual double getAttributeDouble(SumoXMLAttr key) const =0
GNEDemandElement * getCurrentDemandElement() const
get current demand element
static void buildFlow(GNEViewNet *viewNet, bool undoDemandElements, const SUMOVehicleParameter &vehicleParameters, const std::vector< GNEEdge * > &edges)
build flow
GNEViewNet * myViewNet
View Net.
const std::map< int, std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
const GNEAttributeCarrier::TagProperties & getCurrentTagProperties() const
get current type tag
void demandElementSelected()
selected vehicle type in DemandElementSelector
void updateHelpCreation()
update HelpCreation
GNEFrameAttributesModuls::AttributesCreator * myVehicleAttributes
internal vehicle attributes
GNEFrameModuls::EdgePathCreator * myEdgePathCreator
edge path creator (used for trips and flows)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
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.
static void buildVehicleWithEmbeddedRoute(GNEViewNet *viewNet, bool undoDemandElements, SUMOVehicleParameter vehicleParameters, GNEDemandElement *embeddedRouteCopy)
build vehicle with a embedded route
void refreshTagProperties()
due myCurrentTagProperties is a Reference, we need to refresh it when frameParent is show
GNEDemandElement * getDemandElementFront() const
get front net element element (or a pointer to nullptr if there isn't)
HelpCreation(GNEVehicleFrame *vehicleFrameParent)
constructor
begin/end of the description of a route
void hideDemandElementSelector()
hide demand element selector
void edgePathCreated()
finish edge path creation
std::vector< GNEEdge * > getClickedEdges() const
get current clicked edges
std::string generateDemandElementID(const std::string &prefix, SumoXMLTag type) const
generate demand element id
static void buildFlowOverRoute(GNEViewNet *viewNet, bool undoDemandElements, const SUMOVehicleParameter &vehicleParameters)
build a flow over an existent route
virtual void show()
show Frame
void showWarningMessage(std::string extra="") const
show warning message with information about non-valid attributes
virtual void hide()
hide Frame
static void buildFlowWithEmbeddedRoute(GNEViewNet *viewNet, bool undoDemandElements, SUMOVehicleParameter vehicleParameters, GNEDemandElement *embeddedRouteCopy)
build flow with a embedded route
~GNEVehicleFrame()
Destructor.
a single trip definition (used by router)
GNEFrameModuls::TagSelector * myVehicleTagSelector
vehicle tag selector (used to select diffent kind of vehicles)
GNEFrameModuls::EdgePathCreator * getEdgePathCreator() const
get EdgePathCreator modul