highlighter application  1.1
HCE project utils : highlighter
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
ComponentBase.hpp
Go to the documentation of this file.
1 #ifndef COMPONENT_BASE_HPP
2 #define COMPONENT_BASE_HPP
3 
4 #include <atomic>
5 #include <Poco/SharedPtr.h>
6 
7 #include "DataBase.hpp"
8 
9 namespace HCE
10 {
11  namespace component
12  {
13  class ComponentBase : public DataBase
14  {
15  protected:
16  std::atomic_bool _isBusy;
17  public:
18  ComponentBase(ComponentType inType = CT_DEFAULT):DataBase(inType), _isBusy(false) {}
19  const std::atomic_bool &getIsBusy() {return _isBusy;}
20  void setIsBusy(bool isBusy) {_isBusy = isBusy;}
21  virtual Poco::SharedPtr<DataBase> process(Poco::SharedPtr<DataBase> inData) = 0;
22  virtual ~ComponentBase() {}
23  };
24  }
25 }
26 
27 #endif