GlobalObjects
Lade ...
Suche ...
Keine Treffer
EuAPThread.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_EUAPTHREAD_H
2#define INC_EUAPTHREAD_H
3//-----------------------------------------------------------------------------
36//-----------------------------------------------------------------------------
37#include "EuPThreadTypes.h"
38#include <pthread.h>
39
40#ifdef _DEBUG
41 #include <string>
42#endif
43//-----------------------------------------------------------------------------
44#ifdef _MSC_VER
45 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
46 #pragma warning( disable : 4251 )
47#endif
48//-----------------------------------------------------------------------------
72class __euthread_export_dll EuAPThread
73{
74 public:
75 //============== local enums
76 //-------------------------------------------------------------------------
130 //-------------------------------------------------------------------------
131
132 protected:
133 //============== Attribute
134 //-------------------------------------------------------------------------
145 //-------------------------------------------------------------------------
155 pthread_t m_Thread;
156 //-------------------------------------------------------------------------
157 #ifdef _DEBUG
167 std::string m_strDebugInfo;
168 #endif
169 //-------------------------------------------------------------------------
170
171 public:
172 //============== De- & Konstruktoren
173 //-------------------------------------------------------------------------
184 //-------------------------------------------------------------------------
198 virtual ~EuAPThread();
199 //-------------------------------------------------------------------------
200
201 private:
202 //============== Copy-Konstruktor
203 //-------------------------------------------------------------------------
214 //-------------------------------------------------------------------------
215
216 protected:
217 //========== Static Thread-Methode ========
218 //-------------------------------------------------------------------------
248 static void _cleanUp( void * pParam );
249 //-------------------------------------------------------------------------
250
251 //========== Methoden ========
252 //-------------------------------------------------------------------------
269 virtual void work() = 0;
270 //-------------------------------------------------------------------------
293 virtual void cleanUp();
294 //-------------------------------------------------------------------------
295
296 public:
297 //========== Methoden ========
298 //-------------------------------------------------------------------------
316 virtual int start() =0;
317 //-------------------------------------------------------------------------
340 virtual int cancel();
341 //-------------------------------------------------------------------------
352 //-------------------------------------------------------------------------
365 //-------------------------------------------------------------------------
377 virtual int join();
378 //-------------------------------------------------------------------------
379
380 private:
381 //============== Operatoren
382 //-------------------------------------------------------------------------
392 EuAPThread & operator= ( const EuAPThread & );
393 //-------------------------------------------------------------------------
394};
395
396//-----------------------------------------------------------------------------
397#ifdef _MSC_VER
398 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
399 #pragma warning( default : 4251 )
400#endif
401//-----------------------------------------------------------------------------
402#endif
Abstrakte Oberklasse für Threads.
Definition EuAPThread.h:73
virtual ~EuAPThread()
void testCancel()
virtual int start()=0
EuAPThread::EuPTHREAD_STATUS status() const
pthread_t m_Thread
Definition EuAPThread.h:155
std::string m_strDebugInfo
Definition EuAPThread.h:167
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:144
EuAPThread(const EuAPThread &)
EuPTHREAD_STATUS
Definition EuAPThread.h:88
@ EuPTHREAD_WORKING
Definition EuAPThread.h:108
@ EuPTHREAD_PAUSING
Definition EuAPThread.h:118
@ EuPTHREAD_AT_THE_START
Definition EuAPThread.h:98