Doxygen
ExprAstVariable类 参考

Class representing a variable in the AST 更多...

+ 类 ExprAstVariable 继承关系图:
+ ExprAstVariable 的协作图:

Public 成员函数

 ExprAstVariable (const QCString &name)
 
const QCStringname () const
 
virtual TemplateVariant resolve (TemplateContext *c)
 
- Public 成员函数 继承自 ExprAst
virtual ~ExprAst ()
 

Private 属性

QCString m_name
 

详细描述

Class representing a variable in the AST

在文件 template.cpp1686 行定义.

构造及析构函数说明

◆ ExprAstVariable()

ExprAstVariable::ExprAstVariable ( const QCString name)
inline

在文件 template.cpp1689 行定义.

1689  : m_name(name)
1690  { TRACE(("ExprAstVariable(%s)\n",name.data())); }

引用了 QCString::data(), name() , 以及 TRACE.

成员函数说明

◆ name()

const QCString& ExprAstVariable::name ( ) const
inline

在文件 template.cpp1691 行定义.

1691 { return m_name; }

引用了 m_name.

被这些函数引用 ExprAstVariable().

◆ resolve()

virtual TemplateVariant ExprAstVariable::resolve ( TemplateContext c)
inlinevirtual

重载 ExprAst .

在文件 template.cpp1692 行定义.

1693  {
1694  TemplateVariant v = c->get(m_name);
1695  TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
1696  if (!v.isValid())
1697  {
1698  if (ci) ci->warn(ci->templateName(),ci->line(),"undefined variable '%s' in expression",qPrint(m_name));
1699  }
1700  return v;
1701  }

引用了 TemplateContext::get(), TemplateVariant::isValid(), TemplateContextImpl::line(), m_name, qPrint(), TemplateContextImpl::templateName() , 以及 TemplateContextImpl::warn().

类成员变量说明

◆ m_name

QCString ExprAstVariable::m_name
private

在文件 template.cpp1703 行定义.

被这些函数引用 name() , 以及 resolve().


该类的文档由以下文件生成:
TemplateContextImpl::warn
void warn(const QCString &fileName, int line, const char *fmt,...) const
Definition: template.cpp:2773
ExprAstVariable::m_name
QCString m_name
Definition: template.cpp:1703
ExprAstVariable::name
const QCString & name() const
Definition: template.cpp:1691
TemplateContextImpl::line
int line() const
Definition: template.cpp:685
TemplateVariant
Variant type which can hold one value of a fixed set of types.
Definition: template.h:98
TRACE
#define TRACE(x)
Definition: template.cpp:40
TemplateContext::get
virtual TemplateVariant get(const QCString &name) const =0
Gets the value for a given key
TemplateVariant::isValid
constexpr bool isValid() const
Returns TRUE if the variant holds a valid value, or FALSE otherwise
Definition: template.h:203
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
QCString::data
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
Definition: qcstring.h:153
TemplateContextImpl
Internal class representing the implementation of a template context
Definition: template.cpp:640
TemplateContextImpl::templateName
QCString templateName() const
Definition: template.cpp:684