Jump to content

Template:VIServerGetParent: Difference between revisions

From LabVIEW Wiki
m removed number used for test purposes
m Category reorg
 
(One intermediate revision by the same user not shown)
Line 307: Line 307:
'''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 315: Line 317:


Result: ({{VIServerGetParent|36}})
Result: ({{VIServerGetParent|36}})
36 is the Class ID of [[GObject class]], whose Parent Class is [[Generic class]], whose Class ID is 3.


'''Example:'''
'''Example:'''
''Class without a Parent''
''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 328: Line 330:


Result: ({{VIServerGetParent|1}})
Result: ({{VIServerGetParent|1}})
1 is the Class ID of [[Application class]], which is a top-level class and does not have a Parent Class.


'''Example:'''
'''Example:'''
Line 346: Line 346:
*[[Template:VIServerGetAncestors]]
*[[Template:VIServerGetAncestors]]
*[[Template:VIServerGetChildren]]
*[[Template:VIServerGetChildren]]
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 13:21, 8 May 2020


Usage

This template is a lookup table. The input is the Class ID of a class in the VI Server Class Hierarchy. It returns the Class ID of it's parent class (the class it inherits from), unless it is a top-level class where it returns a blank or null.

Syntax is as follows:

{{VIServerGetParent|{{{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.

{{VIServerGetParent|36}}

Result: (3)

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.

{{VIServerGetParent|1}}

Result: ()

Example: Passing in a blank or null returns a null

{{VIServerGetParent|}}

Result: ()

See Also