Samchon Framework for CPP  1.0.0
ParallelSystem.hpp
1 #pragma once
2 #include <samchon/API.hpp>
3 
4 #include <samchon/protocol/ExternalSystem.hpp>
5 #include <mutex>
6 
7 namespace samchon
8 {
9 namespace protocol
10 {
11 namespace master
12 {
13  class ParallelSystemArray;
14 
15  class PRInvokeHistoryArray;
16  class PRMasterHistory;
17 
41  class SAMCHON_FRAMEWORK_API ParallelSystem
42  : public virtual ExternalSystem
43  {
44  friend class ParallelSystemArray;
45  friend class PRMasterHistory;
46 
47  protected:
48  typedef ExternalSystem super;
49 
54 
59 
64 
79  double performance;
80 
81  public:
82  /* ------------------------------------------------------------------
83  CONSTRUCTORS
84  ------------------------------------------------------------------ */
89  virtual ~ParallelSystem();
90 
91  virtual void construct(std::shared_ptr<library::XML>) override;
92 
93 
94  protected:
95  virtual auto createChild(std::shared_ptr<library::XML>)->ExternalSystemRole* override;
96 
97  /* ------------------------------------------------------------------
98  CHAIN OF INVOKE MESSAGE
99  ------------------------------------------------------------------ */
100  virtual void _replyData(std::shared_ptr<Invoke>) override;
101 
102  private:
110  void sendPieceData(PRMasterHistory*, std::shared_ptr<Invoke>, size_t, size_t);
111 
112  /* ------------------------------------------------------------------
113  EXPORTERS
114  ------------------------------------------------------------------ */
115  public:
116  virtual auto toXML() const->std::shared_ptr<library::XML> override;
117  };
118 };
119 };
120 };
PRInvokeHistoryArray * historyArray
A list of history log for reported Invoke messages.
A history log of an Invoke message on a master.
Definition: RWMutex.hpp:4
An array of parallel system drivers.
A network driver for a parallel system.
ParallelSystemArray * systemArray
A master that the system is belonged to.
An Entity and a container of children Entity objects.
Definition: EntityGroup.hpp:52
A network driver for an external system.
PRInvokeHistoryArray * progressArray
A list of invoke messages on progress.
double performance
A performance index.
Top level namespace of products built from samchon.
Definition: ByteArray.hpp:7