Skip to content

Commit f2a0e53

Browse files
committed
conversion docs
1 parent 6e2ca57 commit f2a0e53

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

include/gl/conversion.hpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ namespace gl {
1616

1717
namespace traits {
1818

19+
/// @ingroup GL GL-Traits
20+
/// @brief Utility trait type used to swap the implementation tag of a graph traits or graph type.
21+
/// ### See Also:
22+
/// - @ref gl::to "to" : For the function that utilizes this trait to perform graph conversions between different implementations.
1923
template <typename GT, traits::c_graph_impl_tag NewImplTag>
2024
requires c_graph<GT> or c_instantiation_of<GT, graph_traits>
2125
struct swap_impl_tag;
2226

27+
/// @ingroup GL GL-Traits
28+
/// @brief Specialization of @ref gl::traits::swap_impl_tag "swap_impl_tag" for the @ref gl::graph_traits "graph_traits" type.
2329
template <
2430
traits::c_graph_directional_tag Dir,
2531
traits::c_properties VP,
@@ -31,6 +37,8 @@ struct swap_impl_tag<graph_traits<Dir, VP, EP, OldImplTag, IdType>, NewImplTag>
3137
using type = graph_traits<Dir, VP, EP, NewImplTag, IdType>;
3238
};
3339

40+
/// @ingroup GL GL-Traits
41+
/// @brief Specialization of @ref gl::traits::swap_impl_tag "swap_impl_tag" for the @ref gl::graph "graph" class.
3442
template <
3543
traits::c_graph_directional_tag Dir,
3644
traits::c_properties VP,
@@ -42,6 +50,10 @@ struct swap_impl_tag<graph<graph_traits<Dir, VP, EP, OldImplTag, IdType>>, NewIm
4250
using type = graph<graph_traits<Dir, VP, EP, NewImplTag, IdType>>;
4351
};
4452

53+
/// @ingroup GL GL-Traits
54+
/// @brief Alias template for easier usage of the `swap_impl_tag` trait to resolve the swapped type directly.
55+
/// ### See Also:
56+
/// - @ref gl::to "to" : For the function that utilizes this trait to perform graph conversions between different implementations.
4557
template <typename GT, traits::c_graph_impl_tag NewImplTag>
4658
requires c_graph<GT> or c_instantiation_of<GT, graph_traits>
4759
using swap_impl_tag_t = typename swap_impl_tag<GT, NewImplTag>::type;
@@ -154,6 +166,8 @@ struct to_impl<impl::matrix_t, impl::flat_matrix_t> {
154166
/// | Graph | The type of the source graph, which will be automatically deduced from the function argument. | [**c_graph**](gl_concepts.md#gl-traits-c-graph) |
155167
/// @param source The graph to convert. After the operation it will be left in a valid, empty state.
156168
/// @return A new graph containing the moved data, structured according to TargetImplTag.
169+
/// ### See Also
170+
/// - @ref gl::traits::swap_impl_tag "swap_impl_tag" : For the trait used to resolve the target graph type with the swapped implementation tag.
157171
template <traits::c_graph_impl_tag TargetImplTag, traits::c_graph Graph>
158172
[[nodiscard]] auto to(Graph&& source) {
159173
using source_traits = typename Graph::traits_type;

0 commit comments

Comments
 (0)