Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Member Functions | List of all members
om::scripting::mir::lang::BinaryExpression Class Reference

A class that represents a generic binary operator expression that operates on two expression operands. More...

#include <omScriptingMirExpressions.h>

Inheritance diagram for om::scripting::mir::lang::BinaryExpression:
om::scripting::mir::lang::Expression om::scripting::mir::lang::ASTNode

Public Member Functions

 BinaryExpression (OperatorType newOperatorType, const Shared< Expression > &newOperand1, const Shared< Expression > &newOperand2)
 Create a new binary expression object with the specified operator type and operand expressions. More...
 
OperatorType getOperatorType () const
 Return an object that represents the operator type of this binary expression. More...
 
const Shared< Expression > & getOperand1 () const
 Return a pointer to the first operand of this binary expression. More...
 
const Shared< Expression > & getOperand2 () const
 Return a pointer to the second operand of this binary expression. More...
 
- Public Member Functions inherited from om::scripting::mir::lang::Expression
Type getExpressionType () const
 Return the type of this expression. More...
 
- Public Member Functions inherited from om::scripting::mir::lang::ASTNode
 ASTNode ()
 Create a new AST node with no node position specified. More...
 
 ASTNode (const Position &newPosition)
 Create a new AST node which corresponds to a token starting at the specified source code position. More...
 
virtual ~ASTNode ()
 Destroy this AST node object. More...
 
const PositiongetPosition () const
 Return an object representing the position of this AST node in the source code. More...
 
void setPosition (const Position &newPosition)
 Set the position of this AST node in the source code. More...
 

Static Public Member Functions

static Shared< BinaryExpressionconstruct (OperatorType newOperatorType, const Shared< Expression > &newOperand1, const Shared< Expression > &newOperand2)
 Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments. More...
 

Additional Inherited Members

- Public Types inherited from om::scripting::mir::lang::Expression
enum  Type {
  LITERAL, UNARY, BINARY, NEW_ARRAY,
  NEW_OBJECT, CAST, FUNCTION_CALL, ARRAY_ACCESS,
  ISA, REFERENCE, VARIABLE_DECLARATION, RANGE
}
 An enum that specifies the different kinds of visiblity for member declarations. More...
 
- Protected Member Functions inherited from om::scripting::mir::lang::Expression
 Expression (Type newType)
 Create a new expression with the specified expression type enum value. More...
 

Detailed Description

A class that represents a generic binary operator expression that operates on two expression operands.

Constructor & Destructor Documentation

om::scripting::mir::lang::BinaryExpression::BinaryExpression ( OperatorType  newOperatorType,
const Shared< Expression > &  newOperand1,
const Shared< Expression > &  newOperand2 
)
inline

Create a new binary expression object with the specified operator type and operand expressions.

Member Function Documentation

OperatorType om::scripting::mir::lang::BinaryExpression::getOperatorType ( ) const
inline

Return an object that represents the operator type of this binary expression.

const Shared<Expression>& om::scripting::mir::lang::BinaryExpression::getOperand1 ( ) const
inline

Return a pointer to the first operand of this binary expression.

const Shared<Expression>& om::scripting::mir::lang::BinaryExpression::getOperand2 ( ) const
inline

Return a pointer to the second operand of this binary expression.

static Shared<BinaryExpression> om::scripting::mir::lang::BinaryExpression::construct ( OperatorType  newOperatorType,
const Shared< Expression > &  newOperand1,
const Shared< Expression > &  newOperand2 
)
inlinestatic

Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments.


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