%XGEN.AbstractGroup
Class %XGEN.AbstractGroup [ Abstract, PropertyClass = %XGEN.PropertyParameters, 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 abstract class is the basis for all groups within XGEN (such as documents or sequences).
See %XGEN.AbstractDocument for an overview of XGEN.
User classes should not extend this class, instead they should extend either %XGEN.AbstractDocument or %XGEN.AbstractSequence.
Properties
children
Property children As list Of AbstractNode(XMLELEMENTREF = 1, XMLPROJECTION = "ELEMENT", XMLTYPECONSTRAINT = "CHOICE");
This is the set of child nodes that belong to this sequence.
skipChildren
Property skipChildren As %Boolean(XMLPROJECTION = "NONE") [ InitialExpression = 0 ];
If this transient property is true, then the children of the group will not be processed. This provides a way for a subclass to disable processing of a group.
Methods
%GenerateCode
Method %GenerateCode(pTargetClass As %Dictionary.CompiledClass, pCode As %Stream.TmpCharacter, pDocument As %XGEN.AbstractDocument) As %Status [ Final ]
Loop over the members of this sequence and fire their %GenerateCode methods.
Subclasses can customize the behavior using the %OnBeforeGenerateCode and %OnAfterGenerateCode callback methods.
%OnGenerateCode
Method %OnGenerateCode(pTargetClass As %Dictionary.CompiledClass, pCode As %Stream.TmpCharacter, pDocument As %XGEN.AbstractDocument) As %Status [ Final ]
This callback does not apply to groups, so we stub it out here.
%OnBeforeGenerateCode
Method %OnBeforeGenerateCode(pTargetClass As %Dictionary.CompiledClass, pCode As %Stream.TmpCharacter, pDocument As %XGEN.AbstractDocument) As %Status [ CodeMode = expression ]
This method is called when a class containing an XGEN document is compiled. It is called before the %GenerateCode method processes its children.
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 can provide an implementation of this method that will generate specific lines of code.
%OnAfterGenerateCode
Method %OnAfterGenerateCode(pTargetClass As %Dictionary.CompiledClass, pCode As %Stream.TmpCharacter, pDocument As %XGEN.AbstractDocument) As %Status [ CodeMode = expression ]
This method is called when a class containing an XGEN document is compiled. It is called after the %GenerateCode method processes its children.
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 can provide an implementation of this method that will generate specific lines of code.