Improve class docs for ForEach, Invert, NewScope, Probability

This commit is contained in:
Serhii Snitsaruk 2023-10-09 10:29:34 +02:00
parent f71e158418
commit cb8c824314
4 changed files with 14 additions and 10 deletions

View File

@ -1,19 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTForEach" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that executes child for each element of an [Array].
BT decorator that executes its child task for each element of an [Array].
</brief_description>
<description>
BT decorator that executes child for each element of an [Array]. On each iteration an element is saved to a [Blackboard] variable.
BTForEach executes its child task for each element of an [Array]. During each iteration, the next element is stored in the specified [Blackboard] variable.
Returns [code]RUNNING[/code] if the child task results in [code]RUNNING[/code] or if the child task results in [code]SUCCESS[/code] on a non-last iteration.
Returns [code]FAILURE[/code] if the child task results in [code]FAILURE[/code].
Returns [code]SUCCESS[/code] if the child task results in [code]SUCCESS[/code] on the last iteration.
</description>
<tutorials>
</tutorials>
<members>
<member name="array_var" type="String" setter="set_array_var" getter="get_array_var" default="&quot;&quot;">
An [Array] stored in the [Blackboard] to iterate over.
A variable within the [Blackboard] that holds an [Array], which is used for the iteration process.
</member>
<member name="save_var" type="String" setter="set_save_var" getter="get_save_var" default="&quot;&quot;">
[Blackboard] variable to store an element of array, referenced by [member array_var].
A [Blackboard] variable used to store an element of the array referenced by [member array_var].
</member>
</members>
</class>

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTInvert" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that inverts FAILURE to SUCCESS and SUCCESS to FAILURE.
BT decorator that transforms [code]FAILURE[/code] into [code]SUCCESS[/code] and [code]SUCCESS[/code] into [code]FAILURE[/code].
</brief_description>
<description>
BTInvert transforms [code]FAILURE[/code] into [code]SUCCESS[/code] and [code]SUCCESS[/code] into [code]FAILURE[/code].
</description>
<tutorials>
</tutorials>

View File

@ -4,8 +4,8 @@
BT decorator that creates a new [Blackboard] scope.
</brief_description>
<description>
BT decorator that creates a new [Blackboard] scope during initialization and fills it with data. See [Blackboard].
Returns status of the child execution.
BTNewScope creates a new [Blackboard] scope during initialization and populates it with data. See [Blackboard].
Returns the status of the child task execution.
</description>
<tutorials>
</tutorials>

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTProbability" inherits="BTDecorator" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
BT decorator that executes child with a given probability.
BT decorator that executes its child task with a given probability.
</brief_description>
<description>
BT decorator that executes child with a given probability defined by [member run_chance].
Returns the result of the child task if it was executed, otherwise returns [code]FAILURE[/code].
BTProbability executes its child task with a given probability defined by [member run_chance].
Returns the result of the child task if it was executed; otherwise, it returns [code]FAILURE[/code].
</description>
<tutorials>
</tutorials>