Documentation Standard: Script Class

This document extends the AFSIM Documentation Standard.

The .. class:: directive is used to document script classes. This directive creates an entry in the class index and a link target, referenceable with the :class: role.

Documenting Classes

Example

Markup

WsfGeoPoint newGeoPoint();
.. class:: WsfGeoPoint
<class-name> <class-instance-name>
.. class:: <class-name> [inherits <base-class>]

Cross-Referencing Classes

Markup

Result

Script Class Cross-Reference

See :class:`WsfGeoPoint`

Script Class Cross-Reference

See WsfGeoPoint

Script Class Methods

The .. method:: directive is used to document script class methods. This directive creates a link target that can be referenced by the :method: role.

Example

Markup

double alt = WsfGeoPoint.Altitude();
.. method:: double Altitude()
<return-type> <variable> = <class-name>.<method-name>( [<arg-list>] );
.. method:: <return-type> <method-name>( [<arg-list>] )

Cross-Referencing Class Methods

Markup

Result

Method Cross-Reference

See :method:`WsfGeoPoint.Altitude`

Method Cross-Reference

See WsfGeoPoint.Altitude

Script Class Page Structure

Script classes and their methods are available from within the AFSIM script context. Each defined script class is documented in its own page, containing a full list of that script class’s methods. These pages are targeted toward more advanced users and focus primarily on available methods.

Example Pages

Page Template

File: <script-class-name>.rst

<script-class-name>
===================

.. class:: <script-class-name> [inherits <inherited-class-name>]

Static Methods
--------------

.. method:: <return-type> <script-class-static-method-1>( [arg-list] )

...

Methods
-------

...

Other Methods
-------------

...