Samchon Framework for CPP  1.0.0
ExternalSystem.hpp
1 #pragma once
2 #include <samchon/API.hpp>
3 
4 #include <samchon/protocol/SharedEntityArray.hpp>
5 # include <samchon/protocol/ExternalSystemRole.hpp>
6 #include <samchon/protocol/IClient.hpp>
7 
8 namespace samchon
9 {
10 namespace protocol
11 {
49  class SAMCHON_FRAMEWORK_API ExternalSystem
50  : public SharedEntityArray<ExternalSystemRole>,
51  public virtual IClient
52  {
53  protected:
55 
61  std::string name;
62 
66  std::string ip;
67 
71  int port;
72 
73  public:
74  /* ------------------------------------------------------------------
75  CONSTRUCTORS
76  ------------------------------------------------------------------ */
81  virtual ~ExternalSystem() = default;
82 
83  virtual void construct(std::shared_ptr<library::XML>) override;
84 
96  virtual void start() = 0;
97 
98  /* ------------------------------------------------------------------
99  GETTERS
100  ------------------------------------------------------------------ */
101  virtual auto key() const->std::string override;
102 
103  /* ------------------------------------------------------------------
104  CHAIN OF INVOKE MESSAGE
105  ------------------------------------------------------------------ */
112  virtual void replyData(std::shared_ptr<Invoke>) override;
113 
114  public:
115  /* ------------------------------------------------------------------
116  EXPORTERS
117  ------------------------------------------------------------------ */
118  virtual auto TAG() const->std::string override;
119  virtual auto CHILD_TAG() const->std::string override;
120 
121  virtual auto toXML() const->std::shared_ptr<library::XML> override;
122  };
123 };
124 };
int port
A port number of an external system.
Definition: RWMutex.hpp:4
std::string name
A name can identify an external system.
std::string ip
An ip address of an external system.
An Entity and a container of children Entity objects.
Definition: EntityGroup.hpp:52
A network driver for an external system.
An interface for a client.
Definition: IClient.hpp:53
Standard message of network I/O.
Definition: Invoke.hpp:47
Top level namespace of products built from samchon.
Definition: ByteArray.hpp:7