Home > Class Reference > ENSLIB namespace > %Compiler.COS.Refactor
Private  

%Compiler.COS.Refactor

class %Compiler.COS.Refactor extends %Compiler.COS.Traveler

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
17 47 4

Summary

Properties
blockTypeStack changed className cmname
codeStack compileParameter contextStack ctind
errorQueue exceptionDepth exceptionStack flo
formalSpec importPackages lhs lnum
methName opStack pair propName
scname settings smname sqlTableNameList
ssqlname tcname tmname tsqlname
type warningQueue
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 ChangeCSList ChangeClName ChangeClassNameClose
ChangeClassNameExecute ChangeClassNameFetch ChangeMemName ChangeMemberNameClose
ChangeMemberNameExecute ChangeMemberNameFetch ChangeMultClassNameClose ChangeMultClassNameExecute
ChangeMultClassNameFetch ChangeMultMemberNameClose ChangeMultMemberNameExecute ChangeMultMemberNameFetch
GetMemberOrigin GetSubclasses GetTableList NormalizeClName
RefactorStorageProperty RenameSqlField RenameSqlFieldLbst RenameSqlTable
compile compileStream finalizeCode interactive
oneClass oneClassold parseName replaceClassName
replaceMemberName rf v1 v10
v11 v12 v13 v14
v15 v16 v17 v18
v19 v2 v20 v21
v22 v23 v24 v25
v26 v27 v28 v29
v3 v30 v31 v32
v33 v34 v35 v36
v37 v38 v39 v4
v40 v41 v42 v43
v44 v45 v46 v47
v48 v49 v5 v50
v51 v52 v53 v54
v55 v56 v57 v58
v59 v6 v60 v61
v62 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 v9 v90
v91 v92 v93 v94
v95 v96 v97 visit
visitInit visited

Properties

property changed as %Boolean;
property className as %String;
property cmname as %Binary;
property ctind as %Integer;
property lhs as %String;
property lnum as %Integer;
property methName as %String;
property pair as %ObjectHandle;
property propName as %String;
property scname as %String;
property smname as %String;
property sqlTableNameList as %String;
property ssqlname as %String;
property tcname as %String;
property tmname as %String;
property tsqlname as %String;
property type as %String;

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 ChangeClassNameClose(ByRef qHandle As %Binary) as %Status
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 ChangeMemberNameClose(ByRef qHandle As %Binary) as %Status
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 ChangeMultClassNameClose(ByRef qHandle As %Binary) 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 ChangeMultMemberNameClose(ByRef qHandle As %Binary) 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 GetMemberOrigin(memberName As %String, className As %String) as %String
classmethod GetSubclasses(classname As %String) as %Binary
classmethod GetTableList(classnamelist As %Binary) as %Binary
classmethod NormalizeClName(clname As %String, context As %String) as %String
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)
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)
UnknownPreProcessorCommand(10): ann string Snarf:1
method v11(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
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)
CommandSETArguments(12): child list-CommandSETArgument
method v13(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
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)
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)
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)
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)
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)
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)
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)
ClassNameComponent(36): ann name Name:1
method v37(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
DotDotBase(37): child MemberRef:1
method v38(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
ActualParameters(38): child list-ActualParameter
method v41(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
ListClassNameComponents(41): child list-ClassNameComponent NAMES
method v5(parseTree As %Compiler.Util.ParseTree, visit As %Integer, nodePtr As %Integer, parentPtr As %Integer)
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)
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)
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)
Selects TYPE As %String, CLASSNAME As %String, OLDMEMBERNAME As %String, NEWMEMBERNAME As %String, LINENUMBER As %Integer, OPERATION As %Integer, LINECONTENT As %String
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)
Selects TYPE As %String, CLASSNAME As %String, OLDMEMBERNAME As %String, NEWMEMBERNAME As %String, LINENUMBER As %Integer, OPERATION As %Integer, LINECONTENT As %String
query ChangeMultClassName(oldName As %String, newName As %String, projectName As %String)
Selects CLASSNAME As %String, ERROR As %Integer, MESSAGE As %String
query ChangeMultMemberName(oldName As %String, newName As %String, memclassName As %String, projectName As %String, sqlName As %String)
Selects CLASSNAME As %String, ERROR As %Integer, MESSAGE As %String