[Bf-blender-cvs] [fdb2167b4ad] master: Docs: use doxygen formatting for BLI
Campbell Barton
noreply at git.blender.org
Mon Dec 20 09:07:49 CET 2021
Commit: fdb2167b4ad9f140708e38bfcc30fdbd3168bf1e
Author: Campbell Barton
Date: Mon Dec 20 19:01:14 2021 +1100
Branches: master
https://developer.blender.org/rBfdb2167b4ad9f140708e38bfcc30fdbd3168bf1e
Docs: use doxygen formatting for BLI
Differentiate doc-strings from title/section text.
===================================================================
M source/blender/blenlib/BLI_assert.h
M source/blender/blenlib/BLI_color.hh
M source/blender/blenlib/BLI_compiler_compat.h
M source/blender/blenlib/BLI_delaunay_2d.h
M source/blender/blenlib/BLI_dlrbTree.h
M source/blender/blenlib/BLI_endian_switch.h
M source/blender/blenlib/BLI_endian_switch_inline.h
M source/blender/blenlib/BLI_filereader.h
M source/blender/blenlib/BLI_ghash.h
M source/blender/blenlib/BLI_kdtree_impl.h
M source/blender/blenlib/BLI_linklist_lockfree.h
M source/blender/blenlib/BLI_math_base.h
M source/blender/blenlib/BLI_math_bits.h
M source/blender/blenlib/BLI_math_geom.h
M source/blender/blenlib/BLI_math_matrix.h
M source/blender/blenlib/BLI_math_rotation.h
M source/blender/blenlib/BLI_math_vector.h
M source/blender/blenlib/BLI_mempool.h
M source/blender/blenlib/BLI_quadric.h
M source/blender/blenlib/BLI_scanfill.h
M source/blender/blenlib/BLI_session_uuid.h
M source/blender/blenlib/BLI_sort.h
M source/blender/blenlib/BLI_sys_types.h
M source/blender/blenlib/BLI_system.h
M source/blender/blenlib/BLI_task.h
M source/blender/blenlib/BLI_threads.h
M source/blender/blenlib/BLI_timer.h
M source/blender/blenlib/BLI_virtual_array.hh
M source/blender/blenlib/BLI_virtual_vector_array.hh
M source/blender/blenlib/BLI_winstuff.h
===================================================================
diff --git a/source/blender/blenlib/BLI_assert.h b/source/blender/blenlib/BLI_assert.h
index 6019f0f3566..e32a19cfc25 100644
--- a/source/blender/blenlib/BLI_assert.h
+++ b/source/blender/blenlib/BLI_assert.h
@@ -30,6 +30,7 @@ extern "C" {
#endif
/* Utility functions. */
+
void _BLI_assert_print_pos(const char *file, const int line, const char *function, const char *id);
void _BLI_assert_print_extra(const char *str);
void _BLI_assert_print_backtrace(void);
diff --git a/source/blender/blenlib/BLI_color.hh b/source/blender/blenlib/BLI_color.hh
index d93bd7f6f76..dce625777b9 100644
--- a/source/blender/blenlib/BLI_color.hh
+++ b/source/blender/blenlib/BLI_color.hh
@@ -73,27 +73,27 @@ namespace blender {
* - Add non RGB spaces/storages ColorXyz.
*/
-/* Enumeration containing the different alpha modes. */
+/** Enumeration containing the different alpha modes. */
enum class eAlpha {
- /* Color and alpha are unassociated. */
+ /** Color and alpha are unassociated. */
Straight,
- /* Color and alpha are associated. */
+ /** Color and alpha are associated. */
Premultiplied,
};
std::ostream &operator<<(std::ostream &stream, const eAlpha &space);
-/* Enumeration containing internal spaces. */
+/** Enumeration containing internal spaces. */
enum class eSpace {
- /* Blender theme color space (sRGB). */
+ /** Blender theme color space (sRGB). */
Theme,
- /* Blender internal scene linear color space (maps to SceneReference role in OCIO). */
+ /** Blender internal scene linear color space (maps to SceneReference role in OCIO). */
SceneLinear,
- /* Blender internal scene linear color space compressed to be stored in 4 uint8_t. */
+ /** Blender internal scene linear color space compressed to be stored in 4 uint8_t. */
SceneLinearByteEncoded,
};
std::ostream &operator<<(std::ostream &stream, const eSpace &space);
-/* Template class to store RGBA values with different precision, space and alpha association. */
+/** Template class to store RGBA values with different precision, space and alpha association. */
template<typename ChannelStorageType, eSpace Space, eAlpha Alpha> class ColorRGBA {
public:
ChannelStorageType r, g, b, a;
@@ -153,11 +153,13 @@ template<typename ChannelStorageType, eSpace Space, eAlpha Alpha> class ColorRGB
};
/* Forward declarations of concrete color classes. */
+
template<eAlpha Alpha> class ColorSceneLinear4f;
template<eAlpha Alpha> class ColorSceneLinearByteEncoded4b;
template<typename ChannelStorageType> class ColorTheme4;
/* Forward declaration of precision conversion methods. */
+
BLI_INLINE ColorTheme4<float> BLI_color_convert_to_theme4f(const ColorTheme4<uint8_t> &srgb4b);
BLI_INLINE ColorTheme4<uint8_t> BLI_color_convert_to_theme4b(const ColorTheme4<float> &srgb4f);
@@ -354,6 +356,7 @@ BLI_color_convert_to_theme4b(const ColorSceneLinear4f<eAlpha::Straight> &scene_l
}
/* Internal roles. For convenience to shorten the type names and hide complexity. */
+
using ColorGeometry4f = ColorSceneLinear4f<eAlpha::Premultiplied>;
using ColorGeometry4b = ColorSceneLinearByteEncoded4b<eAlpha::Premultiplied>;
diff --git a/source/blender/blenlib/BLI_compiler_compat.h b/source/blender/blenlib/BLI_compiler_compat.h
index bd8f84cedd6..023fea3853e 100644
--- a/source/blender/blenlib/BLI_compiler_compat.h
+++ b/source/blender/blenlib/BLI_compiler_compat.h
@@ -34,7 +34,7 @@
#if (defined(__GNUC__) || defined(__clang__)) && defined(__cplusplus)
extern "C++" {
-/* Some magic to be sure we don't have reference in the type. */
+/** Some magic to be sure we don't have reference in the type. */
template<typename T> static inline T decltype_helper(T x)
{
return x;
diff --git a/source/blender/blenlib/BLI_delaunay_2d.h b/source/blender/blenlib/BLI_delaunay_2d.h
index 658dcadadce..db0df95499f 100644
--- a/source/blender/blenlib/BLI_delaunay_2d.h
+++ b/source/blender/blenlib/BLI_delaunay_2d.h
@@ -222,7 +222,7 @@ void BLI_delaunay_2d_cdt_free(CDT_result *result);
namespace blender::meshintersect {
-/* vec2<Arith_t> is a 2d vector with Arith_t as the type for coordinates. */
+/** #vec2<Arith_t> is a 2d vector with #Arith_t as the type for coordinates. */
template<typename Arith_t> struct vec2_impl;
template<> struct vec2_impl<double> {
typedef double2 type;
diff --git a/source/blender/blenlib/BLI_dlrbTree.h b/source/blender/blenlib/BLI_dlrbTree.h
index 72f18244d5b..3cf849efaef 100644
--- a/source/blender/blenlib/BLI_dlrbTree.h
+++ b/source/blender/blenlib/BLI_dlrbTree.h
@@ -40,7 +40,7 @@ extern "C" {
/** \name Base Structs
* \{ */
-/* Basic Layout for a Node */
+/** Basic Layout for a Node. */
typedef struct DLRBT_Node {
/* ListBase capabilities */
struct DLRBT_Node *next, *prev;
@@ -53,7 +53,7 @@ typedef struct DLRBT_Node {
/* ... for nice alignment, next item should usually be a char too... */
} DLRBT_Node;
-/* Red/Black defines for tree_col */
+/** Red/Black defines for tree_col. */
typedef enum eDLRBT_Colors {
DLRBT_BLACK = 0,
DLRBT_RED,
@@ -61,7 +61,7 @@ typedef enum eDLRBT_Colors {
/* -------- */
-/* The Tree Data */
+/** The Tree Data. */
typedef struct DLRBT_Tree {
/* ListBase capabilities */
void *first, *last; /* these should be based on DLRBT_Node-s */
diff --git a/source/blender/blenlib/BLI_endian_switch.h b/source/blender/blenlib/BLI_endian_switch.h
index b512133b34c..e6ccbe4629a 100644
--- a/source/blender/blenlib/BLI_endian_switch.h
+++ b/source/blender/blenlib/BLI_endian_switch.h
@@ -30,6 +30,7 @@ extern "C" {
#endif
/* BLI_endian_switch_inline.h */
+
BLI_INLINE void BLI_endian_switch_int16(short *val) ATTR_NONNULL(1);
BLI_INLINE void BLI_endian_switch_uint16(unsigned short *val) ATTR_NONNULL(1);
BLI_INLINE void BLI_endian_switch_int32(int *val) ATTR_NONNULL(1);
@@ -40,6 +41,7 @@ BLI_INLINE void BLI_endian_switch_uint64(uint64_t *val) ATTR_NONNULL(1);
BLI_INLINE void BLI_endian_switch_double(double *val) ATTR_NONNULL(1);
/* endian_switch.c */
+
void BLI_endian_switch_int16_array(short *val, const int size) ATTR_NONNULL(1);
void BLI_endian_switch_uint16_array(unsigned short *val, const int size) ATTR_NONNULL(1);
void BLI_endian_switch_int32_array(int *val, const int size) ATTR_NONNULL(1);
diff --git a/source/blender/blenlib/BLI_endian_switch_inline.h b/source/blender/blenlib/BLI_endian_switch_inline.h
index ec4cfe4801a..31be7fd47e4 100644
--- a/source/blender/blenlib/BLI_endian_switch_inline.h
+++ b/source/blender/blenlib/BLI_endian_switch_inline.h
@@ -33,6 +33,7 @@ extern "C" {
* use bit shifting instead. */
/* *** 16 *** */
+
BLI_INLINE void BLI_endian_switch_int16(short *val)
{
BLI_endian_switch_uint16((unsigned short *)val);
@@ -48,6 +49,7 @@ BLI_INLINE void BLI_endian_switch_uint16(unsigned short *val)
}
/* *** 32 *** */
+
BLI_INLINE void BLI_endian_switch_int32(int *val)
{
BLI_endian_switch_uint32((unsigned int *)val);
@@ -67,6 +69,7 @@ BLI_INLINE void BLI_endian_switch_float(float *val)
}
/* *** 64 *** */
+
BLI_INLINE void BLI_endian_switch_int64(int64_t *val)
{
BLI_endian_switch_uint64((uint64_t *)val);
diff --git a/source/blender/blenlib/BLI_filereader.h b/source/blender/blenlib/BLI_filereader.h
index da223cddf40..f232ad72cc4 100644
--- a/source/blender/blenlib/BLI_filereader.h
+++ b/source/blender/blenlib/BLI_filereader.h
@@ -47,7 +47,7 @@ typedef ssize_t (*FileReaderReadFn)(struct FileReader *reader, void *buffer, siz
typedef off64_t (*FileReaderSeekFn)(struct FileReader *reader, off64_t offset, int whence);
typedef void (*FileReaderCloseFn)(struct FileReader *reader);
-/* General structure for all FileReaders, implementations add custom fields at the end. */
+/** General structure for all #FileReaders, implementations add custom fields at the end. */
typedef struct FileReader {
FileReaderReadFn read;
FileReaderSeekFn seek;
@@ -64,16 +64,16 @@ typedef struct FileReader {
* take over the base FileReader and will clean it up when their clean() is called.
*/
-/* Create FileReader from raw file descriptor. */
+/** Create #FileReader from raw file descriptor. */
FileReader *BLI_filereader_new_file(int filedes) ATTR_WARN_UNUSED_RESULT;
-/* Create FileReader from raw file descriptor using memory-mapped IO. */
+/** Create #FileReader from raw file descriptor using memory-mapped IO. */
FileReader *BLI_filereader_new_mmap(int filedes) ATTR_WARN_UNUSED_RESULT;
-/* Create FileReader from a region of memory. */
+/** Create #FileReader from a region of memory. */
FileReader *BLI_filereader_new_memory(const void *data, size_t len) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
-/* Create FileReader from applying `Zstd` decompression on an underlying file. */
+/** Create #FileReader from applying `Zstd` decompression on an underlying file. */
FileReader *BLI_filereader_new_zstd(FileReader *base) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-/* Create FileReader from applying `Gzip` decompression on an underlying file. */
+/** Create #FileReader from applying `Gzip` decompression on an underlying file. */
FileReader *BLI_filereader_new_gzip(FileReader *base) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
#ifdef __cplusplus
diff --git a/source/blender/blenlib/BLI_ghash.h b/source/blender/blenlib/BLI_ghash.h
index 0194f9aad40..fca705535a3 100644
--- a/source/blender/blenlib/BLI_ghash.h
+++ b/source/blender/blenlib/BLI_ghash.h
@@ -450,7 +450,7 @@ void *BLI_gset_pop_key(GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT;
/* rely on inline api for now */
-/* so we can cast but compiler sees as different */
+/** Use a GSet specific type so we can cast but compiler sees as different */
typedef struct GSetIterator {
GHashIterator _ghi
#if defined(__GNUC__) && !defined(__clang__)
diff --git a/source/blender/blenlib/BLI_kdtree_impl.h b/source/blender/blenlib/BLI_kdtree_impl.h
index 26a22fc2ac4..35dbf141c92 100644
--- a/source/blender/blenlib/BLI_kdtree_impl.h
+++ b/source/blender/blenlib/BLI_kdtree_impl.h
@@ -74,7 +74,7 @@ int BLI_kdtree_nd_(calc_duplicates_fast)(const KDTree *tree,
int BLI_kdtree_nd_(deduplicate)(KDTree *tree);
-/* Versions of find/range search that take a squared distance callback to support bias. */
+/** Versions of find/range search that take a squared
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list