top | up | prev | next

NodeFactory Class

Definition at line 144 of Node.hpp

Constructors

NodeFactory()
NodeFactory(const NodeFactory&) delete

Member Functions

Node* CreateNode(NodeType nodeType, const Span& span, const boost::uuids::uuid& moduleId)
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 197 of Node.cpp
Declaration at line 157 of Node.hpp


NodeFactory Constructor

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

Definition at line 147 of Node.hpp


Member Function Details

CreateNode Member Function

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

Definition at line 396 of Node.cpp

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


Done Member Function

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

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


Declaration at line 151 of Node.hpp


Init Member Function

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

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


Declaration at line 150 of Node.hpp


Instance Member Function

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

Definition at line 149 of Node.hpp :
149 { 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 391 of Node.cpp :
392 {
393     creators[static_cast<size_t>(nodeType)] = std::unique_ptr<NodeCreator>(creator);
394 }


Declaration at line 152 of Node.hpp


operator= Member Function

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

Definition at line 148 of Node.hpp


top | up | prev | next