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

#include <MFXSingleEventThread.h>

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

Public Types

enum  { ID_THREAD_EVENT }
 FOX declaration. More...
 

Public Member Functions

 MFXSingleEventThread (FXApp *a, MFXInterThreadEventClient *client)
 constructor
 
long onThreadEvent (FXObject *, FXSelector, void *)
 
long onThreadSignal (FXObject *, FXSelector, void *)
 
virtual FXint run ()
 
void signal ()
 
void signal (FXuint seltype)
 
virtual ~MFXSingleEventThread ()
 

Static Public Member Functions

static void sleep (long ms)
 

Protected Member Functions

 MFXSingleEventThread ()
 FOX need this.
 

Protected Attributes

FXApp * myApp = nullptr
 pointer to APP
 
MFXInterThreadEventClientmyClient = nullptr
 thread client
 

Private Member Functions

 MFXSingleEventThread (const MFXSingleEventThread &)=delete
 invalidate copy constructor
 
MFXSingleEventThreadoperator= (const MFXSingleEventThread &)=delete
 invalidate assignment constructor
 

Private Attributes

FXEX::MFXThreadEventHandle event
 event
 

Detailed Description

Definition at line 32 of file MFXSingleEventThread.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

FOX declaration.

Enumerator
ID_THREAD_EVENT 

Definition at line 37 of file MFXSingleEventThread.h.

Constructor & Destructor Documentation

◆ MFXSingleEventThread() [1/3]

MFXSingleEventThread::MFXSingleEventThread ( FXApp *  a,
MFXInterThreadEventClient client 
)

constructor

Definition at line 58 of file MFXSingleEventThread.cpp.

References ID_THREAD_EVENT, PIPE_READ, and UNUSED_PARAMETER.

◆ ~MFXSingleEventThread()

MFXSingleEventThread::~MFXSingleEventThread ( )
virtual

Definition at line 75 of file MFXSingleEventThread.cpp.

References event, myApp, PIPE_READ, and PIPE_WRITE.

◆ MFXSingleEventThread() [2/3]

MFXSingleEventThread::MFXSingleEventThread ( )
inlineprotected

FOX need this.

Definition at line 62 of file MFXSingleEventThread.h.

◆ MFXSingleEventThread() [3/3]

MFXSingleEventThread::MFXSingleEventThread ( const MFXSingleEventThread )
privatedelete

invalidate copy constructor

Member Function Documentation

◆ onThreadEvent()

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

Definition at line 128 of file MFXSingleEventThread.cpp.

References MFXInterThreadEventClient::eventOccurred(), and myClient.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onThreadSignal()

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

Definition at line 113 of file MFXSingleEventThread.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ operator=()

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

invalidate assignment constructor

◆ run()

virtual FXint MFXSingleEventThread::run ( )
inlinevirtual

◆ signal() [1/2]

void MFXSingleEventThread::signal ( )

Definition at line 89 of file MFXSingleEventThread.cpp.

References event, PIPE_WRITE, FXEX::SEL_THREAD, and UNUSED_PARAMETER.

◆ signal() [2/2]

void MFXSingleEventThread::signal ( FXuint  seltype)

Definition at line 101 of file MFXSingleEventThread.cpp.

References event, PIPE_WRITE, and UNUSED_PARAMETER.

◆ sleep()

void MFXSingleEventThread::sleep ( long  ms)
static

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

FXEX::MFXThreadEventHandle MFXSingleEventThread::event
private

event

Definition at line 72 of file MFXSingleEventThread.h.

Referenced by onThreadSignal(), signal(), signal(), and ~MFXSingleEventThread().

◆ myApp

FXApp* MFXSingleEventThread::myApp = nullptr
protected

pointer to APP

Definition at line 65 of file MFXSingleEventThread.h.

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

◆ myClient

MFXInterThreadEventClient* MFXSingleEventThread::myClient = nullptr
protected

thread client

Definition at line 68 of file MFXSingleEventThread.h.

Referenced by onThreadEvent().


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