C# Class openABAP.Compiler.Compiler

central class of openABAP implementing following feauture: scanning and parsing the abap source file. creating an internal representation of the program using openABAP.Compiler.Command class. building the CIL file assembling the CIL file to EXE-assembly file. calling EXE-file
Exibir arquivo Open project: bi-tm/openABAP Class Usage Examples

Public Properties

Property Type Description
CurrentVisibility Visibility
ProgramName string
SourceFileInfo System.IO.FileInfo

Public Methods

Method Description
Compile ( ) : void

parsers the ABAP source fie and emits a CIL DLL file. the temporary source file is copied into respository

Compiler ( String filename ) : System

Initializes a new instance of the openABAP.Compiler.Compiler class.

DefineClass ( string name ) : void

initialises a new class definition by creating the System.Refelection.Emit.RypeBuilder

DefineField ( string name, TypeDescr type, bool isStatic ) : FieldBuilder
DefineMethod ( Coco t, bool isStatic ) : void

creates a MethodBuilder and stores is in this.mbList

DefineProgram ( string n ) : void

set program name and creates AssemblyBuilder, ModuleBuilder and debug Document

EmitCommand ( ExecutableCommand cmd ) : void
EndClass ( ) : void
EndMethod ( Coco t ) : void

at end the end of a method implementation we mus emit a RET command

GetErrors ( ) : string
GetVariable ( string name ) : IfVariable
ImplementClass ( string name ) : void

loads the TypeBuilder corresponding to the given name. The TypeBuilder is loaded in this.tb to implement it in following calls.

ImplementMethod ( Coco t ) : void

loads the TypeBuilder which was creted during class definition.

Run ( ) : void

starts the generated program. this means scanning all generated classes for a method named "Run" and invoke it.

Save ( ) : void

Method Details

Compile() public method

parsers the ABAP source fie and emits a CIL DLL file. the temporary source file is copied into respository
public Compile ( ) : void
return void

Compiler() public method

Initializes a new instance of the openABAP.Compiler.Compiler class.
public Compiler ( String filename ) : System
filename String Filename.
return System

DefineClass() public method

initialises a new class definition by creating the System.Refelection.Emit.RypeBuilder
public DefineClass ( string name ) : void
name string Name.
return void

DefineField() public method

public DefineField ( string name, TypeDescr type, bool isStatic ) : FieldBuilder
name string
type TypeDescr
isStatic bool
return System.Reflection.Emit.FieldBuilder

DefineMethod() public method

creates a MethodBuilder and stores is in this.mbList
public DefineMethod ( Coco t, bool isStatic ) : void
t Coco T.
isStatic bool
return void

DefineProgram() public method

set program name and creates AssemblyBuilder, ModuleBuilder and debug Document
public DefineProgram ( string n ) : void
n string N.
return void

EmitCommand() public method

public EmitCommand ( ExecutableCommand cmd ) : void
cmd ExecutableCommand
return void

EndClass() public method

public EndClass ( ) : void
return void

EndMethod() public method

at end the end of a method implementation we mus emit a RET command
public EndMethod ( Coco t ) : void
t Coco T.
return void

GetErrors() public method

public GetErrors ( ) : string
return string

GetVariable() public method

public GetVariable ( string name ) : IfVariable
name string
return IfVariable

ImplementClass() public method

loads the TypeBuilder corresponding to the given name. The TypeBuilder is loaded in this.tb to implement it in following calls.
public ImplementClass ( string name ) : void
name string Name.
return void

ImplementMethod() public method

loads the TypeBuilder which was creted during class definition.
public ImplementMethod ( Coco t ) : void
t Coco T.
return void

Run() public method

starts the generated program. this means scanning all generated classes for a method named "Run" and invoke it.
public Run ( ) : void
return void

Save() public method

public Save ( ) : void
return void

Property Details

CurrentVisibility public_oe property

public Visibility CurrentVisibility
return Visibility

ProgramName public_oe property

public string ProgramName
return string

SourceFileInfo public_oe property

public FileInfo,System.IO SourceFileInfo
return System.IO.FileInfo