Samchon Framework for CPP
1.0.0
|
#include <ExternalSystem.hpp>
Public Member Functions | |
ExternalSystem () | |
ExternalSystem (base::ExternalSystemArrayBase *systemArray) | |
ExternalSystem (base::ExternalSystemArrayBase *systemArray, std::shared_ptr< protocol::ClientDriver > driver) | |
virtual | ~ExternalSystem ()=default |
virtual void | construct (std::shared_ptr< library::XML > xml) override |
Construct data of the Entity from an XML object. More... | |
virtual auto | key () const -> std::string |
auto | getName () const -> std::string |
void | close () |
virtual void | sendData (std::shared_ptr< protocol::Invoke > invoke) override |
virtual void | replyData (std::shared_ptr< protocol::Invoke > invoke) override |
virtual auto | CHILD_TAG () const -> std::string override |
A tag name of children. More... | |
virtual auto | toXML () const -> std::shared_ptr< library::XML > override |
Get an XML object represents the EntityGroup. More... | |
Public Member Functions inherited from samchon::protocol::EntityGroup< Container, T, Key > | |
auto | find (const typename child_type::key_type &key) -> typename container_type::iterator |
Get iterator to element. More... | |
auto | find (const typename child_type::key_type &key) const -> typename container_type::const_iterator |
Get const iterator to element. More... | |
auto | has (const typename child_type::key_type &key) const -> bool |
Indicates whether a container has an object having the specified identifier. More... | |
auto | count (const typename child_type::key_type &key) const -> size_t |
Count elements with a specific key. More... | |
auto | get (const typename child_type::key_type &key) -> typename container_type::value_type & |
Access the element by specified identifier(key). More... | |
auto | get (const typename child_type::key_type &key) const -> const typename container_type::value_type & |
Access the const element by specified identifier(key). More... | |
Public Member Functions inherited from samchon::protocol::IProtocol | |
virtual void | replyData (std::shared_ptr< Invoke >)=0 |
virtual void | sendData (std::shared_ptr< Invoke >)=0 |
Protected Attributes | |
std::string | name |
Additional Inherited Members | |
Protected Member Functions inherited from samchon::protocol::EntityGroup< Container, T, Key > | |
virtual auto | createChild (std::shared_ptr< library::XML >) -> child_type *=0 |
Factory method of a child Entity. More... | |
An external system driver.
The ExternalSystem class represents an external system, connected and interact with this system. ExternalSystem takes full charge of network communication with the remote, external system have connected. Replied Invoke messages from the external system is shifted to and processed in, children elements of this class, ExternalSystemRole objects.
The ExternalSystem class can be a bridge for logical proxy. In framework within user, which external system is connected with this system, it's not important. Only interested in user's perspective is which can be done.
By using the logical proxy, user dont't need to know which role is belonged to which system. Just access to a role directly from ExternalSystemArray.getRole. Sends and receives Invoke message via the role.
Definition at line 55 of file ExternalSystem.hpp.
|
inline |
Default Constructor.
Definition at line 78 of file ExternalSystem.hpp.
|
inline |
Construct from parent ExternalSystemArray.
systemArray | The parent ExternalSystemArray object. |
Definition at line 89 of file ExternalSystem.hpp.
|
inline |
Constrct from parent ExternalSystemArray and communicator.
systemArray | The parent ExternalSystemArray object. |
communicator | Communicator with the remote, external system. |
Definition at line 101 of file ExternalSystem.hpp.
References ~ExternalSystem().
|
virtualdefault |
Default Destructor.
The ExternalSystem object is destructed when connection with the remote system is closed or this ExternalSystem object is erased from its parent ExternalSystemArray object.
Referenced by ExternalSystem().
|
inlineoverridevirtual |
Construct data of the Entity from an XML object.
Constructs the EntityGroup's own member variables only from the input XML object.
Do not consider about constructing children Entity objects' data in EntityGroup::construct(). Those children Entity objects' data will constructed by their own construct() method. Even insertion of XML objects representing children are done by abstract method of EntityGroup::toXML().
Constructs only data of EntityGroup's own.
Reimplemented from samchon::protocol::EntityGroup< Container, T, Key >.
Reimplemented in samchon::templates::parallel::ParallelSystem.
Definition at line 115 of file ExternalSystem.hpp.
References samchon::protocol::EntityGroup< Container, T, Key >::construct().
Referenced by samchon::templates::parallel::ParallelSystem::construct().
|
inlinevirtual |
Identifier of ExternalSystem is its name.
Reimplemented from samchon::protocol::Entity< Key >.
Definition at line 138 of file ExternalSystem.hpp.
References name.
|
inline |
|
inline |
Close connection.
Definition at line 158 of file ExternalSystem.hpp.
|
inlineoverridevirtual |
Send Invoke message to external system.
invoke | An Invoke message to send. |
Definition at line 168 of file ExternalSystem.hpp.
Referenced by samchon::templates::external::ExternalSystemArray< Viewer >::sendData(), and samchon::templates::parallel::ParallelSystemArray< SlaveDriver >::sendPieceData().
|
inlineoverridevirtual |
Handle an {} message has received.
invoke | An Invoke message have received. |
Reimplemented in samchon::templates::distributed::DistributedSystem.
Definition at line 178 of file ExternalSystem.hpp.
Referenced by samchon::templates::parallel::ParallelSystem::enforcePerformance(), and samchon::templates::distributed::DistributedSystem::replyData().
|
inlineoverridevirtual |
A tag name of children.
< TAG>
<CHILD_TAG />
<CHILD_TAG />
</TAG>
Implements samchon::protocol::EntityGroupBase.
Definition at line 196 of file ExternalSystem.hpp.
|
inlineoverridevirtual |
Get an XML object represents the EntityGroup.
Archives the EntityGroup's own member variables only to the returned XML object.
Do not consider about archiving children Entity objects' data in EntityGroup::toXML(). Those children Entity objects will converted to XML object by their own toXML() method. The insertion of XML objects representing children are done by abstract method of EntityGroup::toXML().
Archives only data of EntityGroup's own.
Reimplemented from samchon::protocol::EntityGroup< Container, T, Key >.
Reimplemented in samchon::templates::parallel::ParallelSystem.
Definition at line 201 of file ExternalSystem.hpp.
References samchon::protocol::EntityGroup< Container, T, Key >::toXML().
Referenced by samchon::templates::parallel::ParallelSystem::toXML().
|
protected |
The name represents external system have connected.
Definition at line 69 of file ExternalSystem.hpp.
Referenced by samchon::templates::parallel::ParallelSystem::enforcePerformance(), getName(), and key().