Samchon Framework for CPP  1.0.0
InvokeHistory.hpp
1 #pragma once
2 #include <samchon/API.hpp>
3 
4 #include <samchon/protocol/Entity.hpp>
5 
6 #include <samchon/library/Datetime.hpp>
7 
8 namespace samchon
9 {
10 namespace protocol
11 {
12  class Invoke;
13 
35  class SAMCHON_FRAMEWORK_API InvokeHistory
36  : public virtual Entity
37  {
38  protected:
39  typedef Entity super;
40 
44  size_t uid;
45 
59  std::string listener;
60 
72 
84 
85  public:
86  /* -----------------------------------------------------------------
87  CONSTRUCTORS
88  ----------------------------------------------------------------- */
92  InvokeHistory();
93 
102  InvokeHistory(std::shared_ptr<Invoke>);
103  virtual ~InvokeHistory() = default;
104 
105  virtual void construct(std::shared_ptr<library::XML>) override;
106 
114  virtual void notifyEnd();
115 
116  /* -----------------------------------------------------------------
117  GETTERS
118  ----------------------------------------------------------------- */
119  public:
120  virtual auto key() const->std::string override;
121 
125  auto getUID() const->size_t;
126 
130  auto getListener() const->std::string;
131 
135  auto getStartTime() const->library::Datetime;
136 
140  auto getEndTime() const->library::Datetime;
141 
153  auto calcElapsedTime() const -> long long;
154 
155  /* -----------------------------------------------------------------
156  EXPORTERS
157  ----------------------------------------------------------------- */
158  public:
159  virtual auto TAG() const->std::string override;
160 
161  virtual auto toXML() const->std::shared_ptr<library::XML> override;
162 
173  auto toInvoke() const->std::shared_ptr<Invoke>;
174  };
175 };
176 };
An entity, a standard data class.
Definition: Entity.hpp:48
Definition: RWMutex.hpp:4
A history of an Invoke message.
library::Datetime endTime
End time of the history.
Standard message of network I/O.
Definition: Invoke.hpp:47
std::string listener
A listener of the Invoke message.
library::Datetime startTime
Start time of the history.
Top level namespace of products built from samchon.
Definition: ByteArray.hpp:7