Samchon Framework for CPP  1.0.0
samchon::templates::external::ExternalSystemArray< System > Class Template Referenceabstract

#include <ExternalSystemArray.hpp>

Collaboration diagram for samchon::templates::external::ExternalSystemArray< System >:

Public Member Functions

 ExternalSystemArray ()
 
virtual ~ExternalSystemArray ()=default
 
auto hasRole (const std::string &key) const -> bool
 
auto getRole (const std::string &key) const -> std::shared_ptr< ExternalSystemRole >
 
virtual void sendData (std::shared_ptr< protocol::Invoke > invoke)
 
virtual void replyData (std::shared_ptr< protocol::Invoke > invoke)=0
 
virtual auto CHILD_TAG () const -> std::string override
 A tag name of children. More...
 
- Public Member Functions inherited from samchon::protocol::EntityGroup< Container, T, Key >
virtual void construct (std::shared_ptr< library::XML > xml)
 Construct data of the Entity from an XML object. More...
 
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...
 
virtual auto toXML () const -> std::shared_ptr< library::XML >
 Get an XML object represents the EntityGroup. More...
 
- Public Member Functions inherited from samchon::protocol::Entity< Key >
virtual auto key () const -> Key
 Get a key that can identify the Entity uniquely. 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
 

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...
 

Detailed Description

template<class System = ExternalSystem>
class samchon::templates::external::ExternalSystemArray< System >

An array and manager of external system drivers.

The ExternalSystemArray is an abstract class containing and managing external system drivers, ExternalSystem objects. Within framewokr of network, ExternalSystemArray represents your system and children ExternalSystem objects represent remote, external systems connected with your system. With this ExternalSystemArray, you can manage multiple external systems as a group.

You can specify this ExternalSystemArray class to be a server accepting external clients or a client connecting to external servers. Even both of them is also possible.

Class Diagram

Proxy Pattern

The ExternalSystemArray class can use Proxy Pattern. 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.

Templates - External System

Author
Jeongho Nam http://samchon.org

Definition at line 68 of file ExternalSystemArray.hpp.

Constructor & Destructor Documentation

template<class System = ExternalSystem>
samchon::templates::external::ExternalSystemArray< System >::ExternalSystemArray ( )
inline

Default Constructor.

Definition at line 83 of file ExternalSystemArray.hpp.

template<class System = ExternalSystem>
virtual samchon::templates::external::ExternalSystemArray< System >::~ExternalSystemArray ( )
virtualdefault

Default Destructor.

Referenced by samchon::templates::external::ExternalSystemArray< Viewer >::ExternalSystemArray().

Here is the caller graph for this function:

Member Function Documentation

template<class System = ExternalSystem>
auto samchon::templates::external::ExternalSystemArray< System >::hasRole ( const std::string &  key) const -> bool
inline

Test whether the role exists.

Parameters
nameName, identifier of target role.
Returns
Whether the role has or not.

Definition at line 104 of file ExternalSystemArray.hpp.

template<class System = ExternalSystem>
auto samchon::templates::external::ExternalSystemArray< System >::getRole ( const std::string &  key) const -> std::shared_ptr<ExternalSystemRole>
inline

Get a role.

Parameters
nameName, identifier of target role.
Returns
The specified role.

Definition at line 121 of file ExternalSystemArray.hpp.

template<class System = ExternalSystem>
virtual void samchon::templates::external::ExternalSystemArray< System >::sendData ( std::shared_ptr< protocol::Invoke invoke)
inlinevirtual

Send an Invoke message.

Parameters
invokeAn Invoke message to send.

Definition at line 145 of file ExternalSystemArray.hpp.

template<class System = ExternalSystem>
virtual void samchon::templates::external::ExternalSystemArray< System >::replyData ( std::shared_ptr< protocol::Invoke invoke)
pure virtual

Handle an {} message have received.

Parameters
invokeAn Invoke message have received.

Referenced by samchon::templates::external::ExternalSystemArray< Viewer >::sendData().

Here is the caller graph for this function:

template<class System = ExternalSystem>
virtual auto samchon::templates::external::ExternalSystemArray< System >::CHILD_TAG ( ) const -> std::string
inlineoverridevirtual

A tag name of children.

< TAG>
     <CHILD_TAG />
     <CHILD_TAG />
</TAG>

Implements samchon::protocol::EntityGroupBase.

Definition at line 173 of file ExternalSystemArray.hpp.


The documentation for this class was generated from the following file: