Samchon Framework for CPP  1.0.0
samchon::namtree::NTFactory Class Reference

A factory for Nam-Tree objects. More...

#include <NTFactory.hpp>

Collaboration diagram for samchon::namtree::NTFactory:

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...
 
- Public Member Functions inherited from samchon::library::FTFactory
 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

NTEntityGroupdata
 A entity gorup containing historical data. More...
 
Dictionary< SideFunction > sideFunctionMap
 A dictionary of function pointers. More...
 
- Protected Attributes inherited from samchon::library::FTFactory
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...
 

Detailed Description

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.

  • Creator method of history data is not in NTFactory. It must be done by hand of user.
namtree_criteria.png
namtree_file.png
Note

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.

See also
samchon::namtree
Author
Jeongho Nam http://samchon.org

Definition at line 52 of file NTFactory.hpp.

Constructor & Destructor Documentation

NTFactory::NTFactory ( NTEntityGroup data)

Construct from historical(studying) data.

Parameters
entityA group of history data.

Definition at line 13 of file NTFactory.cpp.

References data.

Member Function Documentation

auto NTFactory::createCriteria ( NTCriteria ,
std::shared_ptr< library::XML  
) -> NTCriteria*
virtual

Factory method of a NTCriteria.

Parameters
parentA parent NTCriteria object xml An xml object for discriminating type.
Returns
A NTCrteria object representing a logical conditional.

Definition at line 26 of file NTFactory.cpp.

Referenced by samchon::namtree::NTCriteria::createChild().

Here is the caller graph for this function:

auto NTFactory::createSide ( std::shared_ptr< library::XML ) -> NTSide*
virtual

Factory method of a NTSide.

Parameters
xmlAn xml oject for distriminating type.
Returns
A NTSide object which means a side of a logical condition.

Definition at line 30 of file NTFactory.cpp.

Member Data Documentation

NTEntityGroup* samchon::namtree::NTFactory::data
protected

A entity gorup containing historical data.

Definition at line 64 of file NTFactory.hpp.

Referenced by NTFactory().

Dictionary<SideFunction> samchon::namtree::NTFactory::sideFunctionMap
protected

A dictionary of function pointers.

Definition at line 69 of file NTFactory.hpp.


The documentation for this class was generated from the following files: