Samchon Framework for CPP  1.0.0
DistributedSystemArrayMediator.hpp
1 #pragma once
2 #include <samchon/API.hpp>
3 
4 #include <samchon/templates/distributed/DistributedSystemArray.hpp>
5 #include <samchon/templates/parallel/ParallelSystemArrayMediator.hpp>
6 
7 namespace samchon
8 {
9 namespace templates
10 {
11 namespace distributed
12 {
46  template <class System = DistributedSystem>
48  : public virtual DistributedSystemArray<System>,
49  public virtual parallel::ParallelSystemArrayMediator<System>
50  {
51  public:
52  /* ---------------------------------------------------------
53  CONSTRUCTORS
54  --------------------------------------------------------- */
59  : DistributedSystemArray<System>(),
61  {
62  };
63  virtual ~DistributedSystemArrayMediator() = default;
64 
65  protected:
66  /* ---------------------------------------------------------
67  INVOKE MESSAGE CHAIN
68  --------------------------------------------------------- */
69  virtual auto _Complete_history(std::shared_ptr<slave::InvokeHistory> history) -> bool override
70  {
71  bool ret = DistributedSystemArray::_Complete_history(history);
72  if (ret == true)
73  getMediator()->_Complete_history(history->getUID());
74 
75  return ret;
76  };
77  };
78 };
79 };
80 };