In file operators.h:

class Operation : public ExprTree

Represents a node of the expression tree which is an operation applied to expression operands

Inheritance:

Operation < ExprTree


Public Classes

enum OpKind
List of supported operators
__NO_OP__
No op
Strict comparison operators
LESS_THAN_OP
Less than operator
LESS_OR_EQUAL_OP
Less or equal
NOT_EQUAL_OP
Not equal
EQUAL_OP
Equal
GREATER_OR_EQUAL_OP
Greater or equal
GREATER_THAN_OP
Greater than
Non-strict comparison operators
META_EQUAL_OP
Meta-equal (same as IS)
IS_OP
Is
META_NOT_EQUAL_OP
Meta-not-equal (same as ISNT)
ISNT_OP
Isnt
Arithmetic operators
UNARY_PLUS_OP
Unary plus
UNARY_MINUS_OP
Unary minus
ADDITION_OP
Addition
SUBTRACTION_OP
Subtraction
MULTIPLICATION_OP
Multiplication
DIVISION_OP
Division
MODULUS_OP
Modulus
Logical operators
LOGICAL_NOT_OP
Logical not
LOGICAL_OR_OP
Logical or
LOGICAL_AND_OP
Logical and
Bitwise operators
BITWISE_NOT_OP
Bitwise not
BITWISE_OR_OP
Bitwise or
BITWISE_XOR_OP
Bitwise xor
BITWISE_AND_OP
Bitwise and
LEFT_SHIFT_OP
Left shift
RIGHT_SHIFT_OP
Right shift
URIGHT_SHIFT_OP
Unsigned right shift
Miscellaneous operators
PARENTHESES_OP
Parentheses
SUBSCRIPT_OP
Subscript
TERNARY_OP
Conditional op

Public Methods

virtual Operation* Copy( )
Make a deep copy of the expression
void GetComponents( OpKind&, ExprTree*&, ExprTree*&, ExprTree *& )
Deconstructor to obtain the components of an operation node
static bool IsStrictOperator( OpKind )
Predicate which tests if an operator is strict
static Operation* MakeOperation(OpKind kind, ExprTree*e1=NULL, ExprTree*e2=NULL, ExprTree*e3=NULL)
Factory method to create an operation expression node
static void Operate(OpKind op, Value &op1, Value &op2, Value &result)
Convenience method which operates on binary operators
static void Operate(OpKind op, Value &op1, Value &op2, Value &op3, Value &result)
Convenience method which operates on ternary operators
static int PrecedenceLevel( OpKind )
Gets the precedence level of an operator
~Operation()
Destructor

Public

enum OpKind
List of supported operators
__NO_OP__
No op
Strict comparison operators
LESS_THAN_OP
Less than operator
LESS_OR_EQUAL_OP
Less or equal
NOT_EQUAL_OP
Not equal
EQUAL_OP
Equal
GREATER_OR_EQUAL_OP
Greater or equal
GREATER_THAN_OP
Greater than
Non-strict comparison operators
META_EQUAL_OP
Meta-equal (same as IS)
IS_OP
Is
META_NOT_EQUAL_OP
Meta-not-equal (same as ISNT)
ISNT_OP
Isnt
Arithmetic operators
UNARY_PLUS_OP
Unary plus
UNARY_MINUS_OP
Unary minus
ADDITION_OP
Addition
SUBTRACTION_OP
Subtraction
MULTIPLICATION_OP
Multiplication
DIVISION_OP
Division
MODULUS_OP
Modulus
Logical operators
LOGICAL_NOT_OP
Logical not
LOGICAL_OR_OP
Logical or
LOGICAL_AND_OP
Logical and
Bitwise operators
BITWISE_NOT_OP
Bitwise not
BITWISE_OR_OP
Bitwise or
BITWISE_XOR_OP
Bitwise xor
BITWISE_AND_OP
Bitwise and
LEFT_SHIFT_OP
Left shift
RIGHT_SHIFT_OP
Right shift
URIGHT_SHIFT_OP
Unsigned right shift
Miscellaneous operators
PARENTHESES_OP
Parentheses
SUBSCRIPT_OP
Subscript
TERNARY_OP
Conditional op

Protected Methods

Operation()
Constructor

Inherited from ExprTree:

Public Classes

enum NodeKind
LITERAL_NODE
Literal node (string, integer, real, boolean, undefined, error)
ATTRREF_NODE
Attribute reference node (attr, .attr, expr.attr)
OP_NODE
Expression operation node (unary, binary, ternary)/
FN_CALL_NODE
Function call node
CLASSAD_NODE
ClassAd node
EXPR_LIST_NODE
Expression list node

Public Methods

NodeKind GetKind(void)
const ClassAd* GetParentScope( )
void Puke( )
void SetParentScope( const ClassAd* p )

Public

enum NodeKind
LITERAL_NODE
Literal node (string, integer, real, boolean, undefined, error)
ATTRREF_NODE
Attribute reference node (attr, .attr, expr.attr)
OP_NODE
Expression operation node (unary, binary, ternary)/
FN_CALL_NODE
Function call node
CLASSAD_NODE
ClassAd node
EXPR_LIST_NODE
Expression list node

Documentation

Represents a node of the expression tree which is an operation applied to expression operands
Strict comparison operators

Non-strict comparison operators

Arithmetic operators

Logical operators

Bitwise operators

Miscellaneous operators

static Operation* MakeOperation(OpKind kind, ExprTree*e1=NULL, ExprTree*e2=NULL, ExprTree*e3=NULL)
Factory method to create an operation expression node
Returns:
The constructed operation
Parameters:
kind - The kind of operation.
e1 - The first sub-expression child of the node.
e2 - The second sub-expression child of the node (if any).
e3 - The third sub-expression child of the node (if any).

void GetComponents( OpKind&, ExprTree*&, ExprTree*&, ExprTree *& )
Deconstructor to obtain the components of an operation node
Parameters:
kind - The kind of operation.
e1 - The first sub-expression child of the node.
e2 - The second sub-expression child of the node (if any).
e3 - The third sub-expression child of the node (if any).

static void Operate(OpKind op, Value &op1, Value &op2, Value &result)
Convenience method which operates on binary operators
Parameters:
op - The kind of operation.
op1 - The first operand.
op2 - The second operand.
result - The result of the operation.
See Also:
OpKind, Value

static void Operate(OpKind op, Value &op1, Value &op2, Value &op3, Value &result)
Convenience method which operates on ternary operators
Parameters:
op - The kind of operation.
op1 - The first operand.
op2 - The second operand.
op3 - The third operand.
result - The result of the operation.
See Also:
OpKind, Value

static bool IsStrictOperator( OpKind )
Predicate which tests if an operator is strict
Returns:
true if the operator is strict, false otherwise.
Parameters:
op - The operator to be tested.

static int PrecedenceLevel( OpKind )
Gets the precedence level of an operator. Higher precedences get higher values. (See K&R, p.53)
Returns:
The precedence level of the operator.
Parameters:
op - The operator to get the precedence of


This class has no child classes.

alphabetic index hierarchy of classes


Condor Home Page

generated by doc++