gmslAPI  0.1
gmslAPI: An API for Developing Upgrade Solutions using Great Migrations Technology
gmslLibrary.Services.Runtime Class Reference

The Runtime class contains various middle level services implemented within the main translation tool. More...

Static Public Member Functions

static void AuthorCode (int codeStart, int codeEnd)
 The AuthorCode method authors the code stored within a specified range of the global code block using the currently active target dialect. The result is written to the currently active output stream. More...
 
static void AuthorLibrary (int projectRoot)
 The AuthorLibrary method authors the library description file for a compiled VB6 code. This description file is then used to describe the project to other codes that reference it. More...
 
static string GetAuthorCode (int codeStart, int codeEnd)
 The GetAuthorCode method authors the code stored within a specified range of the global code block using the currently active target dialect. The result is returned. More...
 
static int CallHandler (int target, EventType context, int iStart, int iRefer)
 The CallHandler method calls a gmSL event handler method that is associated with a component when its HasCodeHandler property is true. More...
 
static void ConstDeclare ()
 The ConstDeclare method authors the actual declarations of the VB6 "Const" defined constants. More...
 
static string DefineConstants ()
 The DefineConstants method is used by the translation tool to add a semi-colon delimited list of VB6 "#const" defined constants into the "DefineConstants" attribute of the project file. More...
 
static string GetSpecialName (int iRoot, string specialName)
 The GetSpecialName method is called by the declarations author when it needs an "InterfaceName" name for some target component. This method attempts to call a "GetSpecialName" handler only if the "migRuntime" property of the target component has bits set that corresponds to one of the loaded runtime codes. More...
 
static void InitializeCode ()
 The InitializeCode method authors the designer initialization code for the controls associated with the current project class being authored More...
 
static void Interface ()
 The Interface method authors the interface associated with the current project class being authored. More...
 
static void InterfaceClasses (string pathname)
 The InterfaceClasses method scans a directory for "cs" files and then authors "Compile Include" directives for them for inclusion in the project file currently being authored. More...
 
static void InterfaceEntry (int iRoot)
 The InterfaceEntry method authors the actual declaration interface entry for a specified component. More...
 
static void ProjectInfo (int projectRoot)
 The ProjectInfo method is called immediately before the Assembly file associated with a code project is authored. It sets the various names and assembly file values as needed. More...
 
static void ProjectAssembly (int projectRoot)
 The ProjectAssembly method authors the assembly file for a specified code project. More...
 
static string PropertyValue (int objRoot, int propAddr)
 The PropertyValue method authors the code segment stored within the property bag code block for a control that specifies the value of a specified property. More...
 
static void TargetCode (int iRoot, int projectRoot, bool authored)
 The TargetCode method authors the target code in the currently selected target dialect for a code file: Form, Class, or Module. This can include both designer code and executable code. More...
 
static void FinishTranslation (string project, int commands)
 The Finish translation method id the last method called when authoring a code project. It authors the migration and reference support code and wrappers needed, performs author fixes on the internal text buffers, and wites those buffers to the translation bundle file. More...
 

Detailed Description

The Runtime class contains various middle level services implemented within the main translation tool.

Member Function Documentation

◆ AuthorCode()

static void gmslLibrary.Services.Runtime.AuthorCode ( int  codeStart,
int  codeEnd 
)
static

The AuthorCode method authors the code stored within a specified range of the global code block using the currently active target dialect. The result is written to the currently active output stream.

Parameters
codeStartThe codeStart parameter specifies the starting code offset to be authored.
codeEndThe codeEnd parameter specifies the ending code offset to be authored.

◆ AuthorLibrary()

static void gmslLibrary.Services.Runtime.AuthorLibrary ( int  projectRoot)
static

The AuthorLibrary method authors the library description file for a compiled VB6 code. This description file is then used to describe the project to other codes that reference it.

Parameters
projectRootThe projectRoot parameter specifies the root offset of the code project.

◆ CallHandler()

static int gmslLibrary.Services.Runtime.CallHandler ( int  target,
EventType  context,
int  iStart,
int  iRefer 
)
static

The CallHandler method calls a gmSL event handler method that is associated with a component when its HasCodeHandler property is true.

Parameters
targetSpecifies the root offset of the component that is triggering the event.
contextContains a member of the EventType enumeration which list the gmSL based supported events.
iStartSpecifies the root of the component whose code contains the reference triggering the ervent.
IReferSpecifies the offset in the code of the reference.
Returns
If the handler changed the code then a one is returned; else a zero is returned.

◆ ConstDeclare()

static void gmslLibrary.Services.Runtime.ConstDeclare ( )
static

The ConstDeclare method authors the actual declarations of the VB6 "Const" defined constants.

◆ DefineConstants()

static string gmslLibrary.Services.Runtime.DefineConstants ( )
static

The DefineConstants method is used by the translation tool to add a semi-colon delimited list of VB6 "#const" defined constants into the "DefineConstants" attribute of the project file.

Returns
A string containing the list of constants.

◆ FinishTranslation()

static void gmslLibrary.Services.Runtime.FinishTranslation ( string  project,
int  commands 
)
static

The Finish translation method id the last method called when authoring a code project. It authors the migration and reference support code and wrappers needed, performs author fixes on the internal text buffers, and wites those buffers to the translation bundle file.

Parameters
projectThe optional parameter project specifies the name of a previously compiled and analysed code project. It restricts the author to that component only. If not specified, all active components are authored.
commandsThe optional parameter commands is the root offset of an set of gmPL fix statements to be executed.

◆ GetAuthorCode()

static string gmslLibrary.Services.Runtime.GetAuthorCode ( int  codeStart,
int  codeEnd 
)
static

The GetAuthorCode method authors the code stored within a specified range of the global code block using the currently active target dialect. The result is returned.

Parameters
codeStartThe codeStart parameter specifies the starting code offset to be authored.
codeEndThe codeEnd parameter specifies the ending code offset to be authored.
Returns
The method returns the authored string result.

◆ GetSpecialName()

static string gmslLibrary.Services.Runtime.GetSpecialName ( int  iRoot,
string  specialName 
)
static

The GetSpecialName method is called by the declarations author when it needs an "InterfaceName" name for some target component. This method attempts to call a "GetSpecialName" handler only if the "migRuntime" property of the target component has bits set that corresponds to one of the loaded runtime codes.

Parameters
iRootspecifies the root offset of the component for whom a special name is needed.
specialNamecontains the name of the property of the component whose special name is needed.
Returns
The special name as constucted by the handler or an empty string if no special name was authored.

◆ InitializeCode()

static void gmslLibrary.Services.Runtime.InitializeCode ( )
static

The InitializeCode method authors the designer initialization code for the controls associated with the current project class being authored

◆ Interface()

static void gmslLibrary.Services.Runtime.Interface ( )
static

The Interface method authors the interface associated with the current project class being authored.

◆ InterfaceClasses()

static void gmslLibrary.Services.Runtime.InterfaceClasses ( string  pathname)
static

The InterfaceClasses method scans a directory for "cs" files and then authors "Compile Include" directives for them for inclusion in the project file currently being authored.

Parameters
pathnamespecifies the pathname of the directory to be scanned.

◆ InterfaceEntry()

static void gmslLibrary.Services.Runtime.InterfaceEntry ( int  iRoot)
static

The InterfaceEntry method authors the actual declaration interface entry for a specified component.

Parameters
iRootspecifies the root offset of the component whose entry is to be authored.

◆ ProjectAssembly()

static void gmslLibrary.Services.Runtime.ProjectAssembly ( int  projectRoot)
static

The ProjectAssembly method authors the assembly file for a specified code project.

Parameters
projectRootThe projectRoot parameter specifies the root offset of the code project.

◆ ProjectInfo()

static void gmslLibrary.Services.Runtime.ProjectInfo ( int  projectRoot)
static

The ProjectInfo method is called immediately before the Assembly file associated with a code project is authored. It sets the various names and assembly file values as needed.

Parameters
projectRootThe projectRoot parameter specifies the rool offset of the code project.

◆ PropertyValue()

static string gmslLibrary.Services.Runtime.PropertyValue ( int  objRoot,
int  propAddr 
)
static

The PropertyValue method authors the code segment stored within the property bag code block for a control that specifies the value of a specified property.

Parameters
objRootThe objRoot parameter specifies the root offset of the control whose property bag code is to be searched for the property value.
propAddrThe propAddr parameter specifies the root offset of the property whode value within the control is being sought.
Returns
The method returns a null if the specified control has no value for the propery; else it the authored string property value.

◆ TargetCode()

static void gmslLibrary.Services.Runtime.TargetCode ( int  iRoot,
int  projectRoot,
bool  authored 
)
static

The TargetCode method authors the target code in the currently selected target dialect for a code file: Form, Class, or Module. This can include both designer code and executable code.

Parameters
iRootThe iRoot parameter specifies the rool offset of the code file being authored.
projectFileThe projectFile parameter specifies the root offset of the code project containing the code file.
authoredThe authored parameter, if true, indicates that the designed code has already been authored.

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