My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
ExprAstUnary Class Reference
Inheritance diagram for ExprAstUnary:
ExprAst

Public Member Functions

 ExprAstUnary (Operator::Type op, ExprAst *exp)
 
 ~ExprAstUnary ()
 
virtual TemplateVariant resolve (TemplateContext *c)
 
- Public Member Functions inherited from ExprAst
virtual ~ExprAst ()
 

Private Attributes

Operator::Type m_operator
 
ExprAstm_exp
 

Detailed Description

Definition at line 1574 of file template.cpp.

Constructor & Destructor Documentation

ExprAstUnary::ExprAstUnary ( Operator::Type  op,
ExprAst exp 
)
inline

Definition at line 1577 of file template.cpp.

References Operator::toString(), and TRACE.

: m_operator(op), m_exp(exp)
{ TRACE(("ExprAstUnary %s\n",Operator::toString(op))); }
ExprAstUnary::~ExprAstUnary ( )
inline

Definition at line 1579 of file template.cpp.

References m_exp.

{ delete m_exp; }

Member Function Documentation

virtual TemplateVariant ExprAstUnary::resolve ( TemplateContext c)
inlinevirtual

Reimplemented from ExprAst.

Definition at line 1580 of file template.cpp.

References m_exp, m_operator, Operator::Minus, ExprAst::resolve(), and TemplateVariant::toInt().

{
switch (m_operator)
{
return -exp.toInt();
default:
return TemplateVariant();
}
}

Member Data Documentation

ExprAst* ExprAstUnary::m_exp
private

Definition at line 1593 of file template.cpp.

Referenced by resolve(), and ~ExprAstUnary().

Operator::Type ExprAstUnary::m_operator
private

Definition at line 1592 of file template.cpp.

Referenced by resolve().


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