ActiveObject.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 // This file is part of FZIs ic_workspace.
5 //
6 // This program is free software licensed under the LGPL
7 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
8 // You can find a copy of this license in LICENSE folder in the top
9 // directory of the source code.
10 //
11 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
12 //
13 // -- END LICENSE BLOCK ------------------------------------------------
14 
15 //----------------------------------------------------------------------
22 //----------------------------------------------------------------------
23 #ifndef ICL_CORE_THREAD_ACTIVE_OBJECT_H_INCLUDED
24 #define ICL_CORE_THREAD_ACTIVE_OBJECT_H_INCLUDED
25 
26 #include <icl_core/List.h>
27 
30 #include "icl_core_thread/Mutex.h"
31 #include "icl_core_thread/Sem.h"
32 #include "icl_core_thread/Thread.h"
33 
34 #ifdef _IC_BUILDER_DEPRECATED_STYLE_
35 # include "icl_core/Deprecate.h"
36 #endif
37 
38 namespace icl_core {
39 namespace thread {
40 
44 {
45 public:
49  ActiveObject(const icl_core::String& description,
50  icl_core::ThreadPriority priority = 0);
51 
55  virtual void run();
56 
61  virtual void onThreadStart() { }
62 
67  virtual void onThreadStop() { }
68 
71  void stop();
72 
74 #ifdef _IC_BUILDER_DEPRECATED_STYLE_
75 
77  { stop(); }
78 
79 #endif
80 
82 protected:
86  void queue(ActiveOperation *active_operation);
87 
91 };
92 
93 }
94 }
95 
96 #endif
#define ICL_CORE_VC_DEPRECATE_STYLE
Definition: Deprecate.h:53
Contains macros to deprecate classes, types, functions and variables.
Contains import/export definitions for the Win32 plattform.
#define ICL_CORE_THREAD_IMPORT_EXPORT
Contains icl_core::thread::Mutex.
std::string String
Definition: BaseTypes.h:43
icl_core::List< ActiveOperation * > m_operation_queue
Definition: ActiveObject.h:88
Contains icl_core::thread::Thread.
Contains icl_core::thread::Semaphore.
int32_t ThreadPriority
Definition: os_thread.h:50
#define ICL_CORE_GCC_DEPRECATE_STYLE
Definition: Deprecate.h:54


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:58