Samchon Framework for CPP
1.0.0
|
A file archiving metadata of a function. More...
#include <NTFile.hpp>
Public Member Functions | |
NTFile (NTFactory *, library::FTFolder *) | |
Construct from factory and parent folder. More... | |
virtual void | construct (std::shared_ptr< library::XML >) override |
Construct data of the Entity from an XML object. More... | |
auto | getParameterArray () const -> NTParameterArray * |
Get metadata of parameters. More... | |
auto | getOtherside () const -> NTFile * |
Get otherside file. More... | |
auto | getFunction () const -> SideFunction |
Get function pointer. More... | |
virtual auto | toXML () const -> std::shared_ptr< library::XML > override |
Get an XML object represents the Entity. More... | |
![]() | |
FTFile (FTFolder *) | |
Construct from parent folder. More... | |
auto | getExtension () const -> std::string |
Get extension. More... | |
![]() | |
FTInstance (FTFolder *) | |
Construct from parent folder. More... | |
virtual auto | key () const -> std::string |
Get a key that can identify the Entity uniquely. More... | |
auto | getUID () const -> int |
Get uid. More... | |
auto | getParent () const -> FTFolder * |
Get parent folder. More... | |
auto | getName () const -> std::string |
Get name. More... | |
auto | getComment () const -> std::string |
Get comment. More... | |
![]() | |
Entity () | |
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 Attributes | |
NTFactory * | factory |
A factory and manager class for nam-tree. More... | |
NTParameterArray * | parameterArray |
Metadata of parameters. More... | |
NTFile * | otherside |
A file of otherside. More... | |
SideFunction | function |
A function pointer. More... | |
![]() | |
std::string | extension |
An extension of a file. More... | |
![]() | |
FTFolder * | parent |
Parent folder containing the instance. More... | |
int | uid |
Key, an unique id of file. More... | |
std::string | name |
Name of the file. More... | |
std::string | comment |
Comment of the file. 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... | |
Additional Inherited Members | |
![]() | |
virtual auto | TAG () const -> std::string |
A tag name when represented by XML. More... | |
A file archiving metadata of a function.
NTFile class is a FTFile archiving meta of a function which is used by a NTSide class. It may better to understand what NTFile is, if you consider the NTFile as a header of a function. Name, metadata of parameters and function pointer is archived on the NTFile.
Previous version of the Samchon Framework, NTFile class had a function script on the NTFile and Nam-Tree module compiled the script like Nam-Tree moudle of Flex standalone that is keeping the compiling method.
However, modern Samchon Framework's C++ NTFile class doesn't have a function script and does not compile. I don't know a way to compile a script in lots of operating systems, so I dropped the compiling method. Until update, NTFactory has function pointers in a Dictionary and NTFile reference them. Users must put own methods into the Dictionary by their hands.
I will solve the problem sooon. Until next generation of Samchon Framework, put your own function pointers to a Dictionary in NTFactory by your hand please. Sorry for my unripe skill on programming.
Definition at line 50 of file NTFile.hpp.
NTFile::NTFile | ( | NTFactory * | factory, |
library::FTFolder * | parent | ||
) |
Construct from factory and parent folder.
factory | A factory class creating nam-tree objects. |
folder | A parent folder of the NTFile. |
Definition at line 15 of file NTFile.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 |
Reimplemented from samchon::namtree::INTExplore.
Definition at line 23 of file NTFile.cpp.
References samchon::protocol::EntityGroup< _Container, _ETy, T >::construct(), parameterArray, and samchon::namtree::NTParameterArray::TAG().
auto NTFile::getParameterArray | ( | ) | const -> NTParameterArray* |
auto NTFile::getOtherside | ( | ) | const -> NTFile* |
auto NTFile::getFunction | ( | ) | const -> SideFunction |
Get function pointer.
Definition at line 38 of file NTFile.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::library::FTFile.
Definition at line 43 of file NTFile.cpp.
References samchon::library::FTInstance::key(), otherside, parameterArray, samchon::library::FTFile::toXML(), and samchon::protocol::EntityGroup< _Container, _ETy, T >::toXML().
|
protected |
A factory and manager class for nam-tree.
NTFile references NTFactory to find otherside file and function pointer.
Definition at line 65 of file NTFile.hpp.
Referenced by NTFile().
|
protected |
Metadata of parameters.
Definition at line 70 of file NTFile.hpp.
Referenced by construct(), getParameterArray(), and toXML().
|
protected |
A file of otherside.
The variable otherside is a pair of file which is inserted to a criteria's opposite side.
When the otherside is specified and you determine the NTFile to be contained in a NTSide, the NTCriteria owning the NTSide will determine opposite side's NTSide to have the otherside NTFile forcibly.
The determination will be automatic and unchangeble. Consider hardly when specifying an otherside.
Definition at line 86 of file NTFile.hpp.
Referenced by getOtherside(), NTFile(), and toXML().
|
protected |
A function pointer.
Definition at line 91 of file NTFile.hpp.