%Compiler.COS.Refactor
class %Compiler.COS.Refactor extends %Compiler.COS.Traveler
Property Inventory
- changed
- className
- cmname
- ctind
- lhs
- lnum
- methName
- pair
- propName
- scname
- smname
- sqlTableNameList
- ssqlname
- tcname
- tmname
- tsqlname
- type
Method Inventory
- ChangeCSList()
- ChangeClName()
- ChangeClassNameClose()
- ChangeClassNameExecute()
- ChangeClassNameFetch()
- ChangeMemName()
- ChangeMemberNameClose()
- ChangeMemberNameExecute()
- ChangeMemberNameFetch()
- ChangeMultClassNameClose()
- ChangeMultClassNameExecute()
- ChangeMultClassNameFetch()
- ChangeMultMemberNameClose()
- ChangeMultMemberNameExecute()
- ChangeMultMemberNameFetch()
- GetMemberOrigin()
- GetSubclasses()
- GetTableList()
- NormalizeClName()
- RefactorStorageProperty()
- RenameSqlField()
- RenameSqlFieldLbst()
- RenameSqlTable()
- oneClass()
- oneClassold()
- replaceClassName()
- replaceMemberName()
- rf()
- v1()
- v10()
- v11()
- v12()
- v13()
- v14()
- v2()
- v32()
- v33()
- v34()
- v35()
- v36()
- v37()
- v38()
- v41()
- v5()
- v62()
- v9()
- v97()
Properties
property changed as %Boolean;
Property methods: changedDisplayToLogical(), changedGet(), changedIsValid(), changedLogicalToDisplay(), changedNormalize(), changedSet()
property className as %String;
Property methods: classNameDisplayToLogical(), classNameGet(), classNameIsValid(), classNameLogicalToDisplay(), classNameLogicalToOdbc(), classNameNormalize(), classNameSet()
property cmname as %Binary;
Property methods: cmnameGet(), cmnameIsValid(), cmnameSet()
property ctind as %Integer;
Property methods: ctindDisplayToLogical(), ctindGet(), ctindIsValid(), ctindLogicalToDisplay(), ctindNormalize(), ctindSet()
property lhs as %String;
Property methods: lhsDisplayToLogical(), lhsGet(), lhsIsValid(), lhsLogicalToDisplay(), lhsLogicalToOdbc(), lhsNormalize(), lhsSet()
property lnum as %Integer;
Property methods: lnumDisplayToLogical(), lnumGet(), lnumIsValid(), lnumLogicalToDisplay(), lnumNormalize(), lnumSet()
property methName as %String;
Property methods: methNameDisplayToLogical(), methNameGet(), methNameIsValid(), methNameLogicalToDisplay(), methNameLogicalToOdbc(), methNameNormalize(), methNameSet()
property pair as %ObjectHandle;
Property methods: pairGet(), pairIsValid(), pairSet()
property propName as %String;
Property methods: propNameDisplayToLogical(), propNameGet(), propNameIsValid(), propNameLogicalToDisplay(), propNameLogicalToOdbc(), propNameNormalize(), propNameSet()
property scname as %String;
Property methods: scnameDisplayToLogical(), scnameGet(), scnameIsValid(), scnameLogicalToDisplay(), scnameLogicalToOdbc(), scnameNormalize(), scnameSet()
property smname as %String;
Property methods: smnameDisplayToLogical(), smnameGet(), smnameIsValid(), smnameLogicalToDisplay(), smnameLogicalToOdbc(), smnameNormalize(), smnameSet()
property sqlTableNameList as %String;
Property methods: sqlTableNameListDisplayToLogical(), sqlTableNameListGet(), sqlTableNameListIsValid(), sqlTableNameListLogicalToDisplay(), sqlTableNameListLogicalToOdbc(), sqlTableNameListNormalize(), sqlTableNameListSet()
property ssqlname as %String;
Property methods: ssqlnameDisplayToLogical(), ssqlnameGet(), ssqlnameIsValid(), ssqlnameLogicalToDisplay(), ssqlnameLogicalToOdbc(), ssqlnameNormalize(), ssqlnameSet()
property tcname as %String;
Property methods: tcnameDisplayToLogical(), tcnameGet(), tcnameIsValid(), tcnameLogicalToDisplay(), tcnameLogicalToOdbc(), tcnameNormalize(), tcnameSet()
property tmname as %String;
Property methods: tmnameDisplayToLogical(), tmnameGet(), tmnameIsValid(), tmnameLogicalToDisplay(), tmnameLogicalToOdbc(), tmnameNormalize(), tmnameSet()
property tsqlname as %String;
Property methods: tsqlnameDisplayToLogical(), tsqlnameGet(), tsqlnameIsValid(), tsqlnameLogicalToDisplay(), tsqlnameLogicalToOdbc(), tsqlnameNormalize(), tsqlnameSet()
property type as %String;
Property methods: typeDisplayToLogical(), typeGet(), typeIsValid(), typeLogicalToDisplay(), typeLogicalToOdbc(), typeNormalize(), typeSet()
Methods
classmethod ChangeCSList(ByRef cslist As %String, oldName As %String, newName As %String, bNormalize As %Boolean, context As %String = "") as %Boolean
classmethod ChangeClName(oldName As %String, newName As %String, className As %String, ByRef tempName As %String, ByRef storagechanged As %Boolean, bDeleteStorage As %Boolean = 0) as %Status
The method ChangeClName is used for changing a class name.
Arguments: oldName - existing class name,
newName - new class name,
className - class to be processed,
tempName - name of generated clas,s
storagechanged - indicate whether storage was modified.
In order to replace encounters of the class A to the class B in the class C, the call should be ChangeClName(A, B, C, .tempName, .storagechanged)
As a result of this call a new class (with a name returned in tempName) will be created (but not compiled).
classmethod ChangeClassNameExecute(ByRef qHandle As %Binary, oldName As %String, newName As %String, className As %String, ByRef tempName As %String, ByRef storagechanged As %Boolean) as %Status
classmethod ChangeClassNameFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
classmethod ChangeMemName(oldName As %String, newName As %String, memclassName As %String, className As %String, ByRef tempName As %String, ByRef storagechanged As %Boolean, sqlName="", bNewSlot As %Boolean = 0) as %Status
The method ChangeMemName is used for changing a member name (either a property or a method).
Arguments: oldName - existing member name,
newName - new member name,
memclassName - the class name of a property that is being changed,
className - class to be processed,
tempName - name of generated clas,s
storagechanged - indicate whether storage was modified.
In order to replace encounters of the member Z.A to Z.B in the class C, the call should be ChangeMemName(A, B, Z, C, .tempName, .storagechanged)
As a result of this call a new class (with a name returned in tempName) will be created (but not compiled).
classmethod ChangeMemberNameExecute(ByRef qHandle As %Binary, oldName As %String, newName As %String, memclassName As %String, className As %String, ByRef tempName As %String, ByRef storagechanged As %Boolean, sqlName As %String = "") as %Status
classmethod ChangeMemberNameFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
classmethod ChangeMultClassNameExecute(ByRef qHandle As %Binary, oldName As %String, newName As %String, projectName As %String) as %Status
classmethod ChangeMultClassNameFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
classmethod ChangeMultMemberNameExecute(ByRef qHandle As %Binary, oldName As %String, newName As %String, memclassName As %String, projectName As %String, sqlName As %String = "") as %Status
classmethod ChangeMultMemberNameFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
classmethod RefactorStorageProperty(pClassname As %String, pPropName As %String, pNewName As %String, pNewSlot As %Boolean = 0, ByRef pChanged As %Boolean, pSave As %Boolean = 1) as %String
RefactorStorageProperty takes a classname, property name, and a new property name and changes the name of the property to the new name everywhere in the storage definition.
The pNewSlot argument means if pNewSlot=1, don't overwrite the current property storage data location, but provide a new data slot with the new name.
The pChanged argument is passed by reference and will be set to 1 if any change is made to any Storage defined for this class. It will be 0 if no changes are made.
Returns %Status value
classmethod RenameSqlField(ByRef sql As %String, ByRef nuq As %String, ffn As %String, nuf As %String, sch As %String, tab As %String) as %Library.Status
In the SQL text array (by ref) .sql(1:sql)=line, find all occurrences, if
any, of field ffn from the table specified by sch=$LB(schema) and
tab=$LB(table), and replace them with nuf in the result array (by ref)
.nuq(1:nuq)=line , returns %Status
classmethod RenameSqlFieldLbst(ByRef sql As %String, ByRef nuq As %String, ffn As %String, nuf As %String, lbst As %String, ByRef pChanged As %Boolean, pClassname As %String = "") as %Library.Status
In the SQL text array (by ref) .sql(1:sql)=line, find all occurrences, if
any, of field ffn from the tables specified by lbst=$LB(schema.table), and
replace them with nuf in the result array (by ref) .nuq(1:nuq)=line ,
pChanged=0/1 (by ref) indicates whether anything changed, return %Status.
pClassname is the class name the sql statement came from, if any, and its
package name is used as the packages argument to comp^%qaqqt
classmethod RenameSqlTable(ByRef sql As %String, ByRef nuq As %String, sntn As %String, nust As %String, ByRef pChanged As %Boolean, pClassname As %String = "") as %Library.Status
In the SQL text array (by ref) .sql(1:sql)=line, find all occurrences,
if any, of [schema.]table sntn=schema.table, and replace them with the
new schema.table nust in the result array (by ref) .nuq(1:nuq)=line ,
pChanged=0/1 (by ref) indicates whether anything changed, return %Status.
pClassname is the class name the sql statement came from, if any, and its
package name is used as the packages argument to comp^%qaqqt
method oneClass(ByRef tempName As %String, bsave As %Boolean = 1, ByRef storagechanged As %Boolean, bNewSlot As %Boolean = 0, bDeleteStorage As %Boolean = 0) as %Status
method oneClassold() as %Status
method replaceClassName(parseTree As %Compiler.Util.ParseTree, newname As %Binary, nodePtr As %Integer, parentPtr As %Integer, ann As %String)
method replaceMemberName(parseTree As %Compiler.Util.ParseTree, newname As %Binary, nodePtr As %Integer)
method rf(ByRef source As %CacheString, pPackage As %CacheString = "", ByRef code As %CacheString, ByRef warning As %Status = 1, sqlContext As %Integer = 0) as %Status
method v1(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: PlainBlock(1): child list-Line
NOT GENERATED - you MUST run MakeIndexRoutine and MakeDefsInclude if you edit this
Used by %CPT.HPT.* classes.
next free nodetypes: 98
PROGRAM STRUCTURE
method v10(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: UnknownPreProcessorCommand(10): ann string Snarf:1
method v11(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: CommandSET(11): ann keyword CommandName:1, optional child PostCondition-Expression:1, optional child Arguments-CommandSETArguments:2
SET COMMAND
method v12(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: CommandSETArguments(12): child list-CommandSETArgument
method v13(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: CommandSETArgument(13): child Lhs-CommandSETArgLhs:1, child Rhs-Expression:2
method v14(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: CommandSETArgLhs(14): ann bool IsMultiple:1, child list-SETTarget
method v2(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: PlainLine(2): optional ann name Label:1, optional child ListFormals:1, optional child Body-LineBody:2
CODE LINES
method v32(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: ObjectRef(32): child ObjectRefBase:1, optional child ListMemberRefs:2
method v33(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: ListMemberRefs(33): child list-MemberRef
nodeclass ObjectRefBase: Term | PPClass | DotDotBase | ParenObjectRefBase
note: HPT only supports the following sorts of Term as an object base: LvnRef, ParenExpr, SystemVar, PPFuncSUPER
(just to confirm: ObjectRef won't appear here either)
method v34(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: MemberRef(34): ann name MemberName:1, optional child ActualParameters:1, ann enum MemberType:2
enum MemberType: Method:1, Property:2, Unknown:3, Parameter:4
For a Parameter :-
1. The MemberName *does* include the "#" - this is so that absent-minded clients don't treat it
as a method/property.
2. The ActualParameters will always be absent.
method v35(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: PPClass(35): ann keyword ClassKeywordName:1, child ListClassNameComponents:1
method v36(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: ClassNameComponent(36): ann name Name:1
method v37(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: DotDotBase(37): child MemberRef:1
method v38(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: ActualParameters(38): child list-ActualParameter
method v41(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: ListClassNameComponents(41): child list-ClassNameComponent
NAMES
method v5(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: Expression(5): child Lhs-ExprOrTerm:1, optional ann keyword DyOp:1, optional child Rhs-ExprOrTerm:2
method v62(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: Embedding(62): ann string Language:1, ann string Opener:2, ann string Body:3, ann string BodyExtent:4, ann string Closer:5
nodeclass LineElement: Command | Embedding
EMBEDDING LINES
the Body has linefeed ($Char(10)) characters between lines
the BodyExtent has the format $ListBuild(startline,startcol,endline,endcol)
.. line/column numbers start at 1
.. endline/endcol is the position of the last character in the Body
method v9(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
LvnRef(9): ann name Name:1, ann enum LvnType:2, optional child Subscripts:1
LOCAL/GLOBAL VARIABLES
enum LvnType: Private:1, Public:2, Parameter:3
method v97(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
Inherited description: SQLField(97): ann keyword FieldName:1, optional ann keyword Star:2, optional ann keyword TriggerQualifier:3
Other
A SQLField will only be recognized by the parser if IPARSE_COS_SQLFIELDS or IPARSE_COS_SQLTRIGGER is set
- 'Moniker' argument for those flags: "!FLAGS+2" and "!FLAGS+4"
The TriggerQualifier part needs IPARSE_COS_SQLTRIGGER ("!FLAGS+4")
The 'Star' annotation is to aid accurate regeneration and should be ignored by parse tree scanners
Queries
query ChangeClassName(oldName As %String, newName As %String, className As %String, ByRef tempName As %String, ByRef storagechanged As %Boolean)
query ChangeMemberName(oldName As %String, newName As %String, memclassName As %String, className As %String, ByRef tempName As %String, ByRef storagechanged As %Boolean, sqlName As %String)
Inherited Members
Inherited Properties
- blockTypeStack
- codeStack
- compileParameter
- contextStack
- errorQueue
- exceptionDepth
- exceptionStack
- flo
- formalSpec
- importPackages
- opStack
- settings
- warningQueue
Inherited Methods
- %AddToSaveSet()
- %BindExport()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- compile()
- compileStream()
- finalizeCode()
- interactive()
- parseName()
- v15()
- v16()
- v17()
- v18()
- v19()
- v20()
- v21()
- v22()
- v23()
- v24()
- v25()
- v26()
- v27()
- v28()
- v29()
- v3()
- v30()
- v31()
- v39()
- v4()
- v40()
- v42()
- v43()
- v44()
- v45()
- v46()
- v47()
- v48()
- v49()
- v50()
- v51()
- v52()
- v53()
- v54()
- v55()
- v56()
- v57()
- v58()
- v59()
- v6()
- v60()
- v61()
- v63()
- v64()
- v65()
- v66()
- v67()
- v68()
- v69()
- v7()
- v70()
- v71()
- v72()
- v73()
- v74()
- v75()
- v76()
- v77()
- v78()
- v79()
- v8()
- v80()
- v81()
- v82()
- v83()
- v84()
- v85()
- v86()
- v87()
- v88()
- v89()
- v90()
- v91()
- v92()
- v93()
- v94()
- v95()
- v96()
- visit()
- visitInit()
- visited()