Template:VIServerGetAncestors

From LabVIEW Wiki
Jump to: navigation, search


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