BIS fnc returnChildren: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "(\|[pr][0-9]+ *= *[^-]+) *- *D([a-z])" to "$1 - d$2")
 
(30 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= Configs


|1.00|= Game version
|descr= Returns all subclasses within given class.
____________________________________________________________________________________________


| <pre>/*
|s1= [config, depth, lastTier, firstTier] call [[BIS_fnc_returnChildren]]


Description:
|p1= config: [[Config]] - class which is searched
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
|p2= depth: [[Number]] - depth, (0 = return only subclasses, 1 = return subclasses of subclasses, and so on...
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_returnChildren]]; --> |= Syntax
|p3= lastTier: [[Boolean]] - (Optional, default [[true]]) [[false]] to return only the last one, [[true]] to return all classes


|p1= |= Parameter 1
|p4= firstTier: [[Boolean]] - (Optional, default [[true]]) [[true]] to return the first class, [[false]] to return only the last one


| |= Return value
|r1= [[Array]] - classes
____________________________________________________________________________________________


|x1= <code></code> |=
|x1= <sqf>[configFile >> "CfgFunctions", 2] call BIS_fnc_returnChildren; // returns config paths of all functions</sqf>
____________________________________________________________________________________________
 
| |= See also


|seealso= [[BIS_fnc_returnParents]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Configs|{{uc:returnChildren}}]]
[[Category:Functions|{{uc:returnChildren}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:returnChildren}}]]
<!-- CONTINUE Notes -->
<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 -->

Latest revision as of 14:01, 8 November 2023

Hover & click on the images for description

Description

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

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 true) false to return only the last one, true to return all classes
firstTier: Boolean - (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", 2] call BIS_fnc_returnChildren; // returns config paths of all functions

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