1 #include <samchon/protocol/master/DistributedSystemArray.hpp> 3 #include <samchon/protocol/master/DistributedSystem.hpp> 4 #include <samchon/protocol/master/DistributedSystemRole.hpp> 15 DistributedSystemArray::DistributedSystemArray()
24 if (xml->has(
"roleArray") ==
false)
27 shared_ptr<XMLList> &xmlList = xml->get(
"roleArray")->at(0)->get(
"role");
28 for (
size_t i = 0; i < xmlList->size(); i++)
30 shared_ptr<DistributedSystemRole> role(
createRole(xmlList->at(i)) );
31 role->construct(xmlList->at(i));
73 shared_ptr<XML> roleArray(
new XML());
74 xml->setTag(
"roleArray");
77 roleArray->push_back(it->second->toXML());
79 xml->push_back(roleArray);
virtual auto createRole(std::shared_ptr< library::XML >) -> DistributedSystemRole *=0
Factory method of a DistributedSystemRole.
virtual void construct(std::shared_ptr< library::XML >) override
Construct data of the Entity from an XML object.
Package for external system, within the framework of master.
virtual void start() override
Start interaction.
An array of distributed system drivers.
Dictionary< std::shared_ptr< DistributedSystemRole > > roleDictionary
A dictionary of role objects.
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.
virtual auto toXML() const -> std::shared_ptr< library::XML > override
Get an XML object represents the EntityGroup.
Package of network protocol and libraries.
A network driver for a distributed system.
virtual auto key() const -> std::string
Get a key that can identify the Entity uniquely.
XML is a class representing xml object.
auto hasRole(const std::string &) const -> bool
Test whether has a role.
auto getRole(const std::string &) const -> std::shared_ptr< DistributedSystemRole >
Get a role.
virtual void construct(std::shared_ptr< library::XML > xml)
Construct data of the Entity from an XML object.
virtual void allocateRoles()
Allocate roles to each distributed processing system.
Top level namespace of products built from samchon.