hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DRCEFileBuilder.hpp
Go to the documentation of this file.
1 
14 #ifndef DRCE_FILE_BUILDER_HPP
15 #define DRCE_FILE_BUILDER_HPP
16 
17 #include "CustomMessage.hpp"
18 #include "DRCEResultData.hpp"
19 #include "DRCEInputJsonMessage.hpp"
20 
21 namespace HCE
22 {
23 namespace drce
24 {
25 //-----------------------------------------------------------------------------
27 {
28 public:
29  FileBuilder(CustomMessage& message_, const std::string& dir_);
30  virtual ~FileBuilder(void) {}
31 
32  void setDir(const std::string& dir_) {dir=dir_;}
33  std::string getDir(void) const {return dir;}
34 
35 protected:
37  std::string dir;
38 };
39 //-----------------------------------------------------------------------------
40 //-----------------------------------------------------------------------------
42 {
43 public:
44  DataFileBuilder(CustomMessage& message_, const std::string& dir_);
45  virtual ~DataFileBuilder(void) {}
46 
47  void build(const DRCEResultData& resultData) throw (Poco::Exception);
48 
49  static std::string makeJson(const DRCEResultData& resultData) throw (Poco::Exception);
50 private:
51  typedef FileBuilder inherited;
52 };
53 //-----------------------------------------------------------------------------
54 //-----------------------------------------------------------------------------
56 {
57 public:
58  StatusFileBuilder(CustomMessage& message_, const std::string& dir_);
59  virtual ~StatusFileBuilder(void) {}
60 
61  void build(const DRCEResultData& resultData) throw (Poco::Exception);
62  static std::string getStatusJson(const DRCEResultData& resultData) throw (Poco::Exception);
63 private:
64  static void cleanup(DRCEResultDataItem& resultDataItem);
65 private:
66  typedef DataFileBuilder inherited;
67 };
68 //-----------------------------------------------------------------------------
69 //-----------------------------------------------------------------------------
71 {
72 public:
73  RequestFileBuilder(CustomMessage& message_, const std::string& dir_);
74  virtual ~RequestFileBuilder(void) {}
75 
76  void build(DRCEInputJsonMessage& inputJsonMessage) throw (Poco::Exception);
77 private:
78  typedef FileBuilder inherited;
79 };
80 //-----------------------------------------------------------------------------
81 //-----------------------------------------------------------------------------
82 } // end namespace drce
83 } // end namespace HCE
84 
85 #endif // DRCE_FILE_BUILDER_HPP