Difference between revisions of "SHIP:Sail:getChildCount"

From Serious Documentation
Jump to: navigation, search
Line 9: Line 9:
  
 
== Prototype ==
 
== Prototype ==
<code>{{DataType|Integer}} getChildCount({{DataType|Reference}} parentNode);</code>
+
<code>{{DataType|Integer}} getChildCount({{DataType|Reference}}:[[SHIP:Node|node]] parentNode);</code>
  
 
=== Parameters/Return Value ===
 
=== Parameters/Return Value ===
Line 17: Line 17:
 
! scope="col" style="text-align:left" | Description
 
! scope="col" style="text-align:left" | Description
 
|-
 
|-
|parentNode||{{DataType|Reference}}||The node to look in for children
+
|parentNode||{{DataType|Reference}}:[[SHIP:Node|node]]||The node to look in for children
 
|-
 
|-
 
! scope="col" style="text-align:left" | Return
 
! scope="col" style="text-align:left" | Return

Revision as of 17:32, 4 February 2013

See Also:

getChildCount

Gets a count of the total number of child nodes within an enclosing parent node.

Prototype

Integer getChildCount(Reference:node parentNode);

Parameters/Return Value

Parameter Data Type Description
parentNode Reference:node The node to look in for children
Return Integer number of direct children within the parent node

Detailed Description

The getChildCount(parent) function returns the number of direct children within the parent.

Nodes in SHIP may have 0 or more direct child nodes. For example, a group in the resources area may have N images within the group. These children, if present, are implicitly numbered 0..(N-1) where N is the total number of children of any type within the parent node.

Examples