Samchon Framework for CPP
1.0.0
|
An entity, a standard data class. More...
#include <Entity.hpp>
Public Member Functions | |
virtual auto | key () const -> Key |
Get a key that can identify the Entity uniquely. More... | |
An entity, a standard data class.
Entity is a class for standardization of expression method using on network I/O by XML. If Invoke is a standard message protocol of Samchon Framework which must be kept, Entity is a recommended semi-protocol of message for expressing a data class. Following the semi-protocol Entity is not imposed but encouraged.
As we could get advantages from standardization of message for network I/O with Invoke, we can get additional advantage from standardizing expression method of data class with Entity. We do not need to know a part of network communication. Thus, with the Entity, we can only concentrate on entity's own logics and relationships between another entities. Entity does not need to how network communications are being done.
I say repeatedly. Expression method of Entity is recommended, but not imposed. It's a semi protocol for network I/O but not a essential protocol must be kept. The expression method of Entity, using on network I/O, is expressed by XML string.
If your own network system has a critical performance issue on communication data class, it would be better to using binary communication (with ByteArray or boost::serialization). Don't worry about the problem! Invoke also provides methods for binary data (ByteArray).
Definition at line 115 of file Entity.hpp.
|
inlinevirtual |
Get a key that can identify the Entity uniquely.
If identifier of the Entity is not atomic value, returns a string represents the composite identifier. If identifier of the Entity is not string, converts the identifier to string and returns the string.
Reimplemented in samchon::protocol::InvokeParameter, samchon::templates::external::ExternalSystem, samchon::examples::tsp::GeometryPoint, samchon::templates::external::ExternalSystemRole, samchon::templates::distributed::DistributedProcess, and samchon::templates::slave::InvokeHistory.
Definition at line 133 of file Entity.hpp.
Referenced by samchon::protocol::EntityGroup< std::deque< System * >, System, int >::construct(), samchon::protocol::EntityGroup< std::deque< System * >, System, int >::count(), samchon::protocol::EntityGroup< std::deque< System * >, System, int >::find(), samchon::protocol::EntityGroup< std::deque< System * >, System, int >::get(), samchon::templates::external::ExternalSystemArray< Viewer >::getRole(), samchon::protocol::EntityGroup< std::deque< System * >, System, int >::has(), and samchon::templates::external::ExternalSystemArray< Viewer >::hasRole().