Jump to content

Template:VIServerGetAncestors: Difference between revisions

From LabVIEW Wiki
mNo edit summary
Changed top-level classes to a message
Line 1: Line 1:
<includeonly>{{#tree:
<includeonly>
{{#if: {{{1}}}|
{{#if: {{{1}}}|
{{#if: {{VIServerGetParent|{{{1}}}}}|
{{#if: {{VIServerGetParent|{{{1}}}}}|{{#tree:
{{#if: {{VIServerGetParent|{{VIServerGetParent|{{{1}}}}}}}|
{{#if: {{VIServerGetParent|{{VIServerGetParent|{{{1}}}}}}}|
{{#if: {{VIServerGetParent|{{VIServerGetParent|{{VIServerGetParent|{{{1}}}}}}}}}|
{{#if: {{VIServerGetParent|{{VIServerGetParent|{{VIServerGetParent|{{{1}}}}}}}}}|
Line 60: Line 60:
}}|
}}|
*{"expanded":true}{{VIServerGetClassName|{{VIServerGetParent|{{{1}}}}}}}
*{"expanded":true}{{VIServerGetClassName|{{VIServerGetParent|{{{1}}}}}}}
**{"expanded":true}{{VIServerGetClassName|{{{1}}}}}
**{"expanded":true}{{VIServerGetClassName|{{{1}}}}}}}
}}|
}}|
*{"expanded":true}{{VIServerGetClassName|{{{1}}}}}
''This class is a top-level class.''
}}|
}}|
}}
}}
}}</includeonly><noinclude>
</includeonly><noinclude>


== Usage ==
== Usage ==

Revision as of 16:57, 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:

This class is a top-level class.


Example: Class with the deepest inheritance hierarchy

In LabVIEW 2019 there are two classes that are tied with the longest inheritance hierarchy. They are:

Here we'll use the TimedLoop class ID of 16467.

{{VIServerGetAncestors|16467}}

Result:


See Also