2016-05-27 14:22:56 +02:00

618 lines
15 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div>
<div id="main">
<div id="navigation">
<h2>Modules</h2>
<ul><li>
<a href="index.html">index</a>
</li></ul>
<ul>
<li><a href="Base.html">Base</a></li>
<li><a href="CARGO.html">CARGO</a></li>
<li><a href="CleanUp.html">CleanUp</a></li>
<li><a href="Client.html">Client</a></li>
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
<li><a href="DCSCommand.html">DCSCommand</a></li>
<li><a href="DCSController.html">DCSController</a></li>
<li><a href="DCSGroup.html">DCSGroup</a></li>
<li><a href="DCSObject.html">DCSObject</a></li>
<li><a href="DCSTask.html">DCSTask</a></li>
<li><a href="DCSTypes.html">DCSTypes</a></li>
<li><a href="DCSUnit.html">DCSUnit</a></li>
<li><a href="DCSWorld.html">DCSWorld</a></li>
<li><a href="DCStimer.html">DCStimer</a></li>
<li><a href="DEPLOYTASK.html">DEPLOYTASK</a></li>
<li><a href="DESTROYBASETASK.html">DESTROYBASETASK</a></li>
<li><a href="DESTROYGROUPSTASK.html">DESTROYGROUPSTASK</a></li>
<li><a href="DESTROYRADARSTASK.html">DESTROYRADARSTASK</a></li>
<li><a href="DESTROYUNITTYPESTASK.html">DESTROYUNITTYPESTASK</a></li>
<li><a href="Database.html">Database</a></li>
<li><a href="Escort.html">Escort</a></li>
<li><a href="Event.html">Event</a></li>
<li><a href="GOHOMETASK.html">GOHOMETASK</a></li>
<li><a href="Group.html">Group</a></li>
<li>GroupSet</li>
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
<li><a href="Menu.html">Menu</a></li>
<li><a href="Message.html">Message</a></li>
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
<li><a href="Mission.html">Mission</a></li>
<li><a href="NOTASK.html">NOTASK</a></li>
<li><a href="PICKUPTASK.html">PICKUPTASK</a></li>
<li><a href="ROUTETASK.html">ROUTETASK</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>
<li><a href="Set.html">Set</a></li>
<li><a href="Spawn.html">Spawn</a></li>
<li><a href="StaticObject.html">StaticObject</a></li>
<li><a href="TASK.html">TASK</a></li>
<li><a href="Unit.html">Unit</a></li>
<li><a href="UnitSet.html">UnitSet</a></li>
<li><a href="Zone.html">Zone</a></li>
<li><a href="env.html">env</a></li>
<li><a href="land.html">land</a></li>
<li><a href="routines.html">routines</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>GroupSet</code></h1>
<p>Create and manage a set of groups.</p>
<h1><a href="##(GROUPSET)">#GROUPSET</a> class</h1>
<p>Mission designers can use the GROUPSET class to build sets of groups belonging to certain:</p>
<ul>
<li>Coalitions</li>
<li>Categories</li>
<li>Countries</li>
<li>Starting with certain prefix strings.</li>
</ul>
<h1>GROUPSET construction methods:</h1>
<p>Create a new GROUPSET object with the <a href="##(GROUPSET).New">GROUPSET.New</a> method:</p>
<ul>
<li><a href="##(GROUPSET).New">GROUPSET.New</a>: Creates a new GROUPSET object.</li>
</ul>
<h1>GROUPSET filter criteria: </h1>
<p>You can set filter criteria to define the set of groups within the GROUPSET.
Filter criteria are defined by:</p>
<ul>
<li><a href="##(GROUPSET).FilterCoalitions">GROUPSET.FilterCoalitions</a>: Builds the GROUPSET with the groups belonging to the coalition(s).</li>
<li><a href="##(GROUPSET).FilterCategories">GROUPSET.FilterCategories</a>: Builds the GROUPSET with the groups belonging to the category(ies).</li>
<li><a href="##(GROUPSET).FilterCountries">GROUPSET.FilterCountries</a>: Builds the GROUPSET with the gruops belonging to the country(ies).</li>
<li><a href="##(GROUPSET).FilterPrefixes">GROUPSET.FilterPrefixes</a>: Builds the GROUPSET with the groups starting with the same prefix string(s).</li>
</ul>
<p>Once the filter criteria have been set for the GROUPSET, you can start filtering using:</p>
<ul>
<li><a href="##(GROUPSET).FilterStart">GROUPSET.FilterStart</a>: Starts the filtering of the groups within the GROUPSET.</li>
</ul>
<p>Planned filter criteria within development are (so these are not yet available):</p>
<ul>
<li><a href="##(GROUPSET).FilterZones">GROUPSET.FilterZones</a>: Builds the GROUPSET with the groups within a <a href="Zone.html##(ZONE)">Zone#ZONE</a>.</li>
</ul>
<h1>GROUPSET iterators:</h1>
<p>Once the filters have been defined and the GROUPSET has been built, you can iterate the GROUPSET with the available iterator methods.
The iterator methods will walk the GROUPSET set, and call for each element within the set a function that you provide.
The following iterator methods are currently available within the GROUPSET:</p>
<ul>
<li><a href="##(GROUPSET).ForEachGroup">GROUPSET.ForEachGroup</a>: Calls a function for each alive group it finds within the GROUPSET.</li>
</ul>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#GROUPSET">GROUPSET</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(GROUPSET)">Type <code>GROUPSET</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).AddInDatabase">GROUPSET:AddInDatabase(Event)</a></td>
<td class="summary">
<p>Handles the Database to check on an event (birth) that the Object was added in the Database.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).ClassName">GROUPSET.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).Filter">GROUPSET.Filter</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).FilterCategories">GROUPSET:FilterCategories(Categories)</a></td>
<td class="summary">
<p>Builds a set of groups out of categories.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).FilterCoalitions">GROUPSET:FilterCoalitions(Coalitions)</a></td>
<td class="summary">
<p>Builds a set of groups of coalitions.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).FilterCountries">GROUPSET:FilterCountries(Countries)</a></td>
<td class="summary">
<p>Builds a set of groups of defined countries.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).FilterMeta">GROUPSET.FilterMeta</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).FilterPrefixes">GROUPSET:FilterPrefixes(Prefixes)</a></td>
<td class="summary">
<p>Builds a set of groups of defined GROUP prefixes.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).FilterStart">GROUPSET:FilterStart()</a></td>
<td class="summary">
<p>Starts the filtering.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).FindGroup">GROUPSET:FindGroup(GroupName)</a></td>
<td class="summary">
<p>Finds a Group based on the Group Name.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).FindInDatabase">GROUPSET:FindInDatabase(Event)</a></td>
<td class="summary">
<p>Handles the Database to check on any event that Object exists in the Database.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).ForEachGroup">GROUPSET:ForEachGroup(IteratorFunction, ...)</a></td>
<td class="summary">
<p>Interate the GROUPSET and call an interator function for each <strong>alive</strong> GROUP, providing the GROUP and optional parameters.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).IsIncludeObject">GROUPSET:IsIncludeObject(MooseGroup)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUPSET).New">GROUPSET:New()</a></td>
<td class="summary">
<p>Creates a new GROUPSET object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.</p>
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(GROUPSET)">#GROUPSET</a></em>
<a id="GROUPSET" >
<strong>GROUPSET</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<h2><a id="#(GroupSet)" >Type <code>GroupSet</code></a></h2>
<h2><a id="#(GROUPSET)" >Type <code>GROUPSET</code></a></h2>
<p>GROUPSET class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(GROUPSET).AddInDatabase" >
<strong>GROUPSET:AddInDatabase(Event)</strong>
</a>
</dt>
<dd>
<p>Handles the Database to check on an event (birth) that the Object was added in the Database.</p>
<p>This is required, because sometimes the _DATABASE birth event gets called later than the SET birth event!</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Event.html##(EVENTDATA)">Event#EVENTDATA</a> Event </em></code>: </p>
</li>
</ul>
<h3>Return values</h3>
<ol>
<li>
<p><em>#string:</em>
The name of the GROUP</p>
</li>
<li>
<p><em>#table:</em>
The GROUP</p>
</li>
</ol>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(GROUPSET).ClassName" >
<strong>GROUPSET.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(GROUPSET).Filter" >
<strong>GROUPSET.Filter</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUPSET).FilterCategories" >
<strong>GROUPSET:FilterCategories(Categories)</strong>
</a>
</dt>
<dd>
<p>Builds a set of groups out of categories.</p>
<p>Possible current categories are plane, helicopter, ground, ship.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string Categories </em></code>:
Can take the following values: "plane", "helicopter", "ground", "ship".</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(GROUPSET)">#GROUPSET</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUPSET).FilterCoalitions" >
<strong>GROUPSET:FilterCoalitions(Coalitions)</strong>
</a>
</dt>
<dd>
<p>Builds a set of groups of coalitions.</p>
<p>Possible current coalitions are red, blue and neutral.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string Coalitions </em></code>:
Can take the following values: "red", "blue", "neutral".</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(GROUPSET)">#GROUPSET</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUPSET).FilterCountries" >
<strong>GROUPSET:FilterCountries(Countries)</strong>
</a>
</dt>
<dd>
<p>Builds a set of groups of defined countries.</p>
<p>Possible current countries are those known within DCS world.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string Countries </em></code>:
Can take those country strings known within DCS world.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(GROUPSET)">#GROUPSET</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(GROUPSET).FilterMeta" >
<strong>GROUPSET.FilterMeta</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUPSET).FilterPrefixes" >
<strong>GROUPSET:FilterPrefixes(Prefixes)</strong>
</a>
</dt>
<dd>
<p>Builds a set of groups of defined GROUP prefixes.</p>
<p>All the groups starting with the given prefixes will be included within the set.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string Prefixes </em></code>:
The prefix of which the group name starts with.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(GROUPSET)">#GROUPSET</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUPSET).FilterStart" >
<strong>GROUPSET:FilterStart()</strong>
</a>
</dt>
<dd>
<p>Starts the filtering.</p>
<h3>Return value</h3>
<p><em><a href="##(GROUPSET)">#GROUPSET</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUPSET).FindGroup" >
<strong>GROUPSET:FindGroup(GroupName)</strong>
</a>
</dt>
<dd>
<p>Finds a Group based on the Group Name.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string GroupName </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Group.html##(GROUP)">Group#GROUP</a>:</em>
The found Group.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUPSET).FindInDatabase" >
<strong>GROUPSET:FindInDatabase(Event)</strong>
</a>
</dt>
<dd>
<p>Handles the Database to check on any event that Object exists in the Database.</p>
<p>This is required, because sometimes the _DATABASE event gets called later than the SET event or vise versa!</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Event.html##(EVENTDATA)">Event#EVENTDATA</a> Event </em></code>: </p>
</li>
</ul>
<h3>Return values</h3>
<ol>
<li>
<p><em>#string:</em>
The name of the GROUP</p>
</li>
<li>
<p><em>#table:</em>
The GROUP</p>
</li>
</ol>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUPSET).ForEachGroup" >
<strong>GROUPSET:ForEachGroup(IteratorFunction, ...)</strong>
</a>
</dt>
<dd>
<p>Interate the GROUPSET and call an interator function for each <strong>alive</strong> GROUP, providing the GROUP and optional parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#function IteratorFunction </em></code>:
The function that will be called when there is an alive GROUP in the GROUPSET. The function needs to accept a GROUP parameter.</p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(GROUPSET)">#GROUPSET</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUPSET).IsIncludeObject" >
<strong>GROUPSET:IsIncludeObject(MooseGroup)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Group.html##(GROUP)">Group#GROUP</a> MooseGroup </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(GROUPSET)">#GROUPSET</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUPSET).New" >
<strong>GROUPSET:New()</strong>
</a>
</dt>
<dd>
<p>Creates a new GROUPSET object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.</p>
<h3>Return value</h3>
<p><em><a href="##(GROUPSET)">#GROUPSET</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>-- Define a new GROUPSET Object. This DBObject will contain a reference to all alive GROUPS.
DBObject = GROUPSET:New()</code></pre>
</dd>
</dl>
</div>
</div>
</body>
</html>