Eclipse SUMO - Simulation of Urban MObility
|
#include <GNELoadThread.h>
Public Member Functions | |
GNELoadThread (GNEApplicationWindow *applicationWindow, MFXSynchQue< GUIEvent * > &eq, FXEX::MFXThreadEvent &ev) | |
constructor | |
void | loadNetworkOrConfig () |
begins the loading of an existent network or config | |
void | newNetwork () |
begins the creation of an empty network | |
void | retrieveMessage (const MsgHandler::MsgType type, const std::string &msg) |
Retrieves messages from the loading module. | |
FXint | run () |
starts the thread. The thread ends after the net has been loaded | |
virtual | ~GNELoadThread () |
destructor | |
Static Public Member Functions | |
static void | fillOptions (OptionsCont &neteditOptions) |
clears and initializes the OptionsCont | |
static void | setDefaultOptions (OptionsCont &neteditOptions) |
sets required options for proper functioning | |
Protected Types | |
enum | { ID_THREAD_EVENT } |
FOX declaration. More... | |
Protected Member Functions | |
long | onThreadEvent (FXObject *, FXSelector, void *) |
long | onThreadSignal (FXObject *, FXSelector, void *) |
void | signal () |
void | signal (FXuint seltype) |
Static Protected Member Functions | |
static void | sleep (long ms) |
Protected Attributes | |
FXApp * | myApp = nullptr |
pointer to APP | |
MFXInterThreadEventClient * | myClient = nullptr |
thread client | |
Private Member Functions | |
bool | loadConsoleOptions () |
load options through console | |
void | submitEndAndCleanup (GNENet *net, const std::string &loadedFile, const std::string &guiSettingsFile="", const bool viewportFromRegistry=false) |
Closes the loading process. | |
Private Attributes | |
FXEX::MFXThreadEventHandle | event |
event | |
GNEApplicationWindow * | myApplicationWindow |
netedit application windows | |
OutputDevice * | myDebugRetriever |
OutputDevice * | myErrorRetriever |
The instances of message retriever encapsulations Needed to be deleted from the handler later on. | |
MFXSynchQue< GUIEvent * > & | myEventQueue |
event Queue | |
FXEX::MFXThreadEvent & | myEventThrow |
event throw | |
OutputDevice * | myGLDebugRetriever |
OutputDevice * | myMessageRetriever |
OutputDevice * | myWarningRetriever |
Definition at line 43 of file GNELoadThread.h.
|
inherited |
GNELoadThread::GNELoadThread | ( | GNEApplicationWindow * | applicationWindow, |
MFXSynchQue< GUIEvent * > & | eq, | ||
FXEX::MFXThreadEvent & | ev | ||
) |
constructor
Definition at line 42 of file GNELoadThread.cpp.
References MsgHandler::addRetriever(), MsgHandler::getErrorInstance(), MsgHandler::MT_DEBUG, MsgHandler::MT_ERROR, MsgHandler::MT_GLDEBUG, MsgHandler::MT_MESSAGE, MsgHandler::MT_WARNING, myDebugRetriever, myErrorRetriever, myGLDebugRetriever, myMessageRetriever, myWarningRetriever, and retrieveMessage().
|
virtual |
destructor
Definition at line 56 of file GNELoadThread.cpp.
References myDebugRetriever, myErrorRetriever, myGLDebugRetriever, myMessageRetriever, and myWarningRetriever.
|
static |
clears and initializes the OptionsCont
Definition at line 255 of file GNELoadThread.cpp.
References OptionsCont::addCallExample(), SystemFrame::addConfigurationOptions(), OptionsCont::addDescription(), OptionsCont::addOptionSubTopic(), GeoConvHelper::addProjectionOptions(), OptionsCont::addSynonyme(), OptionsCont::addXMLDefault(), OptionsCont::clear(), OptionsCont::doRegister(), NIFrame::fillOptions(), NBFrame::fillOptions(), NWFrame::fillOptions(), RandHelper::insertRandOptions(), and TL.
Referenced by GNEApplicationWindow::createNewNetwork(), GNEApplicationWindow::GNEApplicationWindow(), GNEApplicationWindow::loadConfiguration(), GNEApplicationWindow::loadNetwork(), GNEApplicationWindow::loadOSM(), main(), GNEApplicationWindow::onCmdOpenNeteditConfig(), GNEApplicationWindow::onCmdOpenSumoConfig(), GNEApplicationWindow::onCmdReloadNeteditConfig(), GNEApplicationWindow::onCmdReloadNetwork(), GNEApplicationWindow::onCmdReloadSumoConfig(), and GNEApplicationWindow::onCmdSmartReload().
|
private |
load options through console
Definition at line 526 of file GNELoadThread.cpp.
References GNEApplicationWindow::consoleOptionsLoaded(), fillOptions(), OptionsCont::getOptions(), OptionsIO::getOptions(), myApplicationWindow, OptionsCont::resetWritable(), setDefaultOptions(), TL, and WRITE_ERROR.
Referenced by run().
void GNELoadThread::loadNetworkOrConfig | ( | ) |
begins the loading of an existent network or config
Definition at line 569 of file GNELoadThread.cpp.
Referenced by GNEApplicationWindow::loadConfiguration(), GNEApplicationWindow::loadNetwork(), GNEApplicationWindow::loadOptionOnStartup(), GNEApplicationWindow::loadOSM(), GNEApplicationWindow::onCmdOpenNeteditConfig(), GNEApplicationWindow::onCmdOpenSumoConfig(), GNEApplicationWindow::onCmdReloadNeteditConfig(), GNEApplicationWindow::onCmdReloadNetwork(), GNEApplicationWindow::onCmdReloadSumoConfig(), and GNEApplicationWindow::onCmdSmartReload().
void GNELoadThread::newNetwork | ( | ) |
begins the creation of an empty network
Definition at line 555 of file GNELoadThread.cpp.
References fillOptions(), OptionsCont::getOptions(), and setDefaultOptions().
Referenced by GNEApplicationWindow::createNewNetwork().
|
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 GNELoadThread::retrieveMessage | ( | const MsgHandler::MsgType | type, |
const std::string & | msg | ||
) |
Retrieves messages from the loading module.
Definition at line 576 of file GNELoadThread.cpp.
References myEventQueue, myEventThrow, MFXSynchQue< T, Container >::push_back(), and FXEX::MFXThreadEvent::signal().
Referenced by GNELoadThread().
|
virtual |
starts the thread. The thread ends after the net has been loaded
Reimplemented from MFXSingleEventThread.
Definition at line 66 of file GNELoadThread.cpp.
References NBEdgeCont::addPrefix(), NBNodeCont::addPrefix(), GNENetHelper::AttributeCarriers::addPrefixToEdges(), GNENetHelper::AttributeCarriers::addPrefixToJunctions(), MsgHandler::addRetriever(), NBNetBuilder::applyOptions(), NBFrame::checkOptions(), NIFrame::checkOptions(), NWFrame::checkOptions(), SystemFrame::checkOptions(), MsgHandler::clear(), NBNetBuilder::compute(), GNENet::computeAndUpdate(), GeoConvHelper::computeFinal(), MsgHandler::enableDebugGLMessages(), MsgHandler::enableDebugMessages(), GNENet::getAttributeCarriers(), MsgHandler::getDebugInstance(), NBNetBuilder::getEdgeCont(), MsgHandler::getErrorInstance(), MsgHandler::getGLDebugInstance(), MsgHandler::getMessageInstance(), GNENet::getNetBuilder(), NBNetBuilder::getNodeCont(), OptionsCont::getOptions(), GNEApplicationWindow::getSumoOptions(), MsgHandler::getWarningInstance(), GeoConvHelper::init(), MsgHandler::initOutputOptions(), RandHelper::initRandGlobal(), NILoader::load(), loadConsoleOptions(), GNEApplicationWindowHelper::GNENeteditConfigHandler::loadNeteditConfig(), GNEApplicationWindowHelper::GNESumoConfigHandler::loadSumoConfig(), myApplicationWindow, myDebugRetriever, myErrorRetriever, myGLDebugRetriever, myMessageRetriever, myWarningRetriever, XMLSubSys::setValidation(), submitEndAndCleanup(), TL, WRITE_ERROR, WRITE_ERRORF, and WRITE_MESSAGE.
|
static |
sets required options for proper functioning
Definition at line 518 of file GNELoadThread.cpp.
References OptionsCont::resetWritable(), and OptionsCont::set().
Referenced by GNEApplicationWindow::createNewNetwork(), GNEApplicationWindow::GNEApplicationWindow(), GNEApplicationWindow::loadConfiguration(), loadConsoleOptions(), GNEApplicationWindow::loadNetwork(), GNEApplicationWindow::loadOSM(), main(), newNetwork(), GNEApplicationWindow::onCmdOpenNeteditConfig(), GNEApplicationWindow::onCmdOpenSumoConfig(), GNEApplicationWindow::onCmdReloadNeteditConfig(), GNEApplicationWindow::onCmdReloadNetwork(), GNEApplicationWindow::onCmdReloadSumoConfig(), and GNEApplicationWindow::onCmdSmartReload().
|
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().
|
private |
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 241 of file GNELoadThread.cpp.
References MsgHandler::getDebugInstance(), MsgHandler::getErrorInstance(), MsgHandler::getGLDebugInstance(), MsgHandler::getMessageInstance(), MsgHandler::getWarningInstance(), myDebugRetriever, myErrorRetriever, myEventQueue, myEventThrow, myGLDebugRetriever, myMessageRetriever, 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().
|
protectedinherited |
pointer to APP
Definition at line 65 of file MFXSingleEventThread.h.
Referenced by GUIRunThread::run(), and MFXSingleEventThread::~MFXSingleEventThread().
|
private |
netedit application windows
Definition at line 83 of file GNELoadThread.h.
Referenced by loadConsoleOptions(), and run().
|
protectedinherited |
thread client
Definition at line 68 of file MFXSingleEventThread.h.
Referenced by MFXSingleEventThread::onThreadEvent().
|
private |
Definition at line 86 of file GNELoadThread.h.
Referenced by GNELoadThread(), run(), submitEndAndCleanup(), and ~GNELoadThread().
|
private |
The instances of message retriever encapsulations Needed to be deleted from the handler later on.
Definition at line 86 of file GNELoadThread.h.
Referenced by GNELoadThread(), run(), submitEndAndCleanup(), and ~GNELoadThread().
|
private |
event Queue
Definition at line 89 of file GNELoadThread.h.
Referenced by retrieveMessage(), and submitEndAndCleanup().
|
private |
event throw
Definition at line 92 of file GNELoadThread.h.
Referenced by retrieveMessage(), and submitEndAndCleanup().
|
private |
Definition at line 86 of file GNELoadThread.h.
Referenced by GNELoadThread(), run(), submitEndAndCleanup(), and ~GNELoadThread().
|
private |
Definition at line 86 of file GNELoadThread.h.
Referenced by GNELoadThread(), run(), submitEndAndCleanup(), and ~GNELoadThread().
|
private |
Definition at line 86 of file GNELoadThread.h.
Referenced by GNELoadThread(), run(), submitEndAndCleanup(), and ~GNELoadThread().