/
gmslSymbolClass
gmslSymbolClass
Mark Juras
Owned by Mark Juras
The Symbol Service Class
The class Symbol works with the symbols as stored in the various active storage areas.Symbol Class ClassName Method
gmSL: string Symbol.ClassName(int iRoot)<Method id="ClassName" type="String" opcode="SCM.Symbol_ClassName" > <Argument id="iRoot" type="Integer" status="ByVal" /> </Method>
Symbol Class DisplayInfo Method
gmSL: void Symbol.DisplayInfo(int infValue,int dispType)<Method id="DisplayInfo" type="void" opcode="SCM.Symbol_DisplayInfo" > <Argument id="infValue" type="Integer" status="ByVal" /> <Argument id="dispType" type="Integer" status="ByVal" /> </Method>
Symbol Class EnumStringValue Method
gmSL: string Symbol.EnumStringValue(string enumeration, string entry)<Method id="EnumStringValue" type="String" opcode="SCM.Symbol_EnumStringValue" > <Argument id="enumeration" type="String" status="ByVal" /> <Argument id="entry" type="String" status="ByVal" /> </Method>
Symbol Class FindIdentifier Method
gmSL: int Symbol.FindIdentifier(string identifier,int parent)<Method id="FindIdentifier" type="Integer" opcode="SCM.Symbol_FindIdentifier" > <Argument id="identifier" type="String" status="ByVal" /> <Argument id="parent" type="Integer" status="ByVal" optional="0" /> </Method>
Symbol Class FullName Method
gmSL: string Symbol.FullName(int iRoot, int context)<Method id="FullName" type="string" opcode="SCM.Symbol_FullName" > <Argument id="iRoot" type="Integer" status="ByVal" /> <Argument id="context" type="Integer" status="ByVal" > </Method>
Symbol Class FullType Method
gmSL: int Symbol.FullType(string typeName,int context,int migStatus,int idfStatus)<Method id="FullType" type="Integer" opcode="SCM.Symbol_FullType" > <Argument id="typeName" type="String" status="ByVal" /> <Argument id="context" type="Integer" status="ByRef" > <Argument id="migStatus" type="Integer" status="ByRef" > <Argument id="idfStatus" type="Integer" status="ByVal" > </Method>
Symbol Class GetDefault Method
gmSL: int Symbol.GetDefault(int clsRoot)<Method id="GetDefault" type="Integer" opcode="SCM.Symbol_GetDefault" > <Argument id="clsRoot" type="Integer" status="ByVal" /> </Method>
Symbol Class GetTemplate Method
gmSL: string Symbol.GetTemplate(string TemplateName)<Method id="GetTemplate" type="string" opcode="SCM.Symbol_GetTemplate" > <Argument id="TemplateName" type="string" status="ByVal"/> </Method>
Symbol Class NamedEntryLabel Method
gmSL: string Symbol.NamedEntryLabel(string enumName,int iValue)<Method id="NamedEntryLabel" type="string" opcode="SCM.Symbol_NamedEntryLabel" > <Argument id="enumName" type="String" status="ByVal" /> <Argument id="iValue" type="Integer" status="ByVal" > </Method>
Symbol Class ReferenceName Method
gmSL: string Symbol.ReferenceName(string refName)<Method id="ReferenceName" type="String" opcode="SCM.Symbol_ReferenceName" > <Argument id="refName" type="string" status="ByVal" /> </Method>
Symbol Class Rename Method
gmSL: void Symbol.Rename(string newName,int iRoot)<Method id="Rename" type="void" opcode="SCM.Symbol_Rename" > <Argument id="newName" type="string" status="ByVal" /> <Argument id="iRoot" type="Integer" status="ByVal" /> </Method>
Symbol Class StorePattern Method
gmSL: int Symbol.StorePattern(string allPattern,int nPram)<Method id="StorePattern" type="Integer" opcode="SCM.Symbol_StorePattern" > <Argument id="allPattern" type="string" status="ByVal" /> <Argument id="nPram" type="Integer" status="ByVal" /> </Method>
<gmBasic> <!-- Unit test for Symbol.StorePattern method --> <gmSL> int subRoot; tVbSub subInfo; tCodeBlock codptr; int nCode; int icode; int oper; int subOper; Execute.Output("Demo118.out","New","Text","on"); Write.Line "Unit test for Symbol.StorePattern() Method" Execute.Storage("Open","Demo000"); subRoot = Symbol.FindIdentifier("FMStocks_DB.ConvertToString"); subInfo = Store.GetVector(subRoot); codptr = Opcode.GetCode(); nCode = Store.ReadInfo(codptr,subInfo.anaCodeStart); Opcode.SetLength(nCode); Write.Line("Authored code before changing pattern"); Runtime.AuthorCode(0,nCode); for(icode = 0; icode >= 0; icode = Opcode.GetNext(codptr,icode,nCode)) { oper = = Opcode.GetOperation(codptr,icode,subOper); ) if(oper == OPC.VBF && subOper == OPC.VBF.CStr) break; } Write.Line("Found VBF.Cstr at location " + icode); ) subOper = Symbol.StorePattern("MySupport.newStr(%1d)",1); ) Opcode.Replace(icode,OPC.APS,subOper,1); nCode = Opcode.GetLength(); Write.Line("Authored code after changing pattern"); Runtime.AuthorCode(0,nCode); </gmSL> </gmBasic>
Unit test for Symbol.StorePattern() Method Authored code before changing pattern if (VBNET.Information.IsNothing(v)) { Helpers.ConvertToString = ""; } else { Helpers.ConvertToString = Convert.ToString(v); } Found VBF.Cstr at location 70 Authored code after changing pattern if (VBNET.Information.IsNothing(v)) { Helpers.ConvertToString = ""; } else { Helpers.ConvertToString = MySupport.newStr(v); }
Symbol Class Unused Method
gmSL: int Symbol.Unused(int iRoot)<Method id="Unused" type="Integer" opcode="SCM.Symbol_Unused" > <Argument id="iRoot" type="Integer" status="ByVal" /> </Method>
Symbol Class UseTemplate Method
gmSL: string Symbol.UseTemplate(string template,string identifier)<Method id="UseTemplate" type="String" opcode="SCM.Symbol_UseTemplate" > <Argument id="template" type="String" status="ByVal" /> <Argument id="identifier" type="String" status="ByVal" /> </Method>
Table of Contents
, multiple selections available,
Related content
gmscMetaSymbolClass
gmscMetaSymbolClass
More like this
gmscSymbolClass
gmscSymbolClass
More like this
gmscServiceClasses
gmscServiceClasses
More like this
gmslAttributeClasses
gmslAttributeClasses
More like this
gmplDeclarationStatements
gmplDeclarationStatements
More like this
gmNIServiceClasses
gmNIServiceClasses
More like this