UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
thread_calc_block.hpp
1 /* thread_calc_block.hpp */
2 /* $Id$ */
3 #ifndef __thread_calc_block_hpp
4 #define __thread_calc_block_hpp
5 
6 #include <pthread.h>
7 
8 #ifdef GE_BUILD
9 #include <calc_block.hpp>
10 #else
11 #include <dcf/calc_block.hpp>
12 #endif
13 
14 namespace dcf
15 {
18  {
19  public:
20 
23 
25  virtual ~ThreadCalcBlock();
26 
28  virtual void start();
29 
31  virtual void stop();
32 
34  virtual void wait();
35 
37  int id() const {return m_allocated_unit_id;}
38 
39  protected:
40 
48  virtual void run();
49 
53  void setStopPoint();
54 
57 
60 
63 
64  bool m_ready;
66  private:
67 
68  pthread_t m_thread_t;
70  int m_allocated_unit_id;
72  dcf::error_t m_thread_status;
79 
81  void operator=(const dcf::ThreadCalcBlock&);
82 
84  static void* exec(void* me);
85  };
86 };
87 
88 #endif /* thread_calc_block.hpp */
virtual void wait()
error_t
Definition: types.hpp:11
Definition: manager.hpp:19
virtual void stop()
const dcf::Manager * manager() const
Definition: calc_block.hpp:43
bool m_ready
Definition: thread_calc_block.hpp:64
void setThreadStatus(dcf::error_t st)
virtual void start()
Definition: calc_block.hpp:17
dcf::error_t releaseUnit()
Definition: thread_calc_block.hpp:17
int id() const
Definition: thread_calc_block.hpp:37
virtual void run()
ThreadCalcBlock(const dcf::Manager &manager)
virtual ~ThreadCalcBlock()
const dcf::error_t & getThreadStatus()