highlighter application  1.1
HCE project utils : highlighter
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Application.hpp
Go to the documentation of this file.
1 
13 #ifndef APPLICATION_HPP
14 #define APPLICATION_HPP
15 
16 #include <msgpack.hpp>
17 #include <string>
18 
19 #include "HCEConstants.hpp"
20 #include "CrossThreadBuf.hpp"
21 #include "ComponentBase.hpp"
23 #include "ComponentManager.hpp"
24 #include "ComponentManagerPool.hpp"
26 #include "ComponentsFactory.hpp"
27 #include "ContentsStorageBase.hpp"
28 #include "EncodeDecodeBase64.hpp"
29 #include "InDataStruct.hpp"
30 #include "OutDataStruct.hpp"
31 #include "ServerApplication.hpp"
32 
33 #define HIGHLIGHT_TIMEOUT_MLS_NAME "APP.highlightComponentTimeoutMLS"
34 #define REFINES_COUNT_NAME "APP.refinesCount"
35 
37 {
38  protected:
39  bool exitFlag;
41  Poco::SharedPtr<HCE::component::ComponentManagerPoolIf> componentManagerPool;
42  Poco::SharedPtr<CrossThreadBuf> crossThreadBufPtr;
43  Poco::SharedPtr<ContentsStorageBase> contentsStoragePtr;
44  std::string outDataString;
45  protected:
46  void factoriesRegister();
47  void componentsInitialize();
48  void addWCache(unsigned long long &resCrc, std::string &wCacheBase64);
49  void extractWCache(msgpack::sbuffer &msgPackBuf, Poco::SharedPtr<OutDataStruct> outDataStructPtr);
50  void highlightComponentExecutor(Poco::SharedPtr<InDataStruct> inDataStructPtr, Poco::SharedPtr<OutDataStruct> outDataStructPtr);
51  virtual int main(const std::vector<std::string>& args);
52  void readData(std::string &incomeString);
54  virtual void handleHelp(const std::string& name,const std::string& value);
55  virtual void handleVersion(const std::string& name,const std::string& value);
56  public:
57  Application();
58  virtual ~Application() throw();
59 };
60 
61 #endif