diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-05 03:10:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-05 03:10:25 +0300 |
commit | 2b66b372bc39e12f938488a008f38b1945d86aa9 (patch) | |
tree | d8f2409d99bd91d8998c129f76fd4dc82a2a91d5 /source | |
parent | 2dace5f3ef54cc25ed31fe20fd33df727f10a9ac (diff) |
Cleanup: use doxygen sections
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_attribute_access.hh | 26 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_noise.hh | 18 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_resource_scope.hh | 8 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_string_ref.hh | 32 | ||||
-rw-r--r-- | source/blender/functions/FN_field.hh | 32 | ||||
-rw-r--r-- | source/blender/functions/FN_multi_function_procedure.hh | 64 | ||||
-rw-r--r-- | source/blender/functions/intern/generic_virtual_array.cc | 87 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_select.c | 30 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_select_pick.c | 42 | ||||
-rw-r--r-- | source/blender/nodes/NOD_derived_node_tree.hh | 43 | ||||
-rw-r--r-- | source/blender/nodes/NOD_multi_function.hh | 16 | ||||
-rw-r--r-- | source/blender/nodes/NOD_node_declaration.hh | 40 | ||||
-rw-r--r-- | source/blender/nodes/NOD_node_tree_ref.hh | 56 | ||||
-rw-r--r-- | source/blender/nodes/NOD_socket_declarations.hh | 58 | ||||
-rw-r--r-- | source/blender/nodes/intern/node_socket_declarations.cc | 64 |
15 files changed, 390 insertions, 226 deletions
diff --git a/source/blender/blenkernel/BKE_attribute_access.hh b/source/blender/blenkernel/BKE_attribute_access.hh index 20b48160feb..ff2aebc7d10 100644 --- a/source/blender/blenkernel/BKE_attribute_access.hh +++ b/source/blender/blenkernel/BKE_attribute_access.hh @@ -373,9 +373,9 @@ class CustomDataAttributes { const AttributeDomain domain) const; }; -/* -------------------------------------------------------------------- - * #AttributeIDRef inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #AttributeIDRef Inline Methods + * \{ */ inline AttributeIDRef::AttributeIDRef() = default; @@ -438,9 +438,11 @@ inline const AnonymousAttributeID &AttributeIDRef::anonymous_id() const return *anonymous_id_; } -/* -------------------------------------------------------------------- - * #OutputAttribute inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #OutputAttribute Inline Methods + * \{ */ inline OutputAttribute::OutputAttribute() = default; inline OutputAttribute::OutputAttribute(OutputAttribute &&other) = default; @@ -496,11 +498,15 @@ template<typename T> inline MutableSpan<T> OutputAttribute::as_span() return this->as_span().typed<T>(); } +/** \} */ + } // namespace blender::bke -/* -------------------------------------------------------------------- - * Extern template instantiations that are defined in `intern/extern_implementations.cc`. - */ +/* -------------------------------------------------------------------- */ +/** \name External Template Instantiations + * + * Defined in `intern/extern_implementations.cc`. + * \{ */ namespace blender::bke { extern template class OutputAttribute_Typed<float>; @@ -509,3 +515,5 @@ extern template class OutputAttribute_Typed<float3>; extern template class OutputAttribute_Typed<bool>; extern template class OutputAttribute_Typed<ColorGeometry4f>; } // namespace blender::bke + +/** \} */ diff --git a/source/blender/blenlib/BLI_noise.hh b/source/blender/blenlib/BLI_noise.hh index 7e1655f7864..839bee0f2f4 100644 --- a/source/blender/blenlib/BLI_noise.hh +++ b/source/blender/blenlib/BLI_noise.hh @@ -22,12 +22,12 @@ namespace blender::noise { -/* -------------------------------------------------------------------- - * Hash functions. - +/* -------------------------------------------------------------------- */ +/** \name Hash Functions + * * Create a randomized hash from the given inputs. Contrary to hash functions in `BLI_hash.hh` * these functions produce better randomness but are more expensive to compute. - */ + * \{ */ /* Hash integers to `uint32_t`. */ uint32_t hash(uint32_t kx); @@ -53,9 +53,11 @@ float hash_float_to_float(float2 k); float hash_float_to_float(float3 k); float hash_float_to_float(float4 k); -/* -------------------------------------------------------------------- - * Perlin noise. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Perlin Noise + * \{ */ /* Perlin noise in the range [-1, 1]. */ float perlin_signed(float position); @@ -99,4 +101,6 @@ float3 perlin_float3_fractal_distorted(float4 position, float roughness, float distortion); +/** \} */ + } // namespace blender::noise diff --git a/source/blender/blenlib/BLI_resource_scope.hh b/source/blender/blenlib/BLI_resource_scope.hh index 8e88e251d30..f0d8e71478e 100644 --- a/source/blender/blenlib/BLI_resource_scope.hh +++ b/source/blender/blenlib/BLI_resource_scope.hh @@ -71,9 +71,9 @@ class ResourceScope : NonCopyable, NonMovable { LinearAllocator<> &linear_allocator(); }; -/* -------------------------------------------------------------------- - * #ResourceScope inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #ResourceScope Inline Methods + * \{ */ /** * Pass ownership of the resource to the ResourceScope. It will be destructed and freed when @@ -165,4 +165,6 @@ inline LinearAllocator<> &ResourceScope::linear_allocator() return allocator_; } +/** \} */ + } // namespace blender diff --git a/source/blender/blenlib/BLI_string_ref.hh b/source/blender/blenlib/BLI_string_ref.hh index 79d1f73bb93..4c2b26fe316 100644 --- a/source/blender/blenlib/BLI_string_ref.hh +++ b/source/blender/blenlib/BLI_string_ref.hh @@ -151,9 +151,9 @@ class StringRef : public StringRefBase { constexpr char operator[](int64_t index) const; }; -/* -------------------------------------------------------------------- - * #StringRefBase inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #StringRefBase Inline Methods + * \{ */ constexpr StringRefBase::StringRefBase(const char *data, const int64_t size) : data_(data), size_(size) @@ -418,9 +418,11 @@ constexpr StringRef StringRefBase::trim(StringRef characters_to_remove) const return this->substr(find_front, substr_len); } -/* -------------------------------------------------------------------- - * #StringRefNull inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #StringRefNull Inline Methods + * \{ */ constexpr StringRefNull::StringRefNull() : StringRefBase("", 0) { @@ -476,9 +478,11 @@ constexpr const char *StringRefNull::c_str() const return data_; } -/* -------------------------------------------------------------------- - * #StringRef inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #StringRef Inline Methods + * \{ */ constexpr StringRef::StringRef() : StringRefBase(nullptr, 0) { @@ -570,9 +574,11 @@ constexpr StringRef::StringRef(std::string_view view) { } -/* -------------------------------------------------------------------- - * Operator overloads - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Operator Overloads + * \{ */ inline std::ostream &operator<<(std::ostream &stream, StringRef ref) { @@ -632,4 +638,6 @@ constexpr bool operator>=(StringRef a, StringRef b) return std::string_view(a) >= std::string_view(b); } +/** \} */ + } // namespace blender diff --git a/source/blender/functions/FN_field.hh b/source/blender/functions/FN_field.hh index eeb97946029..f65c4e443f2 100644 --- a/source/blender/functions/FN_field.hh +++ b/source/blender/functions/FN_field.hh @@ -391,9 +391,9 @@ Vector<const GVArray *> evaluate_fields(ResourceScope &scope, const FieldContext &context, Span<GVMutableArray *> dst_varrays = {}); -/* -------------------------------------------------------------------- - * Utility functions for simple field creation and evaluation. - */ +/* -------------------------------------------------------------------- */ +/** \name Utility functions for simple field creation and evaluation + * \{ */ void evaluate_constant_field(const GField &field, void *r_value); @@ -423,9 +423,11 @@ class IndexFieldInput final : public FieldInput { ResourceScope &scope) const final; }; -/* -------------------------------------------------------------------- - * #FieldNode inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #FieldNode Inline Methods + * \{ */ inline FieldNode::FieldNode(bool is_input, bool depends_on_input) : is_input_(is_input), depends_on_input_(depends_on_input) @@ -467,9 +469,11 @@ inline bool operator!=(const FieldNode &a, const FieldNode &b) return !(a == b); } -/* -------------------------------------------------------------------- - * #FieldOperation inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #FieldOperation Inline Methods + * \{ */ inline Span<GField> FieldOperation::inputs() const { @@ -497,9 +501,11 @@ inline const CPPType &FieldOperation::output_cpp_type(int output_index) const return CPPType::get<float>(); } -/* -------------------------------------------------------------------- - * #FieldInput inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #FieldInput Inline Methods + * \{ */ inline std::string FieldInput::socket_inspection_name() const { @@ -523,4 +529,6 @@ inline const CPPType &FieldInput::output_cpp_type(int output_index) const return *type_; } +/** \} */ + } // namespace blender::fn diff --git a/source/blender/functions/FN_multi_function_procedure.hh b/source/blender/functions/FN_multi_function_procedure.hh index 4c06ce98ee3..a26eb1045a7 100644 --- a/source/blender/functions/FN_multi_function_procedure.hh +++ b/source/blender/functions/FN_multi_function_procedure.hh @@ -323,9 +323,9 @@ using MFDestructInstruction = fn::MFDestructInstruction; using MFProcedure = fn::MFProcedure; } // namespace multi_function_procedure_types -/* -------------------------------------------------------------------- - * MFInstructionCursor inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #MFInstructionCursor Inline Methods + * \{ */ inline MFInstructionCursor::MFInstructionCursor(MFCallInstruction &instruction) : type_(Call), instruction_(&instruction) @@ -367,9 +367,11 @@ inline MFInstructionCursor::Type MFInstructionCursor::type() const return type_; } -/* -------------------------------------------------------------------- - * MFVariable inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #MFVariable Inline Methods + * \{ */ inline MFDataType MFVariable::data_type() const { @@ -391,9 +393,11 @@ inline int MFVariable::id() const return id_; } -/* -------------------------------------------------------------------- - * MFInstruction inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #MFInstruction Inline Methods + * \{ */ inline MFInstructionType MFInstruction::type() const { @@ -405,9 +409,11 @@ inline Span<MFInstructionCursor> MFInstruction::prev() const return prev_; } -/* -------------------------------------------------------------------- - * MFCallInstruction inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #MFCallInstruction Inline Methods + * \{ */ inline const MultiFunction &MFCallInstruction::fn() const { @@ -434,9 +440,11 @@ inline Span<const MFVariable *> MFCallInstruction::params() const return params_; } -/* -------------------------------------------------------------------- - * MFBranchInstruction inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #MFBranchInstruction Inline Methods + * \{ */ inline MFVariable *MFBranchInstruction::condition() { @@ -468,9 +476,11 @@ inline const MFInstruction *MFBranchInstruction::branch_false() const return branch_false_; } -/* -------------------------------------------------------------------- - * MFDestructInstruction inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #MFDestructInstruction Inline Methods + * \{ */ inline MFVariable *MFDestructInstruction::variable() { @@ -492,9 +502,11 @@ inline const MFInstruction *MFDestructInstruction::next() const return next_; } -/* -------------------------------------------------------------------- - * MFDummyInstruction inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #MFDummyInstruction Inline Methods + * \{ */ inline MFInstruction *MFDummyInstruction::next() { @@ -506,9 +518,11 @@ inline const MFInstruction *MFDummyInstruction::next() const return next_; } -/* -------------------------------------------------------------------- - * MFProcedure inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #MFProcedure Inline Methods + * \{ */ inline Span<ConstMFParameter> MFProcedure::params() const { @@ -536,4 +550,6 @@ inline Span<const MFVariable *> MFProcedure::variables() const return variables_; } +/** \} */ + } // namespace blender::fn diff --git a/source/blender/functions/intern/generic_virtual_array.cc b/source/blender/functions/intern/generic_virtual_array.cc index 9a83d8cd497..ea54f1e7c00 100644 --- a/source/blender/functions/intern/generic_virtual_array.cc +++ b/source/blender/functions/intern/generic_virtual_array.cc @@ -18,9 +18,9 @@ namespace blender::fn { -/* -------------------------------------------------------------------- - * GVArray_For_ShallowCopy. - */ +/* -------------------------------------------------------------------- */ +/** \name #GVArray_For_ShallowCopy + * \{ */ class GVArray_For_ShallowCopy : public GVArray { private: @@ -48,10 +48,11 @@ class GVArray_For_ShallowCopy : public GVArray { varray_.materialize_to_uninitialized(mask, dst); } }; +/** \} */ -/* -------------------------------------------------------------------- - * GVArray. - */ +/* -------------------------------------------------------------------- */ +/** \name #GVArray + * \{ */ void GVArray::materialize(void *dst) const { @@ -142,9 +143,11 @@ GVArrayPtr GVArray::shallow_copy() const return std::make_unique<GVArray_For_ShallowCopy>(*this); } -/* -------------------------------------------------------------------- - * GVMutableArray. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #GVMutableArray + * \{ */ void GVMutableArray::set_by_copy_impl(const int64_t index, const void *value) { @@ -191,9 +194,11 @@ void GVMutableArray::fill(const void *value) } } -/* -------------------------------------------------------------------- - * GVArray_For_GSpan. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #GVArray_For_GSpan + * \{ */ void GVArray_For_GSpan::get_impl(const int64_t index, void *r_value) const { @@ -215,9 +220,11 @@ GSpan GVArray_For_GSpan::get_internal_span_impl() const return GSpan(*type_, data_, size_); } -/* -------------------------------------------------------------------- - * GVMutableArray_For_GMutableSpan. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #GVMutableArray_For_GMutableSpan + * \{ */ void GVMutableArray_For_GMutableSpan::get_impl(const int64_t index, void *r_value) const { @@ -255,9 +262,11 @@ GSpan GVMutableArray_For_GMutableSpan::get_internal_span_impl() const return GSpan(*type_, data_, size_); } -/* -------------------------------------------------------------------- - * GVArray_For_SingleValueRef. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #GVArray_For_SingleValueRef + * \{ */ void GVArray_For_SingleValueRef::get_impl(const int64_t UNUSED(index), void *r_value) const { @@ -290,9 +299,11 @@ void GVArray_For_SingleValueRef::get_internal_single_impl(void *r_value) const type_->copy_assign(value_, r_value); } -/* -------------------------------------------------------------------- - * GVArray_For_SingleValue. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #GVArray_For_SingleValue + * \{ */ GVArray_For_SingleValue::GVArray_For_SingleValue(const CPPType &type, const int64_t size, @@ -309,9 +320,11 @@ GVArray_For_SingleValue::~GVArray_For_SingleValue() MEM_freeN((void *)value_); } -/* -------------------------------------------------------------------- - * GVArray_GSpan. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #GVArray_GSpan + * \{ */ GVArray_GSpan::GVArray_GSpan(const GVArray &varray) : GSpan(varray.type()), varray_(varray) { @@ -334,9 +347,11 @@ GVArray_GSpan::~GVArray_GSpan() } } -/* -------------------------------------------------------------------- - * GVMutableArray_GSpan. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #GVMutableArray_GSpan + * \{ */ GVMutableArray_GSpan::GVMutableArray_GSpan(GVMutableArray &varray, const bool copy_values_to_span) : GMutableSpan(varray.type()), varray_(varray) @@ -387,9 +402,11 @@ void GVMutableArray_GSpan::disable_not_applied_warning() show_not_saved_warning_ = false; } -/* -------------------------------------------------------------------- - * GVArray_For_SlicedGVArray. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #GVArray_For_SlicedGVArray + * \{ */ void GVArray_For_SlicedGVArray::get_impl(const int64_t index, void *r_value) const { @@ -401,9 +418,11 @@ void GVArray_For_SlicedGVArray::get_to_uninitialized_impl(const int64_t index, v varray_.get_to_uninitialized(index + offset_, r_value); } -/* -------------------------------------------------------------------- - * GVArray_Slice. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #GVArray_Slice + * \{ */ GVArray_Slice::GVArray_Slice(const GVArray &varray, const IndexRange slice) { @@ -430,4 +449,6 @@ GVArray_Slice::GVArray_Slice(const GVArray &varray, const IndexRange slice) } } +/** \} */ + } // namespace blender::fn diff --git a/source/blender/gpu/intern/gpu_select.c b/source/blender/gpu/intern/gpu_select.c index 661c462f60d..3c89f082e9b 100644 --- a/source/blender/gpu/intern/gpu_select.c +++ b/source/blender/gpu/intern/gpu_select.c @@ -38,6 +38,10 @@ #include "gpu_select_private.h" +/* -------------------------------------------------------------------- */ +/** \name Internal Types + * \{ */ + /* Internal algorithm used */ enum { /** glBegin/EndQuery(GL_SAMPLES_PASSED... ), `gpu_select_query.c` @@ -61,6 +65,12 @@ typedef struct GPUSelectState { static GPUSelectState g_select_state = {0}; +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Public API + * \{ */ + /** * initialize and provide buffer for results */ @@ -149,12 +159,14 @@ uint GPU_select_end(void) return hits; } -/* ---------------------------------------------------------------------------- - * Caching +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Caching * * Support multiple begin/end's as long as they are within the initial region. - * Currently only used by ALGO_GL_PICK. - */ + * Currently only used by #ALGO_GL_PICK. + * \{ */ void GPU_select_cache_begin(void) { @@ -187,9 +199,11 @@ bool GPU_select_is_cached(void) return g_select_state.use_cache && gpu_select_pick_is_cached(); } -/* ---------------------------------------------------------------------------- - * Utilities - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Utilities + * \{ */ /** * Helper function, nothing special but avoids doing inline since hits aren't sorted by depth @@ -269,3 +283,5 @@ void GPU_select_buffer_stride_realign(const rcti *src, const rcti *dst, uint *r_ } memset(r_buf, 0, (last_px_id + 1) * sizeof(*r_buf)); } + +/** \} */ diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c index 7fb704c29dd..a8907859bf4 100644 --- a/source/blender/gpu/intern/gpu_select_pick.c +++ b/source/blender/gpu/intern/gpu_select_pick.c @@ -51,9 +51,9 @@ /* Z-depth of cleared depth buffer */ #define DEPTH_MAX 0xffffffff -/* ---------------------------------------------------------------------------- - * SubRectStride - */ +/* -------------------------------------------------------------------- */ +/** \name #SubRectStride + * \{ */ /* For looping over a sub-region of a rect, could be moved into 'rct.c'. */ typedef struct SubRectStride { @@ -99,14 +99,16 @@ BLI_INLINE bool depth_is_filled(const depth_t *prev, const depth_t *curr) return (*prev != *curr) && (*curr != DEPTH_MAX); } -/* ---------------------------------------------------------------------------- - * DepthBufCache +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #DepthBufCache * - * Result of reading glReadPixels, + * Result of reading #glReadPixels, * use for both cache and non-cached storage. - */ + * \{ */ -/* store result of glReadPixels */ +/** Store result of #glReadPixels. */ typedef struct DepthBufCache { struct DepthBufCache *next, *prev; uint id; @@ -188,11 +190,13 @@ static bool depth_buf_subrect_depth_any_filled(const DepthBufCache *rect_src, return false; } -/* ---------------------------------------------------------------------------- - * DepthID +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #DepthID * * Internal structure for storing hits. - */ + * \{ */ typedef struct DepthID { uint id; @@ -225,6 +229,12 @@ static int depth_cmp(const void *v1, const void *v2) return 0; } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Main Selection Begin/End/Load API + * \{ */ + /* depth sorting */ typedef struct GPUPickState { /* cache on initialization */ @@ -691,11 +701,13 @@ uint gpu_select_pick_end(void) return hits; } -/* ---------------------------------------------------------------------------- - * Caching +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Caching * * Support multiple begin/end's reusing depth buffers. - */ + * \{ */ void gpu_select_pick_cache_begin(void) { @@ -749,3 +761,5 @@ void gpu_select_pick_cache_load_id(void) } } } + +/** \} */ diff --git a/source/blender/nodes/NOD_derived_node_tree.hh b/source/blender/nodes/NOD_derived_node_tree.hh index 60d84463a82..e903e3c9255 100644 --- a/source/blender/nodes/NOD_derived_node_tree.hh +++ b/source/blender/nodes/NOD_derived_node_tree.hh @@ -202,9 +202,9 @@ using nodes::DSocket; using nodes::DTreeContext; } // namespace derived_node_tree_types -/* -------------------------------------------------------------------- - * DTreeContext inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #DTreeContext Inline Methods + * \{ */ inline const NodeTreeRef &DTreeContext::tree() const { @@ -235,10 +235,11 @@ inline bool DTreeContext::is_root() const { return parent_context_ == nullptr; } +/** \} */ -/* -------------------------------------------------------------------- - * DNode inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #DNode Inline Methods + * \{ */ inline DNode::DNode(const DTreeContext *context, const NodeRef *node_ref) : context_(context), node_ref_(node_ref) @@ -300,10 +301,11 @@ inline DOutputSocket DNode::output_by_identifier(StringRef identifier) const { return {context_, &node_ref_->output_by_identifier(identifier)}; } +/** \} */ -/* -------------------------------------------------------------------- - * DSocket inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #DSocket Inline Methods + * \{ */ inline DSocket::DSocket(const DTreeContext *context, const SocketRef *socket_ref) : context_(context), socket_ref_(socket_ref) @@ -361,10 +363,11 @@ inline DNode DSocket::node() const BLI_assert(socket_ref_ != nullptr); return {context_, &socket_ref_->node()}; } +/** \} */ -/* -------------------------------------------------------------------- - * DInputSocket inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #DInputSocket Inline Methods + * \{ */ inline DInputSocket::DInputSocket(const DTreeContext *context, const InputSocketRef *socket_ref) : DSocket(context, socket_ref) @@ -385,10 +388,11 @@ inline const InputSocketRef *DInputSocket::operator->() const { return (const InputSocketRef *)socket_ref_; } +/** \} */ -/* -------------------------------------------------------------------- - * DOutputSocket inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #DOutputSocket Inline Methods + * \{ */ inline DOutputSocket::DOutputSocket(const DTreeContext *context, const OutputSocketRef *socket_ref) : DSocket(context, socket_ref) @@ -409,10 +413,11 @@ inline const OutputSocketRef *DOutputSocket::operator->() const { return (const OutputSocketRef *)socket_ref_; } +/** \} */ -/* -------------------------------------------------------------------- - * DerivedNodeTree inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #DerivedNodeTree Inline Methods + * \{ */ inline const DTreeContext &DerivedNodeTree::root_context() const { @@ -424,4 +429,6 @@ inline Span<const NodeTreeRef *> DerivedNodeTree::used_node_tree_refs() const return used_node_tree_refs_; } +/** \} */ + } // namespace blender::nodes diff --git a/source/blender/nodes/NOD_multi_function.hh b/source/blender/nodes/NOD_multi_function.hh index 58816544dc1..c1952cf8014 100644 --- a/source/blender/nodes/NOD_multi_function.hh +++ b/source/blender/nodes/NOD_multi_function.hh @@ -75,9 +75,9 @@ class NodeMultiFunctions { const MultiFunction *try_get(const DNode &node) const; }; -/* -------------------------------------------------------------------- - * NodeMultiFunctionBuilder inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #NodeMultiFunctionBuilder Inline Methods + * \{ */ inline NodeMultiFunctionBuilder::NodeMultiFunctionBuilder(ResourceScope &resource_scope, bNode &node, @@ -118,13 +118,17 @@ inline void NodeMultiFunctionBuilder::construct_and_set_matching_fn(Args &&...ar this->set_matching_fn(&fn); } -/* -------------------------------------------------------------------- - * NodeMultiFunctions inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #NodeMultiFunctions Inline Methods + * \{ */ inline const MultiFunction *NodeMultiFunctions::try_get(const DNode &node) const { return map_.lookup_default(node->bnode(), nullptr); } +/** \} */ + } // namespace blender::nodes diff --git a/source/blender/nodes/NOD_node_declaration.hh b/source/blender/nodes/NOD_node_declaration.hh index aa01afc6a14..da0ce6a3907 100644 --- a/source/blender/nodes/NOD_node_declaration.hh +++ b/source/blender/nodes/NOD_node_declaration.hh @@ -255,9 +255,9 @@ class NodeDeclarationBuilder { Vector<SocketDeclarationPtr> &r_decls); }; -/* -------------------------------------------------------------------- - * #OutputFieldDependency inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #OutputFieldDependency Inline Methods + * \{ */ inline OutputFieldDependency OutputFieldDependency::ForFieldSource() { @@ -313,9 +313,11 @@ inline bool operator!=(const OutputFieldDependency &a, const OutputFieldDependen return !(a == b); } -/* -------------------------------------------------------------------- - * #FieldInferencingInterface inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #FieldInferencingInterface Inline Methods + * \{ */ inline bool operator==(const FieldInferencingInterface &a, const FieldInferencingInterface &b) { @@ -327,9 +329,11 @@ inline bool operator!=(const FieldInferencingInterface &a, const FieldInferencin return !(a == b); } -/* -------------------------------------------------------------------- - * #SocketDeclaration inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #SocketDeclaration Inline Methods + * \{ */ inline StringRefNull SocketDeclaration::name() const { @@ -355,9 +359,11 @@ inline const OutputFieldDependency &SocketDeclaration::output_field_dependency() return output_field_dependency_; } -/* -------------------------------------------------------------------- - * #NodeDeclarationBuilder inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #NodeDeclarationBuilder Inline Methods + * \{ */ inline NodeDeclarationBuilder::NodeDeclarationBuilder(NodeDeclaration &declaration) : declaration_(declaration) @@ -395,9 +401,11 @@ inline typename DeclType::Builder &NodeDeclarationBuilder::add_socket( return socket_decl_builder_ref; } -/* -------------------------------------------------------------------- - * #NodeDeclaration inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #NodeDeclaration Inline Methods + * \{ */ inline Span<SocketDeclarationPtr> NodeDeclaration::inputs() const { @@ -409,4 +417,6 @@ inline Span<SocketDeclarationPtr> NodeDeclaration::outputs() const return outputs_; } +/** \} */ + } // namespace blender::nodes diff --git a/source/blender/nodes/NOD_node_tree_ref.hh b/source/blender/nodes/NOD_node_tree_ref.hh index 1da42fb6425..5337f79536b 100644 --- a/source/blender/nodes/NOD_node_tree_ref.hh +++ b/source/blender/nodes/NOD_node_tree_ref.hh @@ -316,9 +316,9 @@ using nodes::OutputSocketRef; using nodes::SocketRef; } // namespace node_tree_ref_types -/* -------------------------------------------------------------------- - * SocketRef inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #SocketRef Inline Methods + * \{ */ inline Span<const SocketRef *> SocketRef::logically_linked_sockets() const { @@ -457,9 +457,11 @@ template<typename T> inline T *SocketRef::default_value() const return (T *)bsocket_->default_value; } -/* -------------------------------------------------------------------- - * InputSocketRef inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #InputSocketRef Inline Methods + * \{ */ inline Span<const OutputSocketRef *> InputSocketRef::logically_linked_sockets() const { @@ -476,9 +478,11 @@ inline bool InputSocketRef::is_multi_input_socket() const return bsocket_->flag & SOCK_MULTI_INPUT; } -/* -------------------------------------------------------------------- - * OutputSocketRef inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #OutputSocketRef Inline Methods + * \{ */ inline Span<const InputSocketRef *> OutputSocketRef::logically_linked_sockets() const { @@ -490,9 +494,11 @@ inline Span<const InputSocketRef *> OutputSocketRef::directly_linked_sockets() c return directly_linked_sockets_.cast<const InputSocketRef *>(); } -/* -------------------------------------------------------------------- - * NodeRef inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #NodeRef Inline Methods + * \{ */ inline const NodeTreeRef &NodeRef::tree() const { @@ -629,9 +635,11 @@ template<typename T> inline T *NodeRef::storage() const return (T *)bnode_->storage; } -/* -------------------------------------------------------------------- - * LinkRef inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #LinkRef Inline Methods + * \{ */ inline const OutputSocketRef &LinkRef::from() const { @@ -653,9 +661,11 @@ inline bool LinkRef::is_muted() const return blink_->flag & NODE_LINK_MUTED; } -/* -------------------------------------------------------------------- - * InternalLinkRef inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #InternalLinkRef Inline Methods + * \{ */ inline const InputSocketRef &InternalLinkRef::from() const { @@ -672,9 +682,11 @@ inline bNodeLink *InternalLinkRef::blink() const return blink_; } -/* -------------------------------------------------------------------- - * NodeTreeRef inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #NodeTreeRef Inline Methods + * \{ */ inline Span<const NodeRef *> NodeTreeRef::nodes() const { @@ -722,4 +734,6 @@ inline StringRefNull NodeTreeRef::name() const return btree_->id.name + 2; } +/** \} */ + } // namespace blender::nodes diff --git a/source/blender/nodes/NOD_socket_declarations.hh b/source/blender/nodes/NOD_socket_declarations.hh index 6eac77b1d6b..00874cad766 100644 --- a/source/blender/nodes/NOD_socket_declarations.hh +++ b/source/blender/nodes/NOD_socket_declarations.hh @@ -201,9 +201,9 @@ class Geometry : public SocketDeclaration { bool matches(const bNodeSocket &socket) const override; }; -/* -------------------------------------------------------------------- - * #FloatBuilder inline methods. - */ +/* -------------------------------------------------------------------- */ +/** \name #FloatBuilder Inline Methods + * \{ */ inline FloatBuilder &FloatBuilder::min(const float value) { @@ -229,9 +229,11 @@ inline FloatBuilder &FloatBuilder::subtype(PropertySubType subtype) return *this; } -/* -------------------------------------------------------------------- - * #IntBuilder inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #IntBuilder Inline Methods + * \{ */ inline IntBuilder &IntBuilder::min(const int value) { @@ -257,9 +259,11 @@ inline IntBuilder &IntBuilder::subtype(PropertySubType subtype) return *this; } -/* -------------------------------------------------------------------- - * #VectorBuilder inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #VectorBuilder Inline Methods + * \{ */ inline VectorBuilder &VectorBuilder::default_value(const float3 value) { @@ -285,9 +289,11 @@ inline VectorBuilder &VectorBuilder::max(const float max) return *this; } -/* -------------------------------------------------------------------- - * #BoolBuilder inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #BoolBuilder Inline Methods + * \{ */ inline BoolBuilder &BoolBuilder::default_value(const bool value) { @@ -295,9 +301,11 @@ inline BoolBuilder &BoolBuilder::default_value(const bool value) return *this; } -/* -------------------------------------------------------------------- - * #ColorBuilder inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #ColorBuilder Inline Methods + * \{ */ inline ColorBuilder &ColorBuilder::default_value(const ColorGeometry4f value) { @@ -305,9 +313,11 @@ inline ColorBuilder &ColorBuilder::default_value(const ColorGeometry4f value) return *this; } -/* -------------------------------------------------------------------- - * #IDSocketDeclaration and children inline methods. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #IDSocketDeclaration and Children Inline Methods + * \{ */ inline IDSocketDeclaration::IDSocketDeclaration(const char *idname) : idname_(idname) { @@ -329,11 +339,15 @@ inline Texture::Texture() : IDSocketDeclaration("NodeSocketTexture") { } +/** \} */ + } // namespace blender::nodes::decl -/* -------------------------------------------------------------------- - * Extern template instantiations that are defined in `intern/extern_implementations.cc`. - */ +/* -------------------------------------------------------------------- */ +/** \name External Template Instantiations + * + * Defined in `intern/extern_implementations.cc`. + * \{ */ namespace blender::nodes { #define MAKE_EXTERN_SOCKET_DECLARATION(TYPE) \ @@ -351,3 +365,5 @@ MAKE_EXTERN_SOCKET_DECLARATION(decl::Geometry) #undef MAKE_EXTERN_SOCKET_DECLARATION } // namespace blender::nodes + +/** \} */ diff --git a/source/blender/nodes/intern/node_socket_declarations.cc b/source/blender/nodes/intern/node_socket_declarations.cc index 4b0dbad3cff..f910679d492 100644 --- a/source/blender/nodes/intern/node_socket_declarations.cc +++ b/source/blender/nodes/intern/node_socket_declarations.cc @@ -30,9 +30,9 @@ static void modify_subtype_except_for_storage(bNodeSocket &socket, int new_subty socket.typeinfo = socktype; } -/* -------------------------------------------------------------------- - * Float. - */ +/* -------------------------------------------------------------------- */ +/** \name #Float + * \{ */ bNodeSocket &Float::build(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_out) const { @@ -83,9 +83,11 @@ bNodeSocket &Float::update_or_build(bNodeTree &ntree, bNode &node, bNodeSocket & return socket; } -/* -------------------------------------------------------------------- - * Int. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #Int + * \{ */ bNodeSocket &Int::build(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_out) const { @@ -136,9 +138,11 @@ bNodeSocket &Int::update_or_build(bNodeTree &ntree, bNode &node, bNodeSocket &so return socket; } -/* -------------------------------------------------------------------- - * Vector. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #Vector + * \{ */ bNodeSocket &Vector::build(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_out) const { @@ -181,9 +185,11 @@ bNodeSocket &Vector::update_or_build(bNodeTree &ntree, bNode &node, bNodeSocket return socket; } -/* -------------------------------------------------------------------- - * Bool. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #Bool + * \{ */ bNodeSocket &Bool::build(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_out) const { @@ -206,9 +212,11 @@ bool Bool::matches(const bNodeSocket &socket) const return true; } -/* -------------------------------------------------------------------- - * Color. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #Color + * \{ */ bNodeSocket &Color::build(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_out) const { @@ -236,9 +244,11 @@ bool Color::matches(const bNodeSocket &socket) const return true; } -/* -------------------------------------------------------------------- - * String. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #String + * \{ */ bNodeSocket &String::build(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_out) const { @@ -259,9 +269,11 @@ bool String::matches(const bNodeSocket &socket) const return true; } -/* -------------------------------------------------------------------- - * IDSocketDeclaration. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #IDSocketDeclaration + * \{ */ bNodeSocket &IDSocketDeclaration::build(bNodeTree &ntree, bNode &node, @@ -295,9 +307,11 @@ bNodeSocket &IDSocketDeclaration::update_or_build(bNodeTree &ntree, return socket; } -/* -------------------------------------------------------------------- - * Geometry. - */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name #Geometry + * \{ */ bNodeSocket &Geometry::build(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_out) const { @@ -318,4 +332,6 @@ bool Geometry::matches(const bNodeSocket &socket) const return true; } +/** \} */ + } // namespace blender::nodes::decl |