Template:VIServerGetAncestors: Difference between revisions
Starting Templates |
mNo edit summary |
||
| Line 91: | Line 91: | ||
|} | |} | ||
'''Example:''' | '''Example:''' ''Class with a Parent'' | ||
''Class with a Parent'' | |||
36 is the Class ID of [[GObject class]], whose Parent Class is [[Generic class]], whose Class ID is 3. | |||
<code> | <code> | ||
| Line 103: | Line 104: | ||
{{VIServerGetAncestors|36}} | {{VIServerGetAncestors|36}} | ||
'''Example:''' ''Class without a Parent'' | |||
1 is the Class ID of [[Application class]], which is a top-level class and does not have a Parent Class. | |||
<code> | <code> | ||
| Line 117: | Line 117: | ||
{{VIServerGetAncestors|1}} | {{VIServerGetAncestors|1}} | ||
'''Example:''' ''Class with the deepest inheritance hierarchy'' | |||
In [[LabVIEW 2019]] there are two classes that are tied with the longest inheritance hierarchy. They are: | |||
* 16462 - [[ExternalNode class]] | |||
* 16467 - [[TimedLoop class]] | |||
Here we'll use the [[TimedLoop class]] ID of 16467. | |||
<code> | |||
<nowiki> | |||
{{VIServerGetAncestors|16467}} | |||
</nowiki> | |||
</code> | |||
Result: | |||
{{VIServerGetAncestors|16467}} | |||
== See Also == | == See Also == | ||
Revision as of 14:39, 1 September 2019
Usage
The input to this template is the Class ID of a class in the VI Server Class Hierarchy. The template then builds the class's inheritance hierarchy through a series of nested if-statements using the Template:VIServerGetParent template. The current limit of nested if-statements is nine (9). Currently, as of LabVIEW 2019, the VI Server Class Hierarchy is only six (6) levels deep, at the deepest.
Syntax is as follows:
{{VIServerGetAncestors|{{{1}}}}}
where:
| Parameter | Description | Default |
|---|---|---|
{{{1}}}
|
The Class ID of a class in the VI Server Class Hierarchy. |
|
Example: Class with a Parent
36 is the Class ID of GObject class, whose Parent Class is Generic class, whose Class ID is 3.
{{VIServerGetAncestors|36}}
Result:
Example: Class without a Parent
1 is the Class ID of Application class, which is a top-level class and does not have a Parent Class.
{{VIServerGetAncestors|1}}
Result:
Example: Class with the deepest inheritance hierarchy
In LabVIEW 2019 there are two classes that are tied with the longest inheritance hierarchy. They are:
- 16462 - ExternalNode class
- 16467 - TimedLoop class
Here we'll use the TimedLoop class ID of 16467.
{{VIServerGetAncestors|16467}}
Result: