top | up | prev | next

NodeFactory Class

Definition at line 110 of Node.hpp

Constructors

NodeFactory()
NodeFactory(NodeFactory&&) delete
NodeFactory(const NodeFactory&) delete

Member Functions

Node* CreateNode(NodeType nodeType)
void Done() static
void Init() static
NodeFactory& Instance() static
NodeFactory& operator=(NodeFactory&&) delete
NodeFactory& operator=(const NodeFactory&) delete

Member Variables

std::vector<std::unique_ptr<NodeCreator>> creators
std::unique_ptr<NodeFactory> instance static

Constructor Details

NodeFactory Constructor

sngcpp::ast::NodeFactory::NodeFactory()

Definition at line 179 of Node.cpp
Declaration at line 113 of Node.hpp


NodeFactory Constructor

sngcpp::ast::NodeFactory::NodeFactory(NodeFactory &&) delete

Definition at line 115 of Node.hpp


NodeFactory Constructor

sngcpp::ast::NodeFactory::NodeFactory(const NodeFactory &) delete

Definition at line 114 of Node.hpp


Member Function Details

CreateNode Member Function

Node * sngcpp::ast::NodeFactory::CreateNode(NodeType nodeType)

Definition at line 303 of Node.cpp :
304 {
305     NodeCreator* creator = creators[static_cast<int>(nodeType)].get();
306     return creator->Create();
307 }


Declaration at line 121 of Node.hpp

Calls: sngcpp::ast::NodeCreator::Create

Called by: sngcpp::ast::Reader::ReadNode


Done Member Function

void sngcpp::ast::NodeFactory::Done() static

Definition at line 169 of Node.cpp :
170 {
171     instance.reset();
172 }


Declaration at line 119 of Node.hpp


Init Member Function

void sngcpp::ast::NodeFactory::Init() static

Definition at line 164 of Node.cpp :
165 {
166     instance.reset(new NodeFactory());
167 }


Declaration at line 118 of Node.hpp


Instance Member Function

NodeFactory & sngcpp::ast::NodeFactory::Instance() static

Definition at line 174 of Node.cpp :
175 {
176     return *instance;
177 }


Declaration at line 120 of Node.hpp

Called by: sngcpp::ast::Reader::ReadNode


operator= Member Function

NodeFactory & sngcpp::ast::NodeFactory::operator=(NodeFactory &&) delete

Definition at line 117 of Node.hpp


operator= Member Function

NodeFactory & sngcpp::ast::NodeFactory::operator=(const NodeFactory &) delete

Definition at line 116 of Node.hpp


top | up | prev | next