:orphan: .. **************************************************************************** .. CUI .. .. The Advanced Framework for Simulation, Integration, and Modeling (AFSIM) .. .. The use, dissemination or disclosure of data in this file is subject to .. limitation or restriction. See accompanying README and LICENSE for details. .. **************************************************************************** WsfPlatformList --------------- .. class:: WsfPlatformList :container: :class:`WsfPlatformList` is a container of references to :class:`WsfPlatform` objects. Platform lists are returned by many script types including: * :method:`WsfPlatform::Peers ` * :method:`WsfPlatform::Subordinates ` In addition to the methods described below, the container may be processed using the **foreach** script language statement as follows: .. parsed-literal:: :class:`WsfPlatformList` platformList = ; foreach (:class:`WsfPlatform` p in platformList) { # ...Code to process the :class:`WsfPlatform` object referenced through the variable 'p'... } Methods ======= .. method:: int Count() int Size() Returns the number of entries list. .. method:: bool Empty() Returns true if the list is empty. .. note:: This is faster than checking for Count() != 0. .. method:: WsfPlatform Entry(int aIndex) WsfPlatform Get(int aIndex) Returns the entry at the given index, which must be in the range [ 0 .. Count()-1 ]. .. note:: The Get method allows the entries to be accessed via array indexing: e.g:: WsfPlatform p = platformList[i]; .. method:: Iterator WsfPlatformListIterator GetIterator() Returns an iterator that points to the beginning of the list. This is used by the script language to support the **foreach** command but may also be used directly. .. include:: _wsfplatformlist.wsf_mil.txt