From 84bdf3365df55ad34857b6aa0b3391568e4faa05 Mon Sep 17 00:00:00 2001 From: fktn Date: Tue, 7 Jan 2025 05:26:44 +0900 Subject: [PATCH] added doxygen comments --- include/fkYAML/node.hpp | 10 ++++++++++ single_include/fkYAML/node.hpp | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/include/fkYAML/node.hpp b/include/fkYAML/node.hpp index 98ed8fa0..5f35752e 100644 --- a/include/fkYAML/node.hpp +++ b/include/fkYAML/node.hpp @@ -136,9 +136,11 @@ class basic_node { using yaml_version_t = detail::yaml_version_t; /// @brief A type for mapping range objects for the map_items() function. + /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/map_range/ using map_range = fkyaml::detail::map_range_proxy; /// @brief A type for constant mapping range objects for the map_items() function. + /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/map_range/ using const_map_range = fkyaml::detail::map_range_proxy; private: @@ -1601,6 +1603,10 @@ class basic_node { return rend(); } + /// @brief Returns a range of mapping entries. + /// @throw `type_error` if this basic_node is not a mapping. + /// @return A range of mapping entries. + /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/map_items/ map_range map_items() { if FK_YAML_UNLIKELY (!is_mapping()) { throw type_error("map_items() cannot be called on a non-mapping node.", get_type()); @@ -1608,6 +1614,10 @@ class basic_node { return {*this}; } + /// @brief Returns a const range of mapping entries. + /// @throw `type_error` if this basic_node is not a mapping. + /// @return A const range of mapping entries. + /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/map_items/ const_map_range map_items() const { if FK_YAML_UNLIKELY (!is_mapping()) { throw type_error("map_items() cannot be called on a non-mapping node.", get_type()); diff --git a/single_include/fkYAML/node.hpp b/single_include/fkYAML/node.hpp index dfbb5e75..304f460d 100644 --- a/single_include/fkYAML/node.hpp +++ b/single_include/fkYAML/node.hpp @@ -12559,9 +12559,11 @@ class basic_node { using yaml_version_t = detail::yaml_version_t; /// @brief A type for mapping range objects for the map_items() function. + /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/map_range/ using map_range = fkyaml::detail::map_range_proxy; /// @brief A type for constant mapping range objects for the map_items() function. + /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/map_range/ using const_map_range = fkyaml::detail::map_range_proxy; private: @@ -14024,6 +14026,10 @@ class basic_node { return rend(); } + /// @brief Returns a range of mapping entries. + /// @throw `type_error` if this basic_node is not a mapping. + /// @return A range of mapping entries. + /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/map_items/ map_range map_items() { if FK_YAML_UNLIKELY (!is_mapping()) { throw type_error("map_items() cannot be called on a non-mapping node.", get_type()); @@ -14031,6 +14037,10 @@ class basic_node { return {*this}; } + /// @brief Returns a const range of mapping entries. + /// @throw `type_error` if this basic_node is not a mapping. + /// @return A const range of mapping entries. + /// @sa https://fktn-k.github.io/fkYAML/api/basic_node/map_items/ const_map_range map_items() const { if FK_YAML_UNLIKELY (!is_mapping()) { throw type_error("map_items() cannot be called on a non-mapping node.", get_type());