SUMO - Simulation of Urban MObility
|
#include <GUILoadThread.h>
Public Types | |
enum | { ID_THREAD_EVENT } |
Public Member Functions | |
const std::string & | getFileName () const |
GUILoadThread (FXApp *app, MFXInterThreadEventClient *mw, MFXEventQue &eq, FXEX::FXThreadEvent &ev) | |
constructor | |
void | load (const std::string &file, bool isNet) |
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 | |
virtual bool | initOptions () |
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. |
Protected Attributes | |
OutputDevice * | myErrorRetriever |
The instances of message retriever encapsulations Needed to be deleted from the handler later on. | |
MFXEventQue & | myEventQue |
FXEX::FXThreadEvent & | myEventThrow |
std::string | myFile |
the path to load the simulation from | |
bool | myLoadNet |
Information whether only the network shall be loaded. | |
OutputDevice * | myMessageRetriever |
MFXInterThreadEventClient * | myParent |
the parent window to inform about the loading | |
OutputDevice * | myWarningRetriever |
Definition at line 56 of file GUILoadThread.h.
|
inherited |
Definition at line 53 of file FXSingleEventThread.h.
GUILoadThread::GUILoadThread | ( | FXApp * | app, |
MFXInterThreadEventClient * | mw, | ||
MFXEventQue & | eq, | ||
FXEX::FXThreadEvent & | ev | ||
) |
constructor
Definition at line 81 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 92 of file GUILoadThread.cpp.
References myErrorRetriever, myMessageRetriever, and myWarningRetriever.
const std::string & GUILoadThread::getFileName | ( | ) | const |
Definition at line 273 of file GUILoadThread.cpp.
References myFile.
|
protectedvirtual |
Definition at line 230 of file GUILoadThread.cpp.
References OptionsCont::clear(), fillOptions(), MsgHandler::getErrorInstance(), OptionsIO::getOptions(), OptionsCont::getOptions(), MsgHandler::inform(), myFile, myLoadNet, OptionsCont::set(), and WRITE_ERROR.
Referenced by run().
void GUILoadThread::load | ( | const std::string & | file, |
bool | isNet | ||
) |
begins the loading of the given file
Definition at line 257 of file GUILoadThread.cpp.
References myFile, and myLoadNet.
Referenced by GUIApplicationWindow::load().
Definition at line 133 of file FXSingleEventThread.cpp.
Definition at line 119 of file FXSingleEventThread.cpp.
References PIPE_READ, and FXEX::SEL_THREAD.
void GUILoadThread::retrieveMessage | ( | const MsgHandler::MsgType | type, |
const std::string & | msg | ||
) |
Retrieves messages from the loading module.
Definition at line 265 of file GUILoadThread.cpp.
References MFXEventQue::add(), myEventQue, myEventThrow, and FXEX::FXThreadEvent::signal().
Referenced by GUILoadThread().
|
virtual |
starts the thread the thread ends after the net has been loaded
Reimplemented from FXSingleEventThread.
Definition at line 100 of file GUILoadThread.cpp.
References MsgHandler::addRetriever(), GUITexturesHelper::allowTextures(), NLBuilder::build(), MSFrame::checkOptions(), MsgHandler::clear(), MSNet::clearAll(), CMD_GET_GUI_VARIABLE, CMD_SET_GUI_VARIABLE, OptionsCont::getBool(), OutputDevice::getDevice(), MsgHandler::getErrorInstance(), MsgHandler::getMessageInstance(), OptionsCont::getOptions(), OptionsCont::getString(), OptionsCont::getStringVector(), MsgHandler::getWarningInstance(), GUIGlobals::gQuitOnEnd, GUIGlobals::gRunAfterLoad, MSGlobals::gUseMesoSim, MsgHandler::inform(), GUINet::initGUIStructures(), initOptions(), MsgHandler::initOutputOptions(), RandHelper::initRandGlobal(), myErrorRetriever, myMessageRetriever, MSVehicleControl::myVehicleParamsRNG, myWarningRetriever, TraCIServer::openSocket(), TraCIServerAPI_GUI::processGet(), TraCIServerAPI_GUI::processSet(), MsgHandler::removeRetriever(), NLTriggerBuilder::setHandler(), MSFrame::setMSGlobals(), XMLSubSys::setValidation(), string2time(), submitEndAndCleanup(), and WRITE_ERROR.
|
inherited |
Definition at line 97 of file FXSingleEventThread.cpp.
References PIPE_WRITE, and FXEX::SEL_THREAD.
|
inherited |
Definition at line 108 of file FXSingleEventThread.cpp.
References PIPE_WRITE, and UNUSED_PARAMETER.
|
staticinherited |
Definition at line 147 of file FXSingleEventThread.cpp.
Referenced by GUISUMOAbstractView::makeSnapshot(), and GUIRunThread::run().
|
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 213 of file GUILoadThread.cpp.
References MFXEventQue::add(), MsgHandler::getErrorInstance(), MsgHandler::getMessageInstance(), MsgHandler::getWarningInstance(), myErrorRetriever, myEventQue, myEventThrow, myFile, myMessageRetriever, myWarningRetriever, MsgHandler::removeRetriever(), and FXEX::FXThreadEvent::signal().
Referenced by run().
|
protected |
The instances of message retriever encapsulations Needed to be deleted from the handler later on.
Definition at line 99 of file GUILoadThread.h.
Referenced by GUILoadThread(), run(), submitEndAndCleanup(), and ~GUILoadThread().
|
protected |
Definition at line 101 of file GUILoadThread.h.
Referenced by retrieveMessage(), and submitEndAndCleanup().
|
protected |
Definition at line 103 of file GUILoadThread.h.
Referenced by retrieveMessage(), and submitEndAndCleanup().
|
protected |
the path to load the simulation from
Definition at line 95 of file GUILoadThread.h.
Referenced by getFileName(), initOptions(), load(), and submitEndAndCleanup().
|
protected |
Information whether only the network shall be loaded.
Definition at line 106 of file GUILoadThread.h.
Referenced by initOptions(), and load().
|
protected |
Definition at line 99 of file GUILoadThread.h.
Referenced by GUILoadThread(), run(), submitEndAndCleanup(), and ~GUILoadThread().
|
protected |
the parent window to inform about the loading
Definition at line 92 of file GUILoadThread.h.
|
protected |
Definition at line 99 of file GUILoadThread.h.
Referenced by GUILoadThread(), run(), submitEndAndCleanup(), and ~GUILoadThread().