Samchon Framework for CPP  1.0.0
PRMasterHistory.cpp
1 #include <samchon/protocol/master/PRMasterHistory.hpp>
2 
3 #include <samchon/protocol/master/ParallelSystemArray.hpp>
4 #include <samchon/protocol/master/ParallelSystem.hpp>
5 #include <samchon/protocol/master/PRMasterHistoryArray.hpp>
6 
7 #include <samchon/library/XML.hpp>
8 #include <samchon/protocol/Invoke.hpp>
9 
10 using namespace std;
11 using namespace samchon::library;
12 using namespace samchon::protocol;
13 using namespace samchon::protocol::master;
14 
15 PRMasterHistory::PRMasterHistory
16  (
17  PRMasterHistoryArray *historyArray,
18  shared_ptr<Invoke> invoke, size_t index, size_t size
19  ) : super()
20 {
21  this->master = historyArray->master;
22 
23  this->uid = invoke->get("invoke_history_uid")->getValue<size_t>();
24  this->listener = invoke->getListener();
25  this->startTime = chrono::system_clock::now();
26 
27  this->index = index;
28  this->size = size;
29 
30  this->completed = 0;
31 }
32 void PRMasterHistory::notifyEnd()
33 {
34  if (++completed < historyArray.size())
35  return;
36 
37  super::notifyEnd();
38  master->notifyEnd(this);
39 }
An entity, a standard data class.
Definition: Entity.hpp:48
Package for external system, within the framework of master.
Definition: RWMutex.hpp:4
Package of libraries.
Definition: library.hpp:84
An array of invoke histories of master.
Package of network protocol and libraries.
Definition: protocol.hpp:185
ParallelSystemArray * master
A master the array of histories is belonged to.
auto get(const std::string &key) -> value_type &
Access the element by specified identifier(key).