2 #include <samchon/protocol/Entity.hpp> 3 #include <samchon/protocol/IEntityGroup.hpp> 6 #include <samchon/library/XML.hpp> 53 :
public virtual Entity,
public std::list<T>,
58 typedef T entity_type;
81 virtual void construct(std::shared_ptr<library::XML> xml)
override 87 std::shared_ptr<library::XMLList> &xmlList = xml->get(
CHILD_TAG());
88 assign(xmlList->size());
90 for (
size_t i = 0; i < xmlList->size(); i++)
91 at(i).construct(xmlList->at(i));
109 virtual auto toXML() const ->
std::shared_ptr<library::XML>
override 113 std::shared_ptr<library::XMLList> xmlList(
new XMLList());
114 xmlList->reserve(this->size());
116 for (
size_t i = 0; i < size(); i++)
117 xmlList->push_back(at(i).
toXML());
An entity, a standard data class.
virtual auto toXML() const -> std::shared_ptr< library::XML >
Get an XML object represents the Entity.
An iternface for entity group.
EntityList()
Default Constructor.
virtual auto toXML() const -> std::shared_ptr< library::XML > override
Get an XML object represents the EntityList.
An Entity and a static list containing Entity objects.
virtual auto CHILD_TAG() const -> std::string=0
A tag name of children.
Top level namespace of products built from samchon.
virtual void construct(std::shared_ptr< library::XML > xml) override
Construct data of the Entity from an XML object.