1 #include <samchon/namtree/NTSide.hpp> 3 #include <samchon/namtree/NTFactory.hpp> 4 #include <samchon/namtree/NTFile.hpp> 5 #include <samchon/namtree/NTIterator.hpp> 7 #include <samchon/Map.hpp> 8 #include <samchon/library/XML.hpp> 17 auto NTSide::TAG() const ->
string {
return "side"; }
22 this->factory = factory;
25 void NTSide::construct(shared_ptr<XML> xml)
28 if (xml->hasProperty(
"parameterArray") ==
false)
31 shared_ptr<XMLList> ¶meterList = xml->get(
"parameterArray");
32 for (
auto it = parameterList->begin(); it != parameterList->end(); it++)
34 shared_ptr<XML> ¶meter = *it;
35 string &name = parameter->getProperty(
"name");
36 string &strValue = parameter->getValue();
40 strValue.empty() ==
false 47 void NTSide::initRetrieve()
51 auto NTSide::calcRetrieved(
NTIterator &iterator)
const ->
double 53 return file->getFunction()(iterator, parameters);
56 auto NTSide::toXML() const -> shared_ptr<
XML>
58 shared_ptr<XML> &xml = super::toXML();
59 xml->setProperty(
"fileUID", file->key());
61 shared_ptr<XML> parameterListXML(
new XML());
62 parameterListXML->setTag(
"parameterArray");
64 for (
auto it = parameters.begin(); it != parameters.end(); it++)
66 shared_ptr<XML> parameter(
new XML());
67 parameter->setTag(
"parameter");
72 parameter->setValue( to_string(*it) );
73 parameterListXML->push_back(parameter);
75 xml->push_back(parameterListXML);
An entity, a standard data class.
A factory for Nam-Tree objects.
Iterator of historical data.
Package of network protocol and libraries.
XML is a class representing xml object.
Top level namespace of products built from samchon.