1 #ifndef INC_ASTFactory_hpp__ 2 #define INC_ASTFactory_hpp__ 19 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE 59 void registerFactory(
int type,
const char* ast_name,
factory_type factory );
61 void setMaxNodeType(
int type );
109 void setASTNodeFactory(
const char* factory_node_name,
factory_type factory );
111 #ifdef ANTLR_SUPPORT_XML 123 #ifdef ANTLR_VECTOR_HAS_AT 124 inline RefAST getNodeOfType(
unsigned int type )
127 return RefAST(nodeFactories.at(type)->second());
130 const char* getASTNodeType(
unsigned int type )
132 return nodeFactories.at(type)->first;
135 factory_type getASTNodeFactory(
unsigned int type )
137 return nodeFactories.at(type)->second;
142 return RefAST(nodeFactories[type]->second());
147 return nodeFactories[type]->first;
151 return nodeFactories[type]->second;
161 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE 165 #endif //INC_ASTFactory_hpp__ factory_type_ factory_type
Definition: ASTFactory.hpp:38
Definition: ANTLRException.hpp:15
std ::vector< factory_descriptor_ *> factory_descriptor_list_
Definition: ASTFactory.hpp:26
factory_descriptor default_factory_descriptor
Definition: ASTFactory.hpp:44
std ::pair< const char *, factory_type_ > factory_descriptor_
Definition: ASTFactory.hpp:25
Definition: ASTArray.hpp:23
#define ANTLR_API
Definition: config.hpp:22
const char * getASTNodeType(unsigned int type)
get the name of the node 'type'
Definition: ASTFactory.hpp:145
factory_type getASTNodeFactory(unsigned int type)
Definition: ASTFactory.hpp:149
Definition: ASTFactory.hpp:36
factory_descriptor_list_ factory_descriptor_list
Definition: ASTFactory.hpp:40
ASTRefCount< AST > RefAST
Definition: ASTRefCount.hpp:92
Definition: ASTPair.hpp:26
RefAST(* factory_type_)()
Definition: ASTFactory.hpp:24
#define ANTLR_USE_NAMESPACE(_x_)
Definition: config.hpp:18
RefAST getNodeOfType(unsigned int type)
Definition: ASTFactory.hpp:140
factory_descriptor_list nodeFactories
Definition: ASTFactory.hpp:45
factory_descriptor_ factory_descriptor
Definition: ASTFactory.hpp:39