: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. .. **************************************************************************** WsfTrackList ------------ .. class:: WsfTrackList :container: WsfTrackList is a container of references to :class:`WsfTrack` objects. A list of local tracks is typically retrieved as follows: .. parsed-literal:: :class:`WsfTrackList` tl = :method:`PLATFORM.MasterRawTrackList() `; In addition to the methods described below, the container may be processed using the **foreach** script language statement as follows: .. parsed-literal:: :class:`WsfTrackList` trackList = ; foreach (:class:`WsfTrack` t in trackList) { # ...Code to process the :class:`WsfTrack` object referenced through the variable 't'... } Methods ======= .. method:: int Count() int Size() Return the number of entries in the list. .. method:: bool Empty() Returns true if the list is empty. .. note:: This is faster than checking for Count() != 0. .. method:: WsfTrack Entry(int aIndex) WsfTrack Get(int aIndex) Return the entry at the given index. The index must be in the range [ 0 .. Count()-1 ] .. note:: The Get method allows the entries to be accessed via array indexing: e.g:: WsfTrack t = trackList[i]; .. method:: WsfTrack Find(WsfTrackId aTrackId) Find the entry with specified track ID. Using the :method:`IsValid() ` method on the return value will return false if the requested entry could not be found. .. method:: Iterator WsfTrackListIterator GetIterator() Return 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.