Eclipse SUMO - Simulation of Urban MObility
MFXSingleEventThread.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3// Copyright (C) 2004-2022 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
20//
21/****************************************************************************/
22
23#ifndef MFXSingleEventThread_h
24#define MFXSingleEventThread_h
25#include <config.h>
26
27#include "fxheader.h"
28#include <FXThread.h>
29#include "fxexdefs.h"
30
32
33class MFXSingleEventThread : public FXObject, public FXThread {
35 FXDECLARE(MFXSingleEventThread)
36
37public:
38 enum {
40 };
41
44
45 virtual ~MFXSingleEventThread();
46
47 void signal();
48
49 void signal(FXuint seltype);
50
51 virtual FXint run() {
52 return 0;
53 }
54
55 static void sleep(long ms);
56
57 long onThreadSignal(FXObject*, FXSelector, void*);
58
59 long onThreadEvent(FXObject*, FXSelector, void*);
60
61protected:
64
66 FXApp* myApp = nullptr;
67
70
71private:
74
77
80};
81
82
83#endif
long onThreadEvent(FXObject *, FXSelector, void *)
long onThreadSignal(FXObject *, FXSelector, void *)
MFXSingleEventThread & operator=(const MFXSingleEventThread &)=delete
invalidate assignment constructor
FXEX::MFXThreadEventHandle event
event
MFXSingleEventThread(const MFXSingleEventThread &)=delete
invalidate copy constructor
MFXInterThreadEventClient * myClient
thread client
static void sleep(long ms)
MFXSingleEventThread()
FOX need this.
FXApp * myApp
pointer to APP
FXInputHandle * MFXThreadEventHandle
Definition: fxexdefs.h:284