top | up | prev | next

NodeFactory Class

Definition at line 136 of Node.hpp

Constructors

NodeFactory()
NodeFactory(const NodeFactory&) delete

Member Functions

Node* CreateNode(NodeType nodeType, const Span& span)
void Done() static
void Init() static
NodeFactory& Instance() static
void Register(NodeType nodeType, NodeCreator* creator)
NodeFactory& operator=(const NodeFactory&) delete

Member Variables

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

Constructor Details

NodeFactory Constructor

sngcm::ast::NodeFactory::NodeFactory()

Definition at line 196 of Node.cpp
Declaration at line 149 of Node.hpp


NodeFactory Constructor

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

Definition at line 139 of Node.hpp


Member Function Details

CreateNode Member Function

Node * sngcm::ast::NodeFactory::CreateNode(NodeType nodeType, const Span& span)

Definition at line 391 of Node.cpp

Called by: sngcm::ast::AstReader::ReadNode


Done Member Function

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

Definition at line 191 of Node.cpp :
192 {
193     instance.reset();
194 }


Declaration at line 143 of Node.hpp


Init Member Function

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

Definition at line 186 of Node.cpp :
187 {
188     instance.reset(new NodeFactory());
189 }


Declaration at line 142 of Node.hpp


Instance Member Function

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

Definition at line 141 of Node.hpp :
141 { Assert(instance"node factory not initialized"); return *instance; }

Called by: sngcm::ast::AstReader::ReadNode


Register Member Function

void sngcm::ast::NodeFactory::Register(NodeType nodeType, NodeCreator * creator)

Definition at line 386 of Node.cpp :
387 {
388     creators[static_cast<size_t>(nodeType)] = std::unique_ptr<NodeCreator>(creator);
389 }


Declaration at line 144 of Node.hpp


operator= Member Function

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

Definition at line 140 of Node.hpp


top | up | prev | next