Samchon Framework for CPP
1.0.0
|
A factory for Nam-Tree objects. More...
#include <NTFactory.hpp>
Public Member Functions | |
NTFactory (NTEntityGroup *) | |
Construct from historical(studying) data. More... | |
virtual auto | createCriteria (NTCriteria *, std::shared_ptr< library::XML >) -> NTCriteria * |
Factory method of a NTCriteria. More... | |
virtual auto | createSide (std::shared_ptr< library::XML >) -> NTSide * |
Factory method of a NTSide. More... | |
![]() | |
FTFactory () | |
Default Constructor. More... | |
virtual auto | createFile (FTFolder *, std::shared_ptr< XML >) -> FTFile *=0 |
Factory method of a file. More... | |
void | registerInstance (FTInstance *) |
Register file instance to map. More... | |
Protected Attributes | |
NTEntityGroup * | data |
A entity gorup containing historical data. More... | |
Dictionary< SideFunction > | sideFunctionMap |
A dictionary of function pointers. More... | |
![]() | |
int | application |
An application id. More... | |
int | category |
A categori id. More... | |
std::string | member |
Account id of a member. More... | |
Map< int, FTInstance * > | instanceMap |
Map of files. More... | |
A factory for Nam-Tree objects.
NTFactory class is a FTFactory and an abstract class creating and managing Nam-Tree objects. When overriding nam-tree module, do not override methods createChild() of file or criteria objects like NTFile, NTCriteria and NTSide. Only overrides method of creation in the NTFactory.
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 52 of file NTFactory.hpp.
NTFactory::NTFactory | ( | NTEntityGroup * | data | ) |
Construct from historical(studying) data.
entity | A group of history data. |
Definition at line 13 of file NTFactory.cpp.
References data.
|
virtual |
Factory method of a NTCriteria.
parent | A parent NTCriteria object xml An xml object for discriminating type. |
Definition at line 26 of file NTFactory.cpp.
Referenced by samchon::namtree::NTCriteria::createChild().
|
virtual |
Factory method of a NTSide.
xml | An xml oject for distriminating type. |
Definition at line 30 of file NTFactory.cpp.
|
protected |
A entity gorup containing historical data.
Definition at line 64 of file NTFactory.hpp.
Referenced by NTFactory().
|
protected |
A dictionary of function pointers.
Definition at line 69 of file NTFactory.hpp.