1 #include <samchon/protocol/InvokeHistory.hpp> 3 #include <samchon/library/XML.hpp> 4 #include <samchon/protocol/Invoke.hpp> 13 InvokeHistory::InvokeHistory()
20 this->
uid = invoke->get(
"invoke_history_uid")->getValue<
size_t>();
21 this->
listener = invoke->getListener();
23 this->
startTime = chrono::system_clock::now();
28 this->
uid = xml->getProperty<
size_t>(
"uid");
29 this->
listener = xml->getProperty(
"listener");
31 startTime = chrono::system_clock::from_time_t(0);
32 endTime = chrono::system_clock::from_time_t(0);
43 >(xml->getProperty<
long long>(
"startTime"));
54 >(xml->getProperty<
long long>(
"endTime"));
58 endTime = chrono::system_clock::now();
66 return to_string(
uid);
96 return "invokeHistory";
103 xml->setProperty(
"uid",
uid);
104 xml->setProperty(
"listener",
listener);
105 xml->setProperty(
"startTime",
startTime.time_since_epoch().count());
106 xml->setProperty(
"endTime",
endTime.time_since_epoch().count());
112 return shared_ptr<Invoke>(
new Invoke(
"reportInvokeHistory",
toXML()));
auto getStartTime() const -> library::Datetime
Get start time.
An entity, a standard data class.
virtual auto toXML() const -> std::shared_ptr< library::XML >
Get an XML object represents the Entity.
virtual void construct(std::shared_ptr< library::XML >) override
Construct data of the Entity from an XML object.
library::Datetime endTime
End time of the history.
auto calcElapsedTime() const -> long long
Get elapsed time.
Package of network protocol and libraries.
auto getListener() const -> std::string
Get listener.
Standard message of network I/O.
virtual auto TAG() const -> std::string override
A tag name when represented by XML.
virtual void notifyEnd()
Notify end of the process.
std::string listener
A listener of the Invoke message.
auto toInvoke() const -> std::shared_ptr< Invoke >
Get an Invoke message.
auto getUID() const -> size_t
Get uid.
XML is a class representing xml object.
InvokeHistory()
Default Constructor.
auto getEndTime() const -> library::Datetime
Get end time.
virtual auto toXML() const -> std::shared_ptr< library::XML > override
Get an XML object represents the Entity.
library::Datetime startTime
Start time of the history.
virtual auto key() const -> std::string override
Get a key that can identify the Entity uniquely.