Eclipse SUMO - Simulation of Urban MObility
|
#include <GUILoadThread.h>
Public Types | |
enum | { ID_THREAD_EVENT } |
FOX declaration. More... | |
Public Member Functions | |
const std::string & | getFileName () const |
GUILoadThread (FXApp *app, GUIApplicationWindow *mw, MFXSynchQue< GUIEvent * > &eq, FXEX::MFXThreadEvent &ev, const bool isLibsumo) | |
constructor | |
void | loadConfigOrNet (const std::string &file) |
begins the loading of the given file | |
long | onThreadEvent (FXObject *, FXSelector, void *) |
long | onThreadSignal (FXObject *, FXSelector, void *) |
void | retrieveMessage (const MsgHandler::MsgType type, const std::string &msg) |
Retrieves messages from the loading module. | |
FXint | run () |
void | signal () |
void | signal (FXuint seltype) |
virtual | ~GUILoadThread () |
destructor | |
Static Public Member Functions | |
static void | sleep (long ms) |
Protected Member Functions | |
void | submitEndAndCleanup (GUINet *net, const SUMOTime simStartTime, const SUMOTime simEndTime, const std::vector< std::string > &guiSettingsFiles=std::vector< std::string >(), const bool osgView=false, const bool viewportFromRegistry=false) |
Closes the loading process. | |
Protected Attributes | |
const bool | myAmLibsumo |
whether we are running in libsumo | |
FXApp * | myApp = nullptr |
pointer to APP | |
MFXInterThreadEventClient * | myClient = nullptr |
thread client | |
OutputDevice * | myErrorRetriever |
The instances of message retriever encapsulations Needed to be deleted from the handler later on. | |
MFXSynchQue< GUIEvent * > & | myEventQue |
FXEX::MFXThreadEvent & | myEventThrow |
std::string | myFile |
the path to load the simulation from | |
OutputDevice * | myMessageRetriever |
GUIApplicationWindow * | myParent |
the parent window to inform about the loading | |
std::string | myTitle |
the title string for the application | |
OutputDevice * | myWarningRetriever |
Private Attributes | |
FXEX::MFXThreadEventHandle | event |
event | |
Definition at line 47 of file GUILoadThread.h.
|
inherited |
GUILoadThread::GUILoadThread | ( | FXApp * | app, |
GUIApplicationWindow * | mw, | ||
MFXSynchQue< GUIEvent * > & | eq, | ||
FXEX::MFXThreadEvent & | ev, | ||
const bool | isLibsumo | ||
) |
constructor
Definition at line 66 of file GUILoadThread.cpp.
References MsgHandler::addRetriever(), MsgHandler::getErrorInstance(), MsgHandler::MT_ERROR, MsgHandler::MT_MESSAGE, MsgHandler::MT_WARNING, myErrorRetriever, myMessageRetriever, myWarningRetriever, and retrieveMessage().
|
virtual |
destructor
Definition at line 77 of file GUILoadThread.cpp.
References myErrorRetriever, myMessageRetriever, and myWarningRetriever.
const std::string & GUILoadThread::getFileName | ( | ) | const |
Definition at line 275 of file GUILoadThread.cpp.
References myFile.
Referenced by GUIApplicationWindow::onUpdReload().
void GUILoadThread::loadConfigOrNet | ( | const std::string & | file | ) |
begins the loading of the given file
Definition at line 257 of file GUILoadThread.cpp.
References myFile, and OptionsIO::setArgs().
Referenced by GUIApplicationWindow::loadConfigOrNet().
|
inherited |
Definition at line 128 of file MFXSingleEventThread.cpp.
References MFXInterThreadEventClient::eventOccurred(), and MFXSingleEventThread::myClient.
Referenced by FXDEFMAP().
|
inherited |
Definition at line 113 of file MFXSingleEventThread.cpp.
References MFXSingleEventThread::event, PIPE_READ, FXEX::SEL_THREAD, and UNUSED_PARAMETER.
Referenced by FXDEFMAP().
void GUILoadThread::retrieveMessage | ( | const MsgHandler::MsgType | type, |
const std::string & | msg | ||
) |
Retrieves messages from the loading module.
Definition at line 267 of file GUILoadThread.cpp.
References myEventQue, myEventThrow, MFXSynchQue< T, Container >::push_back(), and FXEX::MFXThreadEvent::signal().
Referenced by GUILoadThread().
|
virtual |
starts the thread the thread ends after the net has been loaded
Reimplemented from MFXSingleEventThread.
Definition at line 85 of file GUILoadThread.cpp.
References GUIApplicationWindow::addRecentConfig(), GUIApplicationWindow::addRecentNetwork(), MsgHandler::addRetriever(), GUITexturesHelper::allowTextures(), NLBuilder::build(), MSFrame::checkOptions(), OptionsCont::clear(), MsgHandler::clear(), MSNet::clearAll(), libsumo::CMD_GET_GUI_VARIABLE, libsumo::CMD_SET_GUI_VARIABLE, MSFrame::fillOptions(), GUIGlobals::gDemoAutoReload, OptionsCont::getBool(), OutputDevice::getDevice(), MsgHandler::getErrorInstance(), MsgHandler::getMessageInstance(), OptionsCont::getOptions(), OptionsIO::getOptions(), OptionsIO::getRoot(), OptionsCont::getString(), OptionsCont::getStringVector(), MsgHandler::getWarningInstance(), GUIGlobals::gQuitOnEnd, GUIGlobals::gRunAfterLoad, GUIGlobals::gTrackerInterval, MSGlobals::gUseMesoSim, MsgHandler::inform(), GUINet::initGUIStructures(), MsgHandler::initOutputOptions(), NLBuilder::initRandomness(), OptionsCont::isDefault(), OptionsCont::isSet(), OptionsCont::isUsableFileList(), OptionsIO::loadConfiguration(), GUINet::loadEdgeData(), myAmLibsumo, myErrorRetriever, myEventQue, myEventThrow, myFile, myMessageRetriever, myParent, myTitle, myWarningRetriever, TraCIServer::openSocket(), TraCIServerAPI_GUI::processGet(), TraCIServerAPI_GUI::processSet(), MFXSynchQue< T, Container >::push_back(), libsumo::Helper::registerStateListener(), MsgHandler::removeRetriever(), OptionsCont::resetWritable(), OptionsCont::setByRootElement(), OptionsCont::setDefault(), NLTriggerBuilder::setHandler(), MSFrame::setMSGlobals(), XMLSubSys::setValidation(), FXEX::MFXThreadEvent::signal(), STEPS2TIME, string2time(), submitEndAndCleanup(), TL, GUIVisualizationSettings::UseMesoSim, WRITE_ERROR, and WRITE_ERRORF.
|
inherited |
Definition at line 89 of file MFXSingleEventThread.cpp.
References MFXSingleEventThread::event, PIPE_WRITE, FXEX::SEL_THREAD, and UNUSED_PARAMETER.
|
inherited |
Definition at line 101 of file MFXSingleEventThread.cpp.
References MFXSingleEventThread::event, PIPE_WRITE, and UNUSED_PARAMETER.
|
staticinherited |
Definition at line 142 of file MFXSingleEventThread.cpp.
Referenced by GUIRunThread::deleteSim(), GUIApplicationWindow::loadOnStartup(), GUISUMOAbstractView::makeSnapshot(), and GUIRunThread::tryStep().
|
protected |
Closes the loading process.
This method is called both on success and failure. All message callbacks to this instance are removed and the parent application is informed about the loading
Definition at line 239 of file GUILoadThread.cpp.
References MsgHandler::getErrorInstance(), MsgHandler::getMessageInstance(), MsgHandler::getWarningInstance(), myErrorRetriever, myEventQue, myEventThrow, myMessageRetriever, myTitle, myWarningRetriever, MFXSynchQue< T, Container >::push_back(), MsgHandler::removeRetriever(), and FXEX::MFXThreadEvent::signal().
Referenced by run().
|
privateinherited |
event
Definition at line 72 of file MFXSingleEventThread.h.
Referenced by MFXSingleEventThread::onThreadSignal(), MFXSingleEventThread::signal(), MFXSingleEventThread::signal(), and MFXSingleEventThread::~MFXSingleEventThread().
|
protected |
whether we are running in libsumo
Definition at line 98 of file GUILoadThread.h.
Referenced by run().
|
protectedinherited |
pointer to APP
Definition at line 65 of file MFXSingleEventThread.h.
Referenced by GUIRunThread::run(), and MFXSingleEventThread::~MFXSingleEventThread().
|
protectedinherited |
thread client
Definition at line 68 of file MFXSingleEventThread.h.
Referenced by MFXSingleEventThread::onThreadEvent().
|
protected |
The instances of message retriever encapsulations Needed to be deleted from the handler later on.
Definition at line 91 of file GUILoadThread.h.
Referenced by GUILoadThread(), run(), submitEndAndCleanup(), and ~GUILoadThread().
|
protected |
Definition at line 93 of file GUILoadThread.h.
Referenced by retrieveMessage(), run(), and submitEndAndCleanup().
|
protected |
Definition at line 95 of file GUILoadThread.h.
Referenced by retrieveMessage(), run(), and submitEndAndCleanup().
|
protected |
the path to load the simulation from
Definition at line 84 of file GUILoadThread.h.
Referenced by getFileName(), loadConfigOrNet(), and run().
|
protected |
Definition at line 91 of file GUILoadThread.h.
Referenced by GUILoadThread(), run(), submitEndAndCleanup(), and ~GUILoadThread().
|
protected |
the parent window to inform about the loading
Definition at line 81 of file GUILoadThread.h.
Referenced by run().
|
protected |
the title string for the application
Definition at line 87 of file GUILoadThread.h.
Referenced by run(), and submitEndAndCleanup().
|
protected |
Definition at line 91 of file GUILoadThread.h.
Referenced by GUILoadThread(), run(), submitEndAndCleanup(), and ~GUILoadThread().