BIS fnc returnChildren: Difference between revisions

From Bohemia Interactive Community
(Fix argument description (optionality and default) & add reference to similar command)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
|descr= Returns all subclasses within given class.
|descr= Returns all subclasses within given class.


|s1= [config, depth, lastTier, firstTier] call [[BIS_fnc_returnChildren]]
|s1= [config, depth, lastTier] call [[BIS_fnc_returnChildren]]


|p1= config: [[Config]] - class which is searched
|p1= config: [[Config]] - class which is searched
Line 14: Line 14:
|p2= depth: [[Number]] - (Optional, default 0) depth, (0 = return only subclasses, 1 = return subclasses of subclasses, and so on...
|p2= depth: [[Number]] - (Optional, default 0) depth, (0 = return only subclasses, 1 = return subclasses of subclasses, and so on...


|p3= lastTier: [[Boolean]] - (Optional, default [[true]]) [[false]] to return only the last one, [[true]] to return all classes
|p3= allTiers: [[Boolean]] - (Optional, default [[true]]) [[false]] to return only the last one, [[true]] to return all


|p4= firstTier: [[Boolean]] - (Optional, default [[true]]) [[true]] to return the first class, [[false]] to return only the last one
|r1= [[Array]] - of [[Config]]s
 
|r1= [[Array]] - classes


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

Latest revision as of 01:07, 12 October 2025

Hover & click on the images for description

Description

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

Syntax

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

Examples

Example 1:
[configFile >> "CfgFunctions", 2] call BIS_fnc_returnChildren; // returns config paths of all functions

Additional Information

See also:
BIS_fnc_returnParents configClasses

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