Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNERunNetgenerate Class Reference

thread for running netgenerate More...

#include <GNERunNetgenerate.h>

Inheritance diagram for GNERunNetgenerate:
[legend]
Collaboration diagram for GNERunNetgenerate:
[legend]

Public Member Functions

void abort ()
 abort netgenerate running
 
bool errorOccurred () const
 check if during execution an error was Occurred
 
 GNERunNetgenerate (GNERunNetgenerateDialog *runDialog, MFXSynchQue< GUIEvent * > &eq, FXEX::MFXThreadEvent &ev)
 Constructor.
 
bool isRunning () const
 check if netgenerate is running
 
void run (const OptionsCont *netgenerateOptions)
 run netgenerate
 
 ~GNERunNetgenerate ()
 destructor
 

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
 
MFXInterThreadEventClientmyClient = nullptr
 thread client
 

Private Member Functions

 GNERunNetgenerate (const GNERunNetgenerate &)=delete
 Invalidated copy constructor.
 
GNERunNetgenerateoperator= (const GNERunNetgenerate &)=delete
 Invalidated assignment operator.
 
FXint run ()
 starts the thread. The thread ends after the netgenerate is finished
 

Private Attributes

FXEX::MFXThreadEventHandle event
 event
 
bool myErrorOccurred = false
 flag for check if during execution an error was Occurred
 
MFXSynchQue< GUIEvent * > & myEventQueue
 event Queue
 
FXEX::MFXThreadEventmyEventThrow
 event throw
 
std::string myNetgenerateCommand
 netgenerate command
 
FILE * myPipe = nullptr
 pipe file
 
bool myRunning = false
 flag for check if netgenerate is running
 

Detailed Description

thread for running netgenerate

Definition at line 40 of file GNERunNetgenerate.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited

FOX declaration.

Enumerator
ID_THREAD_EVENT 

Definition at line 37 of file MFXSingleEventThread.h.

Constructor & Destructor Documentation

◆ GNERunNetgenerate() [1/2]

GNERunNetgenerate::GNERunNetgenerate ( GNERunNetgenerateDialog runDialog,
MFXSynchQue< GUIEvent * > &  eq,
FXEX::MFXThreadEvent ev 
)

Constructor.

Definition at line 32 of file GNERunNetgenerate.cpp.

◆ ~GNERunNetgenerate()

GNERunNetgenerate::~GNERunNetgenerate ( )

destructor

Definition at line 39 of file GNERunNetgenerate.cpp.

◆ GNERunNetgenerate() [2/2]

GNERunNetgenerate::GNERunNetgenerate ( const GNERunNetgenerate )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ abort()

void GNERunNetgenerate::abort ( )

abort netgenerate running

Definition at line 92 of file GNERunNetgenerate.cpp.

References ERROR_OCCURRED, myErrorOccurred, myEventQueue, myEventThrow, myRunning, MFXSynchQue< T, Container >::push_back(), FXEX::MFXThreadEvent::signal(), and TL.

Referenced by GNERunNetgenerateDialog::onCmdAbort(), and GNERunNetgenerateDialog::onCmdCancel().

Here is the caller graph for this function:

◆ errorOccurred()

bool GNERunNetgenerate::errorOccurred ( ) const

check if during execution an error was Occurred

Definition at line 113 of file GNERunNetgenerate.cpp.

References myErrorOccurred.

◆ isRunning()

bool GNERunNetgenerate::isRunning ( ) const

check if netgenerate is running

Definition at line 107 of file GNERunNetgenerate.cpp.

References myRunning.

Referenced by GNERunNetgenerateDialog::updateDialog().

Here is the caller graph for this function:

◆ onThreadEvent()

long MFXSingleEventThread::onThreadEvent ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

Definition at line 128 of file MFXSingleEventThread.cpp.

References MFXInterThreadEventClient::eventOccurred(), and MFXSingleEventThread::myClient.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onThreadSignal()

long MFXSingleEventThread::onThreadSignal ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

Definition at line 113 of file MFXSingleEventThread.cpp.

References MFXSingleEventThread::event, PIPE_READ, FXEX::SEL_THREAD, and UNUSED_PARAMETER.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ operator=()

GNERunNetgenerate & GNERunNetgenerate::operator= ( const GNERunNetgenerate )
privatedelete

Invalidated assignment operator.

◆ run() [1/2]

FXint GNERunNetgenerate::run ( )
privatevirtual

◆ run() [2/2]

void GNERunNetgenerate::run ( const OptionsCont netgenerateOptions)

run netgenerate

Definition at line 43 of file GNERunNetgenerate.cpp.

References OptionsCont::getSubTopics(), OptionsCont::getSubTopicsEntries(), OptionsCont::getValueString(), OptionsCont::isDefault(), myErrorOccurred, myNetgenerateCommand, and myRunning.

Referenced by GNERunNetgenerateDialog::onCmdRerun(), and GNERunNetgenerateDialog::run().

Here is the caller graph for this function:

◆ signal() [1/2]

void MFXSingleEventThread::signal ( )
inherited

◆ signal() [2/2]

void MFXSingleEventThread::signal ( FXuint  seltype)
inherited

◆ sleep()

void MFXSingleEventThread::sleep ( long  ms)
staticinherited

Definition at line 142 of file MFXSingleEventThread.cpp.

Referenced by GUIRunThread::deleteSim(), GUIApplicationWindow::loadOnStartup(), GUISUMOAbstractView::makeSnapshot(), and GUIRunThread::tryStep().

Here is the caller graph for this function:

Field Documentation

◆ event

◆ myApp

FXApp* MFXSingleEventThread::myApp = nullptr
protectedinherited

pointer to APP

Definition at line 65 of file MFXSingleEventThread.h.

Referenced by GUIRunThread::run(), and MFXSingleEventThread::~MFXSingleEventThread().

◆ myClient

MFXInterThreadEventClient* MFXSingleEventThread::myClient = nullptr
protectedinherited

thread client

Definition at line 68 of file MFXSingleEventThread.h.

Referenced by MFXSingleEventThread::onThreadEvent().

◆ myErrorOccurred

bool GNERunNetgenerate::myErrorOccurred = false
private

flag for check if during execution an error was Occurred

Definition at line 69 of file GNERunNetgenerate.h.

Referenced by abort(), errorOccurred(), run(), and run().

◆ myEventQueue

MFXSynchQue<GUIEvent*>& GNERunNetgenerate::myEventQueue
private

event Queue

Definition at line 75 of file GNERunNetgenerate.h.

Referenced by abort(), and run().

◆ myEventThrow

FXEX::MFXThreadEvent& GNERunNetgenerate::myEventThrow
private

event throw

Definition at line 78 of file GNERunNetgenerate.h.

Referenced by abort(), and run().

◆ myNetgenerateCommand

std::string GNERunNetgenerate::myNetgenerateCommand
private

netgenerate command

Definition at line 63 of file GNERunNetgenerate.h.

Referenced by run(), and run().

◆ myPipe

FILE* GNERunNetgenerate::myPipe = nullptr
private

pipe file

Definition at line 72 of file GNERunNetgenerate.h.

Referenced by run().

◆ myRunning

bool GNERunNetgenerate::myRunning = false
private

flag for check if netgenerate is running

Definition at line 66 of file GNERunNetgenerate.h.

Referenced by abort(), isRunning(), run(), and run().


The documentation for this class was generated from the following files: