64 #include <mesogui/GUIMEVehicleControl.h>
67 #ifdef CHECK_MEMORY_LEAKS
69 #endif // CHECK_MEMORY_LEAKS
98 std::vector<std::string> guiSettingsFiles;
138 vehControl =
new GUIMEVehicleControl();
154 NLHandler handler(
"", *net, db, tb, *eb, jb);
156 NLBuilder builder(oc, *net, *eb, jb, db, handler);
160 if (!builder.
build()) {
168 osgView = oc.
getBool(
"osg-view");
172 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
179 }
catch (std::exception& e) {
199 const std::vector<std::string>& guiSettingsFiles,
200 const bool osgView) {
230 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
void setHandler(NLHandler *handler)
Sets the parent handler to use for nested parsing.
static MsgHandler * getWarningInstance()
Returns the instance to add warnings to.
The message is only something to show.
std::vector< std::string > getStringVector(const std::string &name) const
Returns the list of string-vector-value of the named option (only for Option_String) ...
static MsgHandler * getErrorInstance()
Returns the instance to add errors to.
The class responsible for building and deletion of vehicles (gui-version)
OutputDevice * myWarningRetriever
static void getOptions(bool loadConfig, int argc=0, char **argv=0)
Parses the command line arguments and loads the configuration optionally.
The main interface for loading a microsim.
void load(const std::string &file, bool isNet)
begins the loading of the given file
GUILoadThread(FXApp *app, MFXInterThreadEventClient *mw, MFXEventQue &eq, FXEX::FXThreadEvent &ev)
constructor
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static bool gRunAfterLoad
the simulation shall start direct after loading
FXEX::FXThreadEvent & myEventThrow
void initGUIStructures()
Initialises gui wrappers.
void addRetriever(OutputDevice *retriever)
Adds a further retriever to the instance responsible for a certain msg type.
void submitEndAndCleanup(GUINet *net, const SUMOTime simStartTime, const SUMOTime simEndTime, const std::vector< std::string > &guiSettingsFiles=std::vector< std::string >(), const bool osgView=false)
Closes the loading process.
Derivation of NLEdgeControlBuilder which builds gui-edges.
Builds detectors for guisim.
OutputDevice * myErrorRetriever
The instances of message retriever encapsulations Needed to be deleted from the handler later on...
static OptionsCont & getOptions()
Retrieves the options.
static void initRandGlobal(MTRand *which=0)
Reads the given random number options and initialises the random number generator in accordance...
OutputDevice * myMessageRetriever
static void fillOptions()
Inserts options used by the simulation into the OptionsCont-singleton.
Builds trigger objects for guisim.
virtual ~GUILoadThread()
destructor
virtual bool initOptions()
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
void clear()
Removes all information from the container.
Builder of microsim-junctions and tls.
SUMOTime string2time(const std::string &r)
void removeRetriever(OutputDevice *retriever)
Removes the retriever from the.
static MsgHandler * getMessageInstance()
Returns the instance to add normal messages to.
const std::string & getFileName() const
static MTRand myVehicleParamsRNG
A random number generator used to choose from vtype/route distributions and computing the speed facto...
bool myLoadNet
Information whether only the network shall be loaded.
static bool gQuitOnEnd
the window shall be closed when the simulation has ended
static bool checkOptions()
Checks the set options.
virtual bool build()
Builds and initialises the simulation.
void retrieveMessage(const MsgHandler::MsgType type, const std::string &msg)
Retrieves messages from the loading module.
The message is a warning.
Encapsulates an object's method for using it as a message retriever.
static void clearAll()
Clears all dictionaries.
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
A MSNet extended by some values for usage within the gui.
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
void inform(std::string msg, bool addType=true)
adds a new error to the list
A storage for options typed value containers)
Stores time-dependant events and executes them at the proper time (guisim)
static const bool gUseMesoSim
static void setMSGlobals(OptionsCont &oc)
Sets the global microsim-options.
std::string myFile
the path to load the simulation from
static void allowTextures(const bool val)
don't draw any textures
The class responsible for building and deletion of vehicles.
void clear()
Clears information whether an error occured previously.
static void initOutputOptions()