hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DRCETasksQueue.hpp
Go to the documentation of this file.
1 
14 #ifndef DRCE_TASKS_QUEUE_HPP
15 #define DRCE_TASKS_QUEUE_HPP
16 
17 #include <iostream>
18 
19 #include "DRCECommonList.hpp"
20 #include "JsonSerializable.hpp"
21 #include "DRCETaskRequest.hpp"
22 #include "DRCESessionOptions.hpp"
23 
24 namespace HCE
25 {
26 namespace drce
27 {
28 //-----------------------------------------------------------------------------
30 {
31 public:
32  TaskStatusData(void);
33  TaskStatusData(unsigned int id_, size_t sdate_, DRCETaskRequest::TaskState state_, SessionOptions::ThreadMode tmode);
34  TaskStatusData(const TaskStatusData& rhs);
36 
39 
40  void clear(void);
41 
42  unsigned int id;
43  size_t sdate;
46 
47  friend std::ostream& operator<<(std::ostream& os, const TaskStatusData& rhs);
48  friend std::istream& operator>>(std::istream& is, TaskStatusData& rhs);
49 };
50 //-----------------------------------------------------------------------------
51 //-----------------------------------------------------------------------------
52 class DRCETasksQueue : public DRCECommonList <TaskStatusData>, public IJsonSerializable
53 {
54 public:
55  DRCETasksQueue(void);
56  virtual ~DRCETasksQueue(void) {}
57 
58  bool serialize(std::string& json);
59  bool unserialize(const std::string& json);
60 
61 };
62 //-----------------------------------------------------------------------------
63 //-----------------------------------------------------------------------------
64 } // end namespace drce
65 } // end namespace HCE
66 
67 #endif // DRCE_TASKS_QUEUE_HPP