%CPT.Tree.Path
hidden class %CPT.Tree.Path extends %Library.RegisteredObject
Method Inventory
Methods
A path is a list of terms, separated by "/"s. Each term is basically the name of either a nodetype or nodeclasstype (for the given language), with optional additions described below.
The path matches a "descendant chain" in the parse tree. For example, a path "A/B/C" would match a node of type A, with a child of type B, and a type C child of the B child. Unless QuitOnFound is passed as 1 to MatchPathToTree() the path will match all the descendant chains it can find.
Optional additions to a term in the path are :-
- one of the terms can have a "*" prepended, which makes it the focus node (see MatchPathToTree() for more details)
- any of the nodetype (not class) terms can have a "." followed by an annotation name appended, this means that the annotation values will be returned in the matches list from MatchPathToTree()
Try to match the path focus to the given node
If it matches :-
- return 1
- PathMatch is a list of the form [I1,I2...In] where each I is a list of the nodeindex and either an empty list or a binding: [annname,annvalue]
- I1 is the node index of the node which matched the start of the path and In is the node index matching the end of the path
- FocusIndex is set to the index of the focus node (within PathMatch)
Otherwise returns 0, sets PathMatch to "" and kills FocusIndex
Try to match the path to the given subtree
For each match, PathMatches has a sublist of the form [I1,I2...In] where each I is a list of the nodeindex and either an empty list or a binding: [annname,annvalue]
I1 is the node index of the node which matched the start of the path (i.e. NodeIndex) and In is the node index matching the end of the path
If any match: FocusIndex is set to the index of the focus node (within each sublist) - otherwise it's killed
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()