%XGEN.AbstractNode
Class %XGEN.AbstractNode Extends AbstractElement [ System = 3 ]
Note: This class is included because it is needed by other parts of the library. You should not use this or any other class within this package within your applications as a future version will be incompatible. If you are interested in this functionality please contact InterSystems.
This is the base class for nodes within an XGEN document.
A node represents a specific action within an XGEN document.
See %XGEN.AbstractDocument for an overview of XGEN.
Methods
%GenerateCode
Method %GenerateCode(pTargetClass As %Dictionary.CompiledClass, pCode As %Stream.TmpCharacter, pDocument As %XGEN.AbstractDocument) As %Status [ Final, Internal ]
Generate code for this node.
User classes should not override this method, instead they should override the %OnGenerateCode method.
%OnGenerateCode
Method %OnGenerateCode(pTargetClass As %Dictionary.CompiledClass, pCode As %Stream.TmpCharacter, pDocument As %XGEN.AbstractDocument) As %Status
Generate code for this node.
This method is called when a class containing an XGEN document is compiled.
pTargetClass is the class that contains the XGEN document.
pCode is a stream containing the generated code.
pDocument is the top-level XGEN document object that contains this node.
A subclass will provide an implementation of this method that will generate specific lines of code.
For example: Do pCode.WriteLine(..%Indent()_"Set " _ ..target _ "=" _ $$$quote(..value))