Samchon Framework for CPP
1.0.0
|
A pre-determined value of a parameter. More...
#include <NTParameterDetermined.hpp>
Public Member Functions | |
NTParameterDetermined () | |
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 | getLabel () const -> std::string |
Get label. More... | |
auto | getValue () const -> double |
Get value. More... | |
virtual auto | TAG () const -> std::string override |
A tag name when represented by XML. More... | |
virtual auto | toXML () const -> std::shared_ptr< library::XML > override |
Get an XML object represents the Entity. More... | |
![]() | |
Entity () | |
Default Constructor. More... | |
Protected Attributes | |
std::string | label |
A label will be printed in a combo-box. More... | |
double | value |
A value, pre-defined. More... | |
A pre-determined value of a parameter.
NTParameterDetermined is a class belonged to a NTParameter object presents a pre-defined value. In UI module of Nam-Tree, the NTParameterDetermined is expressed by an item of a ComboBox.
When optimization of Nam-Tree, in a part of NTParameter, if the pre-determined value is defined optimizer does not explore with grid method from referencing INTExplore. Just selects a value between the pre-defineds. (One of NTParameterDetermined is selected in NTParameter).
Definition at line 30 of file NTParameterDetermined.hpp.
NTParameterDetermined::NTParameterDetermined | ( | ) |
Default Constructor.
Definition at line 14 of file NTParameterDetermined.cpp.
|
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 |
Implements samchon::protocol::Entity.
Definition at line 18 of file NTParameterDetermined.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 25 of file NTParameterDetermined.cpp.
References label.
auto NTParameterDetermined::getLabel | ( | ) | const -> std::string |
auto NTParameterDetermined::getValue | ( | ) | const -> double |
|
overridevirtual |
A tag name when represented by XML.
Implements samchon::protocol::Entity.
Definition at line 12 of file NTParameterDetermined.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::protocol::Entity.
Definition at line 38 of file NTParameterDetermined.cpp.
References label, samchon::protocol::Entity::toXML(), and value.
|
protected |
A label will be printed in a combo-box.
The string label is identifier of a NTParameterDetermined. It must be unique.
Definition at line 41 of file NTParameterDetermined.hpp.
Referenced by construct(), getLabel(), key(), and toXML().
|
protected |
A value, pre-defined.
Definition at line 46 of file NTParameterDetermined.hpp.
Referenced by construct(), getValue(), and toXML().