BIS fnc returnChildren: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (pf)
Line 1: Line 1:
 
{{Function|Comments=
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma3 |= Game name
| arma3 |Game name=


|1.00|= Game version
|1.00|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Returns all subclasses within given class.|Description=
 
Description:
Returns all subclasses within given class
Parameter(s):
0: CONFIG - class which is searched
1: NUMBER - depth (e.g., 0  to return only subclasses, 1 to return also subclasses of subclasses and so on)
3: BOOL - true to return only the last tier, false to return all classes leading to it
Returns:
ARRAY of CONFIGs
*/
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_returnChildren]]; --> |= Syntax
| [config,depth,lastTier,firstTier]] call [[BIS_fnc_returnChildren]] |Syntax=


|p1= |= Parameter 1


| |= Return value
|p1= config: [[Config]] - Class which is searched |Parameter 1=
____________________________________________________________________________________________


|x1= <code></code> |=  
|p2= depth: [[Number]] - Depth, (0 = return only subclasses, 1 = return subclasses of subclasses, and so on...|Parameter 2=
____________________________________________________________________________________________


| |= See also
|p3= lastTier: [[Boolean]] - (Optional, default [[false]]) [[True]] to return all classes, [[false]] to return only the last one |Parameter 3=


}}
|p4= firstTier: [[String]] - (Optional, default [[true]]) [[True]] to return the first class, [[false]] to return only the last one |Parameter 4=


<h3 style="display:none">Notes</h3>
| [[Array]] - Classes |Return value=
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
<!---
</dl>
|exec= spawn |= Execution
--->
____________________________________________________________________________________________


<h3 style="display:none">Bottom Section</h3>
|x1= <code>[ [[configFile]] >> "CfgFunctions", 0, [[false]], [[false]] ] [[call]] [[BIS_fnc_returnChildren]];</code>|Example 1=
[[Category:Function Group: Configs|{{uc:returnChildren}}]]
____________________________________________________________________________________________
[[Category:Functions|{{uc:returnChildren}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:returnChildren}}]]


<!-- CONTINUE Notes -->
| [[BIS_fnc_returnParents]] |See also=
<dl class="command_description">
}}
<dd class="notedate">Posted on July 26, 2015 - 10:35 (UTC)</dd>
<dt class="note">[[User:Gippo|Gippo]]</dt>
<dd class="note">
 
''"3: BOOL - true to return only the last tier, false to return all classes leading to it"''.
I'm pretty sure this works the other way around, so '''true''' if you want '''all classes''', and '''false''' if you want only the '''last tier'''.
 
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 15:07, 15 June 2018

Hover & click on the images for description

Description

Description:
Returns all subclasses within given class.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[config,depth,lastTier,firstTier]] call BIS_fnc_returnChildren
Parameters:
config: Config - Class which is searched
depth: Number - Depth, (0 = return only subclasses, 1 = return subclasses of subclasses, and so on...
lastTier: Boolean - (Optional, default false) True to return all classes, false to return only the last one
firstTier: String - (Optional, default true) True to return the first class, false to return only the last one
Return Value:
Array - Classes

Examples

Example 1:
[ configFile >> "CfgFunctions", 0, false, false ] call BIS_fnc_returnChildren;

Additional Information

See also:
BIS_fnc_returnParents

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note