1 #include <samchon/protocol/ExternalSystem.hpp> 3 #include <samchon/protocol/ExternalSystemRole.hpp> 5 #include <samchon/library/XML.hpp> 6 #include <samchon/protocol/Invoke.hpp> 15 ExternalSystem::ExternalSystem()
22 this->
name = xml->getProperty(
"name");
24 this->
ip = xml->getProperty(
"ip");
25 this->
port = xml->getProperty<
int>(
"port");
43 string &listener = invoke->getListener();
45 for(
size_t i = 0; i < size(); i++)
46 if(at(i)->hasReplyListener(listener) ==
true)
47 at(i)->replyData(invoke);
65 xml->setProperty(
"name",
name);
66 xml->setProperty(
"ip",
ip);
67 xml->setProperty(
"port",
port);
virtual auto key() const -> std::string override
Get a key that can identify the Entity uniquely.
int port
A port number of an external system.
virtual auto toXML() const -> std::shared_ptr< library::XML > override
Get an XML object represents the EntityGroup.
std::string name
A name can identify an external system.
virtual void replyData(std::shared_ptr< Invoke >) override
Handling replied message from an external system.
virtual auto TAG() const -> std::string override
A tag name when represented by XML.
std::string ip
An ip address of an external system.
An Entity and a container of children Entity objects.
virtual auto toXML() const -> std::shared_ptr< library::XML >
Get an XML object represents the EntityGroup.
Package of network protocol and libraries.
An interface for a client.
virtual void construct(std::shared_ptr< library::XML >) override
Construct data of the Entity from an XML object.
XML is a class representing xml object.
virtual auto CHILD_TAG() const -> std::string override
A tag name of children.
virtual void construct(std::shared_ptr< library::XML > xml)
Construct data of the Entity from an XML object.