Nitro.LessThanOrEqualOperation Class Reference

Detailed Description

Represents the less than or equal (A<=B) operation.

Inheritance diagram for Nitro.LessThanOrEqualOperation:
Nitro.Operation Nitro.CompiledFragment Nitro.CodeFragment

Public Member Functions

 LessThanOrEqualOperation (CompiledMethod method, CompiledFragment input0, CompiledFragment input1)
 
override Type OutputType (out CompiledFragment v)
 Returns the type that this fragment produces when it's executed. For example, int+int will output another int. More...
 
override void OutputIL (NitroIL into)
 Generates the IL of this operation into the given stream. More...
 
- Public Member Functions inherited from Nitro.Operation
 Operation (CompiledMethod method)
 Creates a new operation that is part of the given method. More...
 
override int GetLineNumber ()
 Gets the line number if there is one. More...
 
override bool IsConstant ()
 Checks if this fragment is a constant value. More...
 
bool IsSet ()
 Checks if this operation is part of a set operation. More...
 
Type EnforceType (ref CompiledFragment input, Type inputType, Type newType)
 Forces this operation to be a particular type by creating a cast. More...
 
Type Numerical (ref CompiledFragment input, Type inputType, Type defaultType)
 Forces this operation to have a numerical output. More...
 
Type Numerical (Type typeA, Type typeB, string overloadMethod, ref CompiledFragment newOperation)
 Attempts to find the named numerical operation that the given types can perform. More...
 
Type MapNumerical (Type typeA, Type typeB)
 Attempts to make both Input0 and Input1 numerical, returning the output result of an operation if they are. Usually the returned type will be the one with higher accuracy. E.g. adding an int to a long will result in a long. More...
 
Type FindOverload (string methodName, Type typeA, Type typeB, ref CompiledFragment newOperation)
 Looks for an overloaded numerical operator by the given name (e.g. "Addition"). The name will then have op_ appended to the start of it (as used internally by .NET). If found, the output type of the operation is returned. More...
 
- Public Member Functions inherited from Nitro.CompiledFragment
 CompiledFragment ()
 An empty constructor used for inheriting this class. More...
 
object ActiveValue ()
 Gets the active value of this fragment. More...
 
 CompiledFragment (object value)
 Creates a new compiled fragment for the given constant value. More...
 
bool IsLogical ()
 Checks if this fragment can be used logically. More...
 
Type OutputType ()
 Returns the type that this fragment produces when it's executed. For example, int+int will output another int. This must only be used when it's known that a fragment won't replace itself. More...
 
override CompiledFragment Compile (CompiledMethod method)
 Compiles this CodeFragment into a CompiledFragment. More...
 
void EmitValue (Type type, NitroIL into)
 Emits the Value held by this compiled fragment if possible. More...
 
- Public Member Functions inherited from Nitro.CodeFragment
void Error (string message)
 Throws an error, outputting the line number it occured on. More...
 
virtual bool IsMemberAccessor ()
 A value which states if this fragment accesses members (methods/fields) of something. More...
 
void AddToStart (CodeFragment parent)
 Adds this code fragment to the beginning of the given parents child set. More...
 
void AddBefore (CodeFragment frag)
 Adds this code fragment as a child before the given one. More...
 
void AddAfter (CodeFragment frag)
 Adds this code fragment as a child after the given one. More...
 
void Remove ()
 Removes this fragment from its parent. More...
 
void AddChild (CodeFragment child)
 Adds the given fragment as a child of this one. More...
 
virtual bool Typeable ()
 Defines if a fragment can be given a :TYPE. E.g. Brackets (for casting, (A):TYPE) and variables can. More...
 
int ChildCount ()
 How many children does this fragment have? More...
 
virtual AddResult AddTo (CodeFragment to, CodeLexer sr)
 Adds this fragment as a child to the given fragment. It may be overriden by some types of fragment as they may wish to handle it differently. More...
 
override string ToString ()
 Converts this fragment into a code string. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Nitro.CodeFragment
static int IsOfType (char[] arrayToSearch, char charToFind)
 Returns the index in the given array of the given character if it's found in it. More...
 
- Public Attributes inherited from Nitro.Operation
int LineNumber =-1
 The line number this operation originates from. More...
 
CompiledMethod Method
 The method that this operation belongs to. More...
 
CompiledFragment Input0
 The first input to this operation. Often the input to the left of an operator. Input0+Input1. More...
 
CompiledFragment Input1
 The second input to this operation. Often the input to the right of an operator. Input0+Input1. More...
 
- Properties inherited from Nitro.Operation
virtual bool RequiresStoring [get]
 This operation requires you "storing" its output. A variable does; for(){} does not. More...
 

Constructor & Destructor Documentation

Nitro.LessThanOrEqualOperation.LessThanOrEqualOperation ( CompiledMethod  method,
CompiledFragment  input0,
CompiledFragment  input1 
)
inline

Member Function Documentation

override void Nitro.LessThanOrEqualOperation.OutputIL ( NitroIL  into)
inlinevirtual

Generates the IL of this operation into the given stream.

Parameters
intoThe IL stream to output the IL into

Reimplemented from Nitro.CompiledFragment.

override Type Nitro.LessThanOrEqualOperation.OutputType ( out CompiledFragment  v)
inlinevirtual

Returns the type that this fragment produces when it's executed. For example, int+int will output another int.

Parameters
vIn some cases, checking the output type will generate a new fragment. This value is the new fragment and it must always replace the original fragment that OutputType was called on.
Returns
The type that this fragment returns.

Reimplemented from Nitro.CompiledFragment.