SUMO - Simulation of Urban MObility
GUILoadThread Class Reference

#include <GUILoadThread.h>

Inheritance diagram for GUILoadThread:
FXSingleEventThread FXObject FXThread

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, SUMOTime simStartTime, SUMOTime simEndTime)
 Closes the loading process.

Protected Attributes

OutputDevicemyErrorRetriever
 The instances of message retriever encapsulations Needed to be deleted from the handler later on.
MFXEventQuemyEventQue
FXEX::FXThreadEventmyEventThrow
std::string myFile
 the path to load the simulation from
bool myLoadNet
 Information whether only the network shall be loaded.
OutputDevicemyMessageRetriever
MFXInterThreadEventClientmyParent
 the parent window to inform about the loading
OutputDevicemyWarningRetriever

Detailed Description

Definition at line 55 of file GUILoadThread.h.


Member Enumeration Documentation

anonymous enum [inherited]
Enumerator:
ID_THREAD_EVENT 

Definition at line 31 of file FXSingleEventThread.h.


Constructor & Destructor Documentation

destructor

Definition at line 86 of file GUILoadThread.cpp.

References myErrorRetriever, myMessageRetriever, and myWarningRetriever.


Member Function Documentation

const std::string & GUILoadThread::getFileName ( ) const

Definition at line 246 of file GUILoadThread.cpp.

References myFile.

void GUILoadThread::load ( const std::string &  file,
bool  isNet 
)

begins the loading of the given file

Definition at line 230 of file GUILoadThread.cpp.

References myFile, and myLoadNet.

Referenced by GUIApplicationWindow::load().

long FXSingleEventThread::onThreadEvent ( FXObject ,
FXSelector  ,
void *   
) [inherited]

Definition at line 108 of file FXSingleEventThread.cpp.

long FXSingleEventThread::onThreadSignal ( FXObject ,
FXSelector  ,
void *   
) [inherited]

Definition at line 94 of file FXSingleEventThread.cpp.

References PIPE_READ.

void GUILoadThread::retrieveMessage ( const MsgHandler::MsgType  type,
const std::string &  msg 
)

Retrieves messages from the loading module.

Definition at line 238 of file GUILoadThread.cpp.

References MFXEventQue::add(), myEventQue, myEventThrow, and FXEX::FXThreadEvent::signal().

Referenced by GUILoadThread().

void FXSingleEventThread::signal ( ) [inherited]

Definition at line 72 of file FXSingleEventThread.cpp.

References PIPE_WRITE.

void FXSingleEventThread::signal ( FXuint  seltype) [inherited]

Definition at line 83 of file FXSingleEventThread.cpp.

References PIPE_WRITE, and UNUSED_PARAMETER.

void FXSingleEventThread::sleep ( long  ms) [static, inherited]
void GUILoadThread::submitEndAndCleanup ( GUINet net,
SUMOTime  simStartTime,
SUMOTime  simEndTime 
) [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 187 of file GUILoadThread.cpp.

References MFXEventQue::add(), MsgHandler::getErrorInstance(), MsgHandler::getMessageInstance(), OptionsCont::getOptions(), MsgHandler::getWarningInstance(), myErrorRetriever, myEventQue, myEventThrow, myFile, myMessageRetriever, myWarningRetriever, MsgHandler::removeRetriever(), and FXEX::FXThreadEvent::signal().

Referenced by run().


Field Documentation

The instances of message retriever encapsulations Needed to be deleted from the handler later on.

Definition at line 96 of file GUILoadThread.h.

Referenced by GUILoadThread(), run(), submitEndAndCleanup(), and ~GUILoadThread().

Definition at line 98 of file GUILoadThread.h.

Referenced by retrieveMessage(), and submitEndAndCleanup().

Definition at line 100 of file GUILoadThread.h.

Referenced by retrieveMessage(), and submitEndAndCleanup().

std::string GUILoadThread::myFile [protected]

the path to load the simulation from

Definition at line 92 of file GUILoadThread.h.

Referenced by getFileName(), initOptions(), load(), and submitEndAndCleanup().

Information whether only the network shall be loaded.

Definition at line 103 of file GUILoadThread.h.

Referenced by initOptions(), and load().

the parent window to inform about the loading

Definition at line 89 of file GUILoadThread.h.


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines