BIS fnc returnChildren: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Configs(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "")
m (Fix boolean casing)
Line 9: Line 9:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns all subclasses within given class.|Description=
| Returns all subclasses within given class. |Description=
____________________________________________________________________________________________
____________________________________________________________________________________________


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


|p1= config: [[Config]] - Class which is searched |Parameter 1=
|p1= config: [[Config]] - Class which is searched |Parameter 1=
Line 19: Line 18:
|p2= depth: [[Number]] - Depth, (0 = return only subclasses, 1 = return subclasses of subclasses, and so on...|Parameter 2=
|p2= depth: [[Number]] - Depth, (0 = return only subclasses, 1 = return subclasses of subclasses, and so on...|Parameter 2=


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


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


| [[Array]] - Classes |Return value=
| [[Array]] - Classes |Return value=
Line 30: Line 29:
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>[ [[configFile]] >> "CfgFunctions", 2 ] [[call]] [[BIS_fnc_returnChildren]];//Return config paths of all functions</code>|Example 1=
|x1= <code>[<nowiki/>[[configFile]] >> "CfgFunctions", 2] [[call]] [[BIS_fnc_returnChildren]]; {{cc|returns config paths of all functions}}</code> |Example 1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[BIS_fnc_returnParents]] |See also=
| [[BIS_fnc_returnParents]] |See also=
}}
}}

Revision as of 09:43, 26 December 2020

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