Samchon Framework for CPP
1.0.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
PRInvokeHistory.hpp
1
#pragma once
2
#include <samchon/API.hpp>
3
4
#include <samchon/templates/slave/InvokeHistory.hpp>
5
6
namespace
samchon
7
{
8
namespace
templates
9
{
10
namespace
parallel
11
{
12
class
ParallelSystem;
13
30
class
PRInvokeHistory
31
:
public
slave::InvokeHistory
32
{
33
friend
class
ParallelSystem
;
34
35
private
:
36
typedef
slave::InvokeHistory
super
;
37
38
size_t
first_;
39
size_t
last_;
40
41
public
:
42
/* ---------------------------------------------------------
43
CONSTRUCTORS
44
--------------------------------------------------------- */
48
PRInvokeHistory
()
49
: super()
50
{
51
};
52
58
PRInvokeHistory
(std::shared_ptr<protocol::Invoke> invoke)
59
: super(invoke)
60
{
61
this->first_ = invoke->get(
"_Piece_first"
)->getValue<
size_t
>();
62
this->last_ = invoke->get(
"_Piece_last"
)->getValue<
size_t
>();
63
};
64
65
virtual
~
PRInvokeHistory
() =
default
;
66
67
virtual
void
construct(std::shared_ptr<library::XML> xml)
override
68
{
69
super::construct(xml);
70
71
first_ = xml->getProperty<
size_t
>(
"first"
);
72
last_ = xml->getProperty<
size_t
>(
"last"
);
73
};
74
75
/* ---------------------------------------------------------
76
ACCESSORS
77
--------------------------------------------------------- */
85
auto
getFirst
() const ->
size_t
86
{
87
return
first_;
88
};
89
99
auto
getLast
() const ->
size_t
100
{
101
return
last_;
102
};
103
107
auto
computeSize
() const ->
size_t
108
{
109
return
last_ - first_;
110
};
111
112
/* ---------------------------------------------------------
113
EXPORTERS
114
--------------------------------------------------------- */
115
virtual
auto
toXML()
const
-> std::shared_ptr<library::XML>
override
116
{
117
std::shared_ptr<library::XML> &xml = super::toXML();
118
xml->setProperty(
"first"
, first_);
119
xml->setProperty(
"last"
, last_);
120
121
return
xml;
122
};
123
};
124
};
125
};
126
};
samchon::templates::parallel::PRInvokeHistory::PRInvokeHistory
PRInvokeHistory()
Definition:
PRInvokeHistory.hpp:48
samchon::templates::slave::InvokeHistory
Definition:
InvokeHistory.hpp:28
samchon::templates::parallel::PRInvokeHistory::computeSize
auto computeSize() const -> size_t
Definition:
PRInvokeHistory.hpp:107
samchon::templates::parallel::PRInvokeHistory
Definition:
PRInvokeHistory.hpp:30
samchon::templates::parallel::PRInvokeHistory::getFirst
auto getFirst() const -> size_t
Definition:
PRInvokeHistory.hpp:85
samchon::templates::parallel::PRInvokeHistory::PRInvokeHistory
PRInvokeHistory(std::shared_ptr< protocol::Invoke > invoke)
Definition:
PRInvokeHistory.hpp:58
samchon
Definition:
ByteArray.hpp:6
samchon::templates::parallel::PRInvokeHistory::getLast
auto getLast() const -> size_t
Definition:
PRInvokeHistory.hpp:99
samchon::templates::parallel::ParallelSystem
Definition:
ParallelSystem.hpp:58
cpp
samchon
templates
parallel
PRInvokeHistory.hpp
Generated by
1.8.11