Skip to content

Commit 2a17b98

Browse files
committed
finally...working on the doc comments
1 parent a6098ed commit 2a17b98

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

include/gl/types/properties.hpp

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@ namespace gl {
1717
/// @brief A tag struct representing no user-defined properties.
1818
///
1919
/// > [!IMPORTANT]
20-
/// > - This type is used as a default `properties_type` for graph components that do not require any user-defined data.
21-
/// > - It serves as a marker to indicate that the component is "property-less" and can be optimized accordingly.
20+
/// >
21+
/// > This type is used as a default `properties_type` for graph components that do not require any user-defined data.
22+
/// > It serves as a marker to indicate that the component is "property-less" and can be optimized accordingly.
2223
struct empty_properties {};
2324

2425
/// @ingroup GL GL-Core
2526
/// @brief A tag struct representing an empty property map.
27+
///
28+
/// > [!NOTE]
29+
/// >
30+
/// > This type is used internally by the library to optimize storage for graph components that have no properties.
2631
struct empty_properties_map {};
2732

2833
/// @ingroup GL GL-Types
@@ -67,13 +72,17 @@ struct name_property {
6772
/// @ingroup GL GL-Types
6873
/// @brief A type-safe container for heterogeneous properties stored by string keys.
6974
///
70-
/// Uses `std::any` and `std::unordered_map` to allow runtime attachment of
71-
/// arbitrary data types to graph elements.
75+
/// Stores an arbitrary number of properties identified by string keys, where each
76+
/// property can be of any type. This allows for dynamic attachment of properties to
77+
/// graph elements at runtime without requiring compile-time knowledge of the property types.
78+
///
79+
/// The underlying container that is used to store the properties is `std::unordered_map<std::string, std::any>`.
7280
class dynamic_properties final {
7381
public:
74-
using key_type = std::string;
75-
using value_type = std::any;
76-
using property_map_type = std::unordered_map<key_type, value_type>;
82+
using key_type = std::string; ///< The type used for property keys (string identifiers).
83+
using value_type = std::any; ///< The type used for property values (type-erased storage).
84+
using property_map_type =
85+
std::unordered_map<key_type, value_type>; ///< The underlying map type for storing properties.
7786

7887
dynamic_properties() = default;
7988

@@ -214,7 +223,7 @@ struct binary_color_property {
214223
/// ### Template Parameters
215224
/// | Parameter | Description | Default | Constraint |
216225
/// | :--- | :--- | :--- | :--- |
217-
/// | `WeightType` | The numeric type used to store the weight value. | `double` | [c_arithmetic](gl_traits.md#gl-traits-c-arithmetic) |
226+
/// | `WeightType` | The numeric type used to store the weight value. | `double` | [**c_arithmetic**](gl_traits.md#gl-traits-c-arithmetic) |
218227
template <traits::c_arithmetic WeightType = double>
219228
struct weight_property {
220229
using weight_type = WeightType;

0 commit comments

Comments
 (0)