Samchon Framework for CPP
1.0.0
|
A metadata of a parameter in a function. More...
#include <NTParameter.hpp>
Public Member Functions | |
NTParameter () | |
Default Constructor. More... | |
virtual void | construct (std::shared_ptr< library::XML >) override |
Construct data of the Entity from an XML object. More... | |
virtual auto | key () const -> std::string override |
Get a key that can identify the Entity uniquely. More... | |
auto | getName () const -> std::string |
Get name. More... | |
auto | getInitialValue () const -> double |
Get initial, default vlaue. More... | |
virtual auto | TAG () const -> std::string override |
A tag name when represented by XML. More... | |
virtual auto | CHILD_TAG () const -> std::string override |
A tag name of children. More... | |
virtual auto | toXML () const -> std::shared_ptr< library::XML > override |
Get an XML object represents the Entity. More... | |
![]() | |
EntityGroup () | |
Default Constructor. More... | |
auto | has (const std::string &key) const -> bool |
Indicates whether a container has an object having the specified identifier. More... | |
auto | get (const std::string &key) -> value_type & |
Access the element by specified identifier(key). More... | |
auto | get (const std::string &key) const -> const value_type & |
Access the const element by specified identifier(key). More... | |
![]() | |
Entity () | |
Default Constructor. More... | |
![]() | |
IEntityGroup () | |
Default Constructor. More... | |
![]() | |
INTExplore () | |
Default Constructor. More... | |
auto | getMinimum () const -> double |
Get minimum. More... | |
auto | getMaximum () const -> double |
Get maximum. More... | |
auto | getSection () const -> unsigned int |
Get section. More... | |
auto | getPrecision () const -> int |
Get precision. More... | |
Protected Member Functions | |
virtual auto | createChild (std::shared_ptr< library::XML >) -> NTParameterDetermined *override |
Factory method of a child Entity. More... | |
Protected Attributes | |
std::string | name |
Name of a paremeter. More... | |
double | initialValue |
An initial, default value. More... | |
![]() | |
double | minimum |
Minimum value. More... | |
double | maximum |
Maximum value. More... | |
unsigned int | section |
Section number of exploration. More... | |
int | precision |
Target precision: 10precision More... | |
A metadata of a parameter in a function.
NTParameter is a class containing metadata of a parameter which is belonged to a class, metadata of a function, NTFile. Between the NTFile and NTParameter(s), there's a associate relationship.
Definition at line 25 of file NTParameter.hpp.
NTParameter::NTParameter | ( | ) |
|
overridevirtual |
Construct data of the Entity from an XML object.
Overrides the construct() method and fetch data of member variables from the XML.
By recommended guidance, data representing member variables are contained in properties of the put XML object.
xml | An xml used to construct data of entity |
Reimplemented from samchon::namtree::INTExplore.
Definition at line 21 of file NTParameter.cpp.
References samchon::namtree::INTExplore::construct(), samchon::protocol::EntityGroup< _Container, _ETy, T >::construct(), initialValue, and name.
|
overrideprotectedvirtual |
Factory method of a child Entity.
EntityGroup::createChild() is a factory method creating a new child Entity which is belonged to the EntityGroup. This method is called by EntityGroup::construct(). The children construction methods Entity::construct() will be called by abstract method of the EntityGroup::construct().
Implements samchon::protocol::EntityGroup< _Container, _ETy, T >.
Definition at line 32 of file NTParameter.cpp.
|
overridevirtual |
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 from samchon::protocol::Entity.
Definition at line 37 of file NTParameter.cpp.
References name.
auto NTParameter::getName | ( | ) | const -> std::string |
auto NTParameter::getInitialValue | ( | ) | const -> double |
|
overridevirtual |
A tag name when represented by XML.
Implements samchon::protocol::Entity.
Definition at line 13 of file NTParameter.cpp.
|
overridevirtual |
A tag name of children.
< TAG>
<CHILD_TAG />
<CHILD_TAG />
</TAG>
Implements samchon::protocol::IEntityGroup.
Definition at line 14 of file NTParameter.cpp.
|
overridevirtual |
Get an XML object represents the Entity.
Returns an XML object that can represents the Entity containing member variables into properties.
A member variable (not object, but atomic value like number, string or date) is categorized as a property within the framework of entity side. Thus, when overriding a toXML() method and archiving member variables to an XML object to return, puts each variable to be a property belongs to only an XML object.
Don't archive the member variable of atomic value to XML::value causing enormouse creation of XML objects to number of member variables. An Entity must be represented by only an XML instance (tag).
Standard Usage | Non-standard usage abusing value |
---|---|
<memberList> <member id='jhnam88' name='Jeongho+Nam' birthdate='1988-03-11' /> <member id='master' name='Administartor' birthdate='2011-07-28' /> </memberList> | <member> <id>jhnam88</id> <name>Jeongho+Nam</name> <birthdate>1988-03-11</birthdate> </member> |
Reimplemented from samchon::namtree::INTExplore.
Definition at line 50 of file NTParameter.cpp.
References initialValue, name, samchon::namtree::INTExplore::toXML(), and samchon::protocol::EntityGroup< _Container, _ETy, T >::toXML().
|
protected |
Name of a paremeter.
The string label is identifier of a NTParameter. It must be unique.
Definition at line 37 of file NTParameter.hpp.
Referenced by construct(), getName(), key(), and toXML().
|
protected |
An initial, default value.
Definition at line 42 of file NTParameter.hpp.
Referenced by construct(), getInitialValue(), NTParameter(), and toXML().