GlobalObjects
Loading...
Searching...
No Matches
EuAPThread.h
Go to the documentation of this file.
1#ifndef INC_EUAPTHREAD_H
2#define INC_EUAPTHREAD_H
3//-----------------------------------------------------------------------------
51//-----------------------------------------------------------------------------
52#include "EuPThreadTypes.h"
53#include <pthread.h>
54
55#ifdef _DEBUG
56 #include <string>
57#endif
58//-----------------------------------------------------------------------------
59#ifdef _MSC_VER
60 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
61 #pragma warning( disable : 4251 )
62#endif
63//-----------------------------------------------------------------------------
87class __euthread_export_dll EuAPThread
88{
89 public:
90 //============== local enums
91 //-------------------------------------------------------------------------
145 //-------------------------------------------------------------------------
146
147 protected:
148 //============== Attribute
149 //-------------------------------------------------------------------------
160 //-------------------------------------------------------------------------
170 pthread_t m_Thread;
171 //-------------------------------------------------------------------------
172 #ifdef _DEBUG
182 std::string m_strDebugInfo;
183 #endif
184 //-------------------------------------------------------------------------
185
186 public:
187 //============== De- & Konstruktoren
188 //-------------------------------------------------------------------------
199 //-------------------------------------------------------------------------
213 virtual ~EuAPThread();
214 //-------------------------------------------------------------------------
215
216 private:
217 //============== Copy-Konstruktor
218 //-------------------------------------------------------------------------
229 //-------------------------------------------------------------------------
230
231 protected:
232 //========== Static Thread-Methode ========
233 //-------------------------------------------------------------------------
263 static void _cleanUp( void * pParam );
264 //-------------------------------------------------------------------------
265
266 //========== Methoden ========
267 //-------------------------------------------------------------------------
284 virtual void work() = 0;
285 //-------------------------------------------------------------------------
308 virtual void cleanUp();
309 //-------------------------------------------------------------------------
310
311 public:
312 //========== Methoden ========
313 //-------------------------------------------------------------------------
331 virtual int start() =0;
332 //-------------------------------------------------------------------------
355 virtual int cancel();
356 //-------------------------------------------------------------------------
367 //-------------------------------------------------------------------------
380 //-------------------------------------------------------------------------
392 virtual int join();
393 //-------------------------------------------------------------------------
394
395 private:
396 //============== Operatoren
397 //-------------------------------------------------------------------------
407 EuAPThread & operator= ( const EuAPThread & );
408 //-------------------------------------------------------------------------
409};
410
411//-----------------------------------------------------------------------------
412#ifdef _MSC_VER
413 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
414 #pragma warning( default : 4251 )
415#endif
416//-----------------------------------------------------------------------------
417#endif
Abstract superclass for threads.
Definition EuAPThread.h:88
virtual ~EuAPThread()
void testCancel()
virtual int start()=0
EuAPThread::EuPTHREAD_STATUS status() const
pthread_t m_Thread
Definition EuAPThread.h:170
std::string m_strDebugInfo
Definition EuAPThread.h:182
virtual int cancel()
virtual void work()=0
static void _cleanUp(void *pParam)
virtual void cleanUp()
virtual int join()
EuPTHREAD_STATUS m_eThreadStatus
Definition EuAPThread.h:159
EuAPThread(const EuAPThread &)
EuPTHREAD_STATUS
Definition EuAPThread.h:103
@ EuPTHREAD_WORKING
Definition EuAPThread.h:123
@ EuPTHREAD_PAUSING
Definition EuAPThread.h:133
@ EuPTHREAD_AT_THE_START
Definition EuAPThread.h:113