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

A class that represents the type of a Mir language operator. More...

#include <omScriptingMirOperatorType.h>

Public Types

enum  Enum {
  ISA, CAST, NEW, ADD,
  ADD_ASSIGN, SUBTRACT, SUBTRACT_ASSIGN, MULTIPLY,
  MULTIPLY_ASSIGN, DIVIDE, DIVIDE_ASSIGN, MODULUS,
  MODULUS_ASSIGN, POWER, ASSIGN, AND,
  AND_ASSIGN, OR, OR_ASSIGN, XOR,
  XOR_ASSIGN, IDENTICAL, NOT_IDENTICAL, EQUAL,
  NOT_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL, GREATER_THAN,
  GREATER_THAN_OR_EQUAL, POSITIVE, INCREMENT, NEGATIVE,
  DECREMENT, NOT, HASH, STRINGIFY,
  COPY, ARRAY_ACCESS, FUNCTION_CALL
}
 An enum that specifies the different kinds of operators in the Mir language. More...
 

Public Member Functions

 OperatorType (Enum newType)
 Create a new operator type with the specified operator type enum value. More...
 
Bool isUnary () const
 Return whether or not this operator type represents an operator with only one expression operand. More...
 
Bool isPrefixUnary () const
 Return whether or not this operator type represents a unary operator that is a prefix operator. More...
 
Bool isPostfixUnary () const
 Return whether or not this operator type represents a unary operator that is a postfix operator. More...
 
Bool isBinary () const
 Return whether or not this operator type represents an operator with two expression operands. More...
 
String getSpelling () const
 Return the string spelling of this operator. More...
 
 operator Enum () const
 Convert this operator type to an enum value. More...
 

Detailed Description

A class that represents the type of a Mir language operator.

Member Enumeration Documentation

An enum that specifies the different kinds of operators in the Mir language.

Enumerator
ISA 

An operator that determines inheritance relationships.

CAST 

A keyword used as an operator when casting from one type to another.

NEW 

A keyword used as an operator when creating new objects.

ADD 

The + operator, used when adding two operands.

ADD_ASSIGN 

The += operator, used when adding an operand to another and overwriting the first operand.

SUBTRACT 

The - operator, used when subtracting two operands.

SUBTRACT_ASSIGN 

The -= operator, used when subtracting an operand from another and overwriting the first operand.

MULTIPLY 

The * operator, used when multiplying two operands.

MULTIPLY_ASSIGN 

The *= operator, used when multiplying an operand with another and overwriting the first operand.

DIVIDE 

The * operator, used when dividing two operands.

DIVIDE_ASSIGN 

The *= operator, used when dividing an operand with another and overwriting the first operand.

MODULUS 

The % operator, used when computing the modulus two operands.

MODULUS_ASSIGN 

The %= operator, used when computing the modulus two operands and overwriting the first operand.

POWER 

The ^ operator, used when raising one operand to the power of another.

ASSIGN 

The = operator, used when assigning one operand to another.

AND 

The && operator, used when computing the logical AND of two operands.

AND_ASSIGN 

The &= operator, used when computing the logical AND of two operands and overwriting the first operand.

OR 

The || operator, used when computing the logical OR of two operands.

OR_ASSIGN 

The |= operator, used when computing the logical OR of two operands and overwriting the first operand.

XOR 

The ^^ operator, used when computing the logical XOR of two operands.

XOR_ASSIGN 

The ^= operator, used when computing the logical XOR of two operands and overwriting the first operand.

IDENTICAL 

The === operator, used when comparing to see if two operands are the same object.

NOT_IDENTICAL 

The !== operator, used when comparing to see if two operands are not the same object.

EQUAL 

The == operator, used when comparing to see if two operands are logically the same.

NOT_EQUAL 

The != operator, used when comparing to see if two operands are not logically the same.

LESS_THAN 

The < operator, used when comparing to see if one operand is less than another.

LESS_THAN_OR_EQUAL 

The <= operator, used when comparing to see if one operand is less than or equal to another.

GREATER_THAN 

The > operator, used when comparing to see if one operand is greater than another.

GREATER_THAN_OR_EQUAL 

The >= operator, used when comparing to see if one operand is greater than or equal to another.

POSITIVE 

The redundant + operator, used when specifying a positive value.

INCREMENT 

The ++ operator, used when incrementing an operand by one.

NEGATIVE 

The negation - operator, used when flipping the sign of a value.

DECREMENT 

The – operator, used when decrementing an operand by one.

NOT 

The unary ! operator, used when computing the logical not of an operand.

HASH 

The unary # operator, used when computing a hash code for an operand.

STRINGIFY 

The unary $ operator, used when computing a string representation for an operand.

COPY 

A keyword used as an operator when copying objects.

ARRAY_ACCESS 

The operator used when accessing an index in an array.

FUNCTION_CALL 

The operator used when calling a function using parenthesized arguments.

Constructor & Destructor Documentation

om::scripting::mir::lang::OperatorType::OperatorType ( Enum  newType)
inline

Create a new operator type with the specified operator type enum value.

Member Function Documentation

Bool om::scripting::mir::lang::OperatorType::isUnary ( ) const

Return whether or not this operator type represents an operator with only one expression operand.

Bool om::scripting::mir::lang::OperatorType::isPrefixUnary ( ) const

Return whether or not this operator type represents a unary operator that is a prefix operator.

Bool om::scripting::mir::lang::OperatorType::isPostfixUnary ( ) const

Return whether or not this operator type represents a unary operator that is a postfix operator.

Bool om::scripting::mir::lang::OperatorType::isBinary ( ) const

Return whether or not this operator type represents an operator with two expression operands.

String om::scripting::mir::lang::OperatorType::getSpelling ( ) const

Return the string spelling of this operator.

om::scripting::mir::lang::OperatorType::operator Enum ( ) const
inline

Convert this operator type to an enum value.


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