Public Member Functions | Private Attributes | List of all members
ExprAstVariable Class Reference

Class representing a variable in the AST. More...

Inheritance diagram for ExprAstVariable:
ExprAst

Public Member Functions

 ExprAstVariable (const char *name)
 
const QCStringname () const
 
virtual TemplateVariant resolve (TemplateContext *c)
 
- Public Member Functions inherited from ExprAst
virtual ~ExprAst ()
 

Private Attributes

QCString m_name
 

Detailed Description

Class representing a variable in the AST.

Definition at line 1384 of file template.cpp.

Constructor & Destructor Documentation

ExprAstVariable::ExprAstVariable ( const char *  name)
inline

Definition at line 1387 of file template.cpp.

1387  : m_name(name)
1388  { TRACE(("ExprAstVariable(%s)\n",name)); }
QCString m_name
Definition: template.cpp:1401
#define TRACE(x)
Definition: template.cpp:43
const QCString & name() const
Definition: template.cpp:1389

Member Function Documentation

const QCString& ExprAstVariable::name ( ) const
inline

Definition at line 1389 of file template.cpp.

1389 { return m_name; }
QCString m_name
Definition: template.cpp:1401
virtual TemplateVariant ExprAstVariable::resolve ( TemplateContext c)
inlinevirtual

Reimplemented from ExprAst.

Definition at line 1390 of file template.cpp.

1391  {
1392  TemplateVariant v = c->get(m_name);
1393  TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
1394  if (!v.isValid())
1395  {
1396  if (ci) ci->warn(ci->templateName(),ci->line(),"undefined variable '%s' in expression",m_name.data());
1397  }
1398  return v;
1399  }
Internal class representing the implementation of a template context.
Definition: template.cpp:511
QCString m_name
Definition: template.cpp:1401
int line() const
Definition: template.cpp:543
const char * data() const
Definition: qcstring.h:207
bool isValid() const
Definition: template.h:161
Variant type which can hold one value of a fixed set of types.
Definition: template.h:90
virtual TemplateVariant get(const QCString &name) const =0
void warn(const char *fileName, int line, const char *fmt,...) const
Definition: template.cpp:2431
QCString templateName() const
Definition: template.cpp:542

Member Data Documentation

QCString ExprAstVariable::m_name
private

Definition at line 1401 of file template.cpp.


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