Selaa lähdekoodia

general: improvements to doxygen API reference:
* In C++ reference, only pick up classes defined in .h file
* Add a few excludes to C++ reference that aren't public API
* On class index pages, reduce number of columns
* Add @since for some methods/classes that are new in 1.10.0
* Fix/improve a few docstrings here and there

rdb 7 vuotta sitten
vanhempi
sitoutus
9d12a4c437

+ 14 - 4
direct/src/directscripts/Doxyfile.cxx

@@ -432,7 +432,7 @@ EXTRACT_STATIC         = NO
 # for Java sources.
 # The default value is: YES.
 
-EXTRACT_LOCAL_CLASSES  = YES
+EXTRACT_LOCAL_CLASSES  = NO
 
 # This flag is only useful for Objective-C code. When set to YES local methods,
 # which are defined in the implementation section but not in the interface are
@@ -802,6 +802,11 @@ EXCLUDE                = dtool/src/parser-inc \
                          panda/src/iphone \
                          panda/src/tinydisplay \
                          panda/src/movies/dr_flac.h \
+                         panda/src/windisplay/winDetectDx.h \
+                         panda/src/wgldisplay/wglext.h \
+                         panda/src/glxdisplay/panda_glxext.h \
+                         pandatool/src/gtk-stats \
+                         dtool/src/dtoolbase/fakestringstream.h \
                          dtool/src/dtoolbase/pdtoa.cxx \
                          dtool/src/dtoolutil/panda_getopt_long.h \
                          dtool/src/dtoolutil/panda_getopt_impl.h \
@@ -840,7 +845,10 @@ EXCLUDE_PATTERNS       = */Opt*-*/* \
 # Note that the wildcards are matched against the file with absolute path, so to
 # exclude all test directories use the pattern */test/*
 
-EXCLUDE_SYMBOLS        =
+EXCLUDE_SYMBOLS        = InterrogateFunctionWrapper::Parameter \
+                         CollisionFloorMesh::TriangleIndices \
+                         tagTOUCHINPUT \
+                         WINDOW_METRICS
 
 # The EXAMPLE_PATH tag can be used to specify one or more files or directories
 # that contain example code fragments that are included (see the \include
@@ -1018,7 +1026,7 @@ ALPHABETICAL_INDEX     = YES
 # Minimum value: 1, maximum value: 20, default value: 5.
 # This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
 
-COLS_IN_ALPHA_INDEX    = 5
+COLS_IN_ALPHA_INDEX    = 3
 
 # In case all classes in a project start with a common prefix, all classes will
 # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
@@ -1972,6 +1980,7 @@ INCLUDE_FILE_PATTERNS  =
 
 PREDEFINED             = TVOLATILE= \
                          INLINE=inline \
+                         ALWAYS_INLINE=inline \
                          PUBLISHED=public \
                          protected=private \
                          INLINE_LINMATH=inline \
@@ -1986,7 +1995,8 @@ PREDEFINED             = TVOLATILE= \
                          MAKE_SEQ(x)= \
                          MAKE_SEQ_PROPERTY(x)= \
                          MAKE_MAP_PROPERTY(x)= \
-                         MAKE_MAP_KEYS_SEQ(x)=
+                         MAKE_MAP_KEYS_SEQ(x)= \
+                         RETURNS_ALIGNED(x)=
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
 # tag can be used to specify a list of macro names that should be expanded. The

+ 1 - 1
direct/src/directscripts/Doxyfile.python

@@ -805,7 +805,7 @@ ALPHABETICAL_INDEX     = YES
 # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
 # in which this list will be split (can be a number in the range [1..20])
 
-COLS_IN_ALPHA_INDEX    = 5
+COLS_IN_ALPHA_INDEX    = 2
 
 # In case all classes in a project start with a common prefix, all 
 # classes will be put under the same header in the alphabetical index. 

+ 2 - 0
panda/src/device/evdevInputDevice.h

@@ -24,6 +24,8 @@ class LinuxInputDeviceManager;
  * This is a type of device that uses the Linux /dev/input/event# API to read
  * data from a raw mouse or other input device.  Unlike the joystick API, the
  * evdev API supports sending force feedback (ie. rumble) events.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_DEVICE EvdevInputDevice : public InputDevice {
 public:

+ 2 - 0
panda/src/device/inputDevice.h

@@ -47,6 +47,8 @@
  * There is the DeviceType enumeration, however, which will (if known) contain
  * identification of the general category of devices this fits in, such as
  * keyboard, mouse, gamepad, or flight stick.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_DEVICE InputDevice : public TypedReferenceCount {
 PUBLISHED:

+ 2 - 0
panda/src/device/inputDeviceManager.h

@@ -27,6 +27,8 @@ class WinRawInputDevice;
 /**
  * This class keeps track of all the devices on a system, and sends out events
  * when a device has been hot-plugged.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_DEVICE InputDeviceManager {
 protected:

+ 2 - 0
panda/src/device/linuxJoystickDevice.h

@@ -23,6 +23,8 @@ class LinuxInputDeviceManager;
 /**
  * This is a type of device that uses the Linux /dev/input/js# API to read
  * data from a game controller.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_DEVICE LinuxJoystickDevice : public InputDevice {
 PUBLISHED:

+ 2 - 0
panda/src/device/winRawInputDevice.h

@@ -25,6 +25,8 @@ class WinInputDeviceManager;
 /**
  * This implementation of InputDevice uses the Win32 raw input API and the HID
  * parser library to support a wide range of devices.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_DEVICE WinRawInputDevice final : public InputDevice {
 public:

+ 2 - 0
panda/src/device/xInputDevice.h

@@ -31,6 +31,8 @@ typedef struct tagRID_DEVICE_INFO RID_DEVICE_INFO;
 /**
  * This implementation of InputDevice uses Microsoft's XInput library to
  * interface with an Xbox 360 game controller.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_DEVICE XInputDevice final : public InputDevice {
 public:

+ 17 - 15
panda/src/egg/eggMaterial.I

@@ -12,7 +12,7 @@
  */
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE void EggMaterial::
 set_base(const LColor &base) {
@@ -21,7 +21,7 @@ set_base(const LColor &base) {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE void EggMaterial::
 clear_base() {
@@ -29,7 +29,7 @@ clear_base() {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE bool EggMaterial::
 has_base() const {
@@ -39,6 +39,8 @@ has_base() const {
 /**
  * It is legal to call this even if has_base() returns false.  If so, it
  * simply returns the default base color.
+ *
+ * @since 1.10.0
  */
 INLINE LColor EggMaterial::
 get_base() const {
@@ -239,7 +241,7 @@ get_shininess() const {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE void EggMaterial::
 set_roughness(double roughness) {
@@ -248,7 +250,7 @@ set_roughness(double roughness) {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE void EggMaterial::
 clear_roughness() {
@@ -256,7 +258,7 @@ clear_roughness() {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE bool EggMaterial::
 has_roughness() const {
@@ -264,7 +266,7 @@ has_roughness() const {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE double EggMaterial::
 get_roughness() const {
@@ -276,7 +278,7 @@ get_roughness() const {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE void EggMaterial::
 set_metallic(double metallic) {
@@ -285,7 +287,7 @@ set_metallic(double metallic) {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE void EggMaterial::
 clear_metallic() {
@@ -293,7 +295,7 @@ clear_metallic() {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE bool EggMaterial::
 has_metallic() const {
@@ -301,7 +303,7 @@ has_metallic() const {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE double EggMaterial::
 get_metallic() const {
@@ -313,7 +315,7 @@ get_metallic() const {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE void EggMaterial::
 set_ior(double ior) {
@@ -322,7 +324,7 @@ set_ior(double ior) {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE void EggMaterial::
 clear_ior() {
@@ -330,7 +332,7 @@ clear_ior() {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE bool EggMaterial::
 has_ior() const {
@@ -338,7 +340,7 @@ has_ior() const {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE double EggMaterial::
 get_ior() const {

+ 2 - 0
panda/src/event/asyncFuture.h

@@ -55,6 +55,8 @@ class ConditionVarFull;
  * coroutine, which only suspends the current task and not the entire thread.
  *
  * This API aims to mirror and be compatible with Python's Future class.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_EVENT AsyncFuture : public TypedReferenceCount {
 PUBLISHED:

+ 8 - 1
panda/src/express/weakPointerTo.I

@@ -118,9 +118,11 @@ operator T * () const {
 /**
  * A thread-safe way to access the underlying pointer; will silently return
  * null if the underlying pointer was deleted or null.
- * Note that this may return null even if was_deleted() still returns true,
+ * Note that this may return null even if was_deleted() still returns false,
  * which can occur if the object has reached reference count 0 and is about to
  * be destroyed.
+ *
+ * @since 1.10.0
  */
 template<class T>
 INLINE PointerTo<T> WeakPointerTo<T>::
@@ -397,6 +399,11 @@ operator const T * () const {
 /**
  * A thread-safe way to access the underlying pointer; will silently return
  * null if the underlying pointer was deleted or null.
+ * Note that this may return null even if was_deleted() still returns false,
+ * which can occur if the object has reached reference count 0 and is about to
+ * be destroyed.
+ *
+ * @since 1.10.0
  */
 template<class T>
 INLINE ConstPointerTo<T> WeakConstPointerTo<T>::

+ 1 - 1
panda/src/express/weakPointerToBase.I

@@ -290,7 +290,7 @@ update_type(To *ptr) {
  * A thread-safe way to access the underlying pointer; will only write to the
  * given pointer if the underlying pointer has not yet been deleted and is not
  * null.  Note that it may leave the pointer unassigned even if was_deleted()
- * still returns true, which can occur if the object has reached reference
+ * still returns false, which can occur if the object has reached reference
  * count 0 and is about to be destroyed.
  */
 template<class T>

+ 6 - 0
panda/src/express/weakReferenceList.I

@@ -13,6 +13,8 @@
 
 /**
  * Increases the number of weak references.
+ *
+ * @since 1.10.0
  */
 INLINE void WeakReferenceList::
 ref() const {
@@ -23,6 +25,8 @@ ref() const {
  * Decreases the number of weak references.  Returns true if, after this,
  * there are still any weak or strong references remaining, or false if this
  * structure should be deleted right away.
+ *
+ * @since 1.10.0
  */
 INLINE bool WeakReferenceList::
 unref() const {
@@ -32,6 +36,8 @@ unref() const {
 /**
  * Returns true if the object represented has been deleted, ie. there are only
  * weak references left pointing to the object.
+ *
+ * @since 1.10.0
  */
 INLINE bool WeakReferenceList::
 was_deleted() const {

+ 6 - 0
panda/src/express/weakReferenceList.cxx

@@ -37,6 +37,8 @@ WeakReferenceList::
  *
  * The data pointer can be an arbitrary pointer and is passed as only argument
  * to the callback.
+ *
+ * @since 1.10.0
  */
 void WeakReferenceList::
 add_callback(WeakPointerCallback *callback, void *data) {
@@ -61,6 +63,8 @@ add_callback(WeakPointerCallback *callback, void *data) {
  * weak reference-counting pointer), this removes the indicated PointerToVoid
  * structure from the list of such structures that are maintaining a weak
  * pointer to this object.
+ *
+ * @since 1.10.0
  */
 void WeakReferenceList::
 remove_callback(WeakPointerCallback *callback) {
@@ -73,6 +77,8 @@ remove_callback(WeakPointerCallback *callback) {
 /**
  * Called only by the ReferenceCount pointer to indicate that it has been
  * deleted.
+ *
+ * @since 1.10.0
  */
 void WeakReferenceList::
 mark_deleted() {

+ 2 - 0
panda/src/gobj/geom.I

@@ -215,6 +215,8 @@ make_patches() const {
 /**
  * Returns a new Geom with each primitive converted into a corresponding
  * version with adjacency information.
+ *
+ * @since 1.10.0
  */
 INLINE PT(Geom) Geom::
 make_adjacency() const {

+ 2 - 0
panda/src/gobj/geom.cxx

@@ -892,6 +892,8 @@ make_patches_in_place() {
  *
  * Don't call this in a downstream thread unless you don't mind it blowing
  * away other changes you might have recently made in an upstream thread.
+ *
+ * @since 1.10.0
  */
 void Geom::
 make_adjacency_in_place() {

+ 2 - 0
panda/src/gobj/geomLinesAdjacency.h

@@ -20,6 +20,8 @@
 /**
  * Defines a series of disconnected line segments with adjacency information,
  * for use with geometry shaders.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_GOBJ GeomLinesAdjacency : public GeomPrimitive {
 PUBLISHED:

+ 3 - 1
panda/src/gobj/geomLinestripsAdjacency.h

@@ -18,7 +18,9 @@
 #include "geomPrimitive.h"
 
 /**
- * Defines a series of line strips.
+ * Defines a series of line strips with adjacency information.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_GOBJ GeomLinestripsAdjacency : public GeomPrimitive {
 PUBLISHED:

+ 2 - 0
panda/src/gobj/geomPrimitive.cxx

@@ -1038,6 +1038,8 @@ make_patches() const {
 /**
  * Adds adjacency information to this primitive.  May return null if this type
  * of geometry does not support adjacency information.
+ *
+ * @since 1.10.0
  */
 CPT(GeomPrimitive) GeomPrimitive::
 make_adjacency() const {

+ 2 - 0
panda/src/gobj/geomTrianglesAdjacency.h

@@ -19,6 +19,8 @@
 
 /**
  * Defines a series of disconnected triangles, with adjacency information.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_GOBJ GeomTrianglesAdjacency : public GeomPrimitive {
 PUBLISHED:

+ 3 - 1
panda/src/gobj/geomTristripsAdjacency.h

@@ -18,7 +18,9 @@
 #include "geomPrimitive.h"
 
 /**
- * Defines a series of triangle strips.
+ * Defines a series of triangle strips with adjacency information.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_GOBJ GeomTristripsAdjacency : public GeomPrimitive {
 PUBLISHED:

+ 2 - 0
panda/src/gobj/shaderBuffer.h

@@ -27,6 +27,8 @@ class PreparedGraphicsObjects;
 
 /**
  * This is a generic buffer object that lives in graphics memory.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_GOBJ ShaderBuffer : public TypedWritableReferenceCount, public Namable, public GeomEnums {
 private:

+ 4 - 0
panda/src/gobj/texture.I

@@ -175,6 +175,8 @@ setup_cube_map(int size, ComponentType component_type, Format format) {
  * is not the same as the z_size.  Follow up with read() or load() to fill the
  * texture properties and image data, or use set_clear_color to let the
  * texture be cleared to a solid color.
+ *
+ * @since 1.10.0
  */
 INLINE void Texture::
 setup_cube_map_array(int num_cube_maps) {
@@ -189,6 +191,8 @@ setup_cube_map_array(int num_cube_maps) {
  *
  * The num_cube_maps given here is multiplied by six to become the z_size of
  * the image.
+ *
+ * @since 1.10.0
  */
 INLINE void Texture::
 setup_cube_map_array(int size, int num_cube_maps, ComponentType component_type, Format format) {

+ 2 - 0
panda/src/movies/flacAudio.h

@@ -21,6 +21,8 @@ class FlacAudioCursor;
 
 /**
  * Reads FLAC audio files.  Ogg-encapsulated FLAC files are not supported.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_MOVIES FlacAudio : public MovieAudio {
 PUBLISHED:

+ 4 - 2
panda/src/movies/flacAudioCursor.h

@@ -25,8 +25,10 @@ extern "C" {
 class FlacAudio;
 
 /**
- * Interfaces with the libvorbisfile library to implement decoding of Ogg
- * Vorbis audio files.
+ * Implements decoding of FLAC audio files.
+ *
+ * @see FlacAudio
+ * @since 1.10.0
  */
 class EXPCL_PANDA_MOVIES FlacAudioCursor : public MovieAudioCursor {
 PUBLISHED:

+ 2 - 0
panda/src/movies/opusAudio.h

@@ -24,6 +24,8 @@ class OpusAudioCursor;
 /**
  * Interfaces with the libopusfile library to implement decoding of Opus
  * audio files.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_MOVIES OpusAudio : public MovieAudio {
 PUBLISHED:

+ 3 - 0
panda/src/movies/opusAudioCursor.h

@@ -28,6 +28,9 @@ class OpusAudio;
 /**
  * Interfaces with the libopusfile library to implement decoding of Opus
  * audio files.
+ *
+ * @see OpusAudio
+ * @since 1.10.0
  */
 class EXPCL_PANDA_MOVIES OpusAudioCursor : public MovieAudioCursor {
 PUBLISHED:

+ 4 - 0
panda/src/pgraph/light.I

@@ -78,6 +78,8 @@ set_color(const LColor &color) {
 /**
  * Returns true if the color was specified as a temperature in kelvins, and
  * get_color_temperature is defined.
+ *
+ * @since 1.10.0
  */
 INLINE bool Light::
 has_color_temperature() const {
@@ -87,6 +89,8 @@ has_color_temperature() const {
 /**
  * Returns the basic color temperature of the light, assuming
  * has_color_temperature() returns true.
+ *
+ * @since 1.10.0
  */
 INLINE PN_stdfloat Light::
 get_color_temperature() const {

+ 2 - 0
panda/src/pgraph/light.cxx

@@ -70,6 +70,8 @@ is_ambient_light() const {
  *
  * The default value is 6500 K, corresponding to a perfectly white light
  * assuming a D65 white point.
+ *
+ * @since 1.10.0
  */
 void Light::
 set_color_temperature(PN_stdfloat temperature) {

+ 2 - 0
panda/src/pgraph/logicOpAttrib.h

@@ -24,6 +24,8 @@ class FactoryParams;
  * If enabled, specifies that a custom logical operation be performed instead
  * of any color blending.  Setting it to a value other than M_none will cause
  * color blending to be disabled and the given logic operation to be performed.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_PGRAPH LogicOpAttrib : public RenderAttrib {
 PUBLISHED:

+ 2 - 0
panda/src/pgraphnodes/rectangleLight.h

@@ -22,6 +22,8 @@
 /**
  * This is a type of area light that is an axis aligned rectangle, pointing
  * along the Y axis in the positive direction.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_PGRAPHNODES RectangleLight : public LightLensNode {
 PUBLISHED:

+ 4 - 0
panda/src/pgraphnodes/shaderGenerator.cxx

@@ -573,6 +573,8 @@ analyze_renderstate(ShaderKey &key, const RenderState *rs) {
  * Call this if certain state has changed in such a way as to require a rerun
  * of the shader generator.  This should be rare because in most cases, the
  * shader generator will automatically regenerate shaders as necessary.
+ *
+ * @since 1.10.0
  */
 void ShaderGenerator::
 rehash_generated_shaders() {
@@ -614,6 +616,8 @@ rehash_generated_shaders() {
 /**
  * Removes all previously generated shaders, requiring all shaders to be
  * regenerated.  Does not clear cache of compiled shaders.
+ *
+ * @since 1.10.0
  */
 void ShaderGenerator::
 clear_generated_shaders() {

+ 2 - 0
panda/src/pgraphnodes/sphereLight.h

@@ -22,6 +22,8 @@
 /**
  * A sphere light is like a point light, except that it represents a sphere
  * with a radius, rather than being an infinitely thin point in space.
+ *
+ * @since 1.10.0
  */
 class EXPCL_PANDA_PGRAPHNODES SphereLight : public PointLight {
 PUBLISHED:

+ 7 - 1
panda/src/text/textProperties.I

@@ -801,6 +801,8 @@ get_text_scale() const {
 /**
  * Specifies the text direction.  If none is specified, it will be guessed
  * based on the contents of the string.
+ *
+ * @since 1.10.0
  */
 INLINE void TextProperties::
 set_direction(Direction direction) {
@@ -811,6 +813,8 @@ set_direction(Direction direction) {
 /**
  * Clears the text direction setting.  If no text direction is specified, it
  * will be guessed based on the contents of the string.
+ *
+ * @since 1.10.0
  */
 INLINE void TextProperties::
 clear_direction() {
@@ -819,7 +823,7 @@ clear_direction() {
 }
 
 /**
- *
+ * @since 1.10.0
  */
 INLINE bool TextProperties::
 has_direction() const {
@@ -828,6 +832,8 @@ has_direction() const {
 
 /**
  * Returns the direction of the text as specified by set_direction().
+ *
+ * @since 1.10.0
  */
 INLINE TextProperties::Direction TextProperties::
 get_direction() const {