Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
TemplateNodeFactory Class Reference

Factory class for creating tag AST nodes found in a template. More...

Classes

class  AutoRegister
 Helper class for registering a template AST node. More...
 

Public Types

typedef TemplateNode *(* CreateFunc) (TemplateParser *parser, TemplateNode *parent, int line, const QCString &data)
 

Public Member Functions

TemplateNodecreate (const QCString &name, TemplateParser *parser, TemplateNode *parent, int line, const QCString &data)
 
void registerTemplateNode (const QCString &name, CreateFunc func)
 

Static Public Member Functions

static TemplateNodeFactoryinstance ()
 

Private Attributes

QDict< void > m_registry
 

Detailed Description

Factory class for creating tag AST nodes found in a template.

Definition at line 4270 of file template.cpp.

Member Typedef Documentation

typedef TemplateNode*(* TemplateNodeFactory::CreateFunc) (TemplateParser *parser, TemplateNode *parent, int line, const QCString &data)

Definition at line 4273 of file template.cpp.

Member Function Documentation

TemplateNode* TemplateNodeFactory::create ( const QCString name,
TemplateParser parser,
TemplateNode parent,
int  line,
const QCString data 
)
inline

Definition at line 4285 of file template.cpp.

4290  {
4291  if (m_registry.find(name)==0) return 0;
4292  return ((CreateFunc)m_registry[name])(parser,parent,line,data);
4293  }
static QCString name
Definition: declinfo.cpp:673
QDict< void > m_registry
Definition: template.cpp:4311
TemplateNode *(* CreateFunc)(TemplateParser *parser, TemplateNode *parent, int line, const QCString &data)
Definition: template.cpp:4273
void line(double t, double *p, double &x, double &y, double &z)
static TemplateNodeFactory* TemplateNodeFactory::instance ( )
inlinestatic

Definition at line 4278 of file template.cpp.

4279  {
4280  static TemplateNodeFactory *instance = 0;
4281  if (instance==0) instance = new TemplateNodeFactory;
4282  return instance;
4283  }
static TemplateNodeFactory * instance()
Definition: template.cpp:4278
Factory class for creating tag AST nodes found in a template.
Definition: template.cpp:4270
void TemplateNodeFactory::registerTemplateNode ( const QCString name,
CreateFunc  func 
)
inline

Definition at line 4295 of file template.cpp.

4296  {
4297  m_registry.insert(name,(void*)func);
4298  }
QDict< void > m_registry
Definition: template.cpp:4311
def func()
Definition: docstring.py:7

Member Data Documentation

QDict<void> TemplateNodeFactory::m_registry
private

Definition at line 4311 of file template.cpp.


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