My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Static Public Member Functions | List of all members
Operator Class Reference

Class representing operators that can appear in template expressions. More...

Public Types

enum  Type {
  Or, And, Not, In,
  Equal, NotEqual, Less, Greater,
  LessEqual, GreaterEqual, Plus, Minus,
  Multiply, Divide, Modulo, Filter,
  Colon, Comma, LeftParen, RightParen,
  Last
}
 

Static Public Member Functions

static const char * toString (Type op)
 

Detailed Description

Class representing operators that can appear in template expressions.

Definition at line 429 of file template.cpp.

Member Enumeration Documentation

Enumerator
Or 
And 
Not 
In 
Equal 
NotEqual 
Less 
Greater 
LessEqual 
GreaterEqual 
Plus 
Minus 
Multiply 
Divide 
Modulo 
Filter 
Colon 
Comma 
LeftParen 
RightParen 
Last 

Definition at line 444 of file template.cpp.

Member Function Documentation

static const char* Operator::toString ( Type  op)
inlinestatic

Definition at line 452 of file template.cpp.

References And, Colon, Comma, Divide, Equal, Filter, Greater, GreaterEqual, In, Last, LeftParen, Less, LessEqual, Minus, Modulo, Multiply, Not, NotEqual, Or, Plus, and RightParen.

Referenced by ExprAstBinary::ExprAstBinary(), ExprAstUnary::ExprAstUnary(), and ExpressionParser::parsePrimaryExpression().

{
switch(op)
{
case Or: return "or";
case And: return "and";
case Not: return "not";
case In: return "in";
case Equal: return "==";
case NotEqual: return "!=";
case Less: return "<";
case Greater: return ">";
case LessEqual: return "<=";
case GreaterEqual: return ">=";
case Plus: return "+";
case Minus: return "-";
case Multiply: return "*";
case Divide: return "/";
case Modulo: return "%";
case Filter: return "|";
case Colon: return ":";
case Comma: return ",";
case LeftParen: return "(";
case RightParen: return ")";
case Last: return "?";
}
return "?";
}

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