Skip to content

Commit

Permalink
[doc] random doxygen fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
h-2 committed Oct 20, 2022
1 parent 4c5ec54 commit 1623832
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 24 deletions.
2 changes: 1 addition & 1 deletion include/bio/alphabet/aminoacid/aminoacid_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class aminoacid_base : public aminoacid_empty_base, public base<derived_type, si
}

private:
//!\brief Implementation of #char_is_valid().
//!\brief Implementation of char_is_valid().
static constexpr std::array<bool, 256> valid_char_table = []() constexpr
{
static_assert(sizeof(char_type) == 1, "This table is unusable for char types larger than 1 byte.");
Expand Down
19 changes: 13 additions & 6 deletions include/bio/alphabet/composite/tuple_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ class tuple_base :
* \{
* \attention Please do not directly use the CRTP base class. The functions
* are only public for the usage in their derived classes (e.g.
* bio::alphabet::qualified, bio::alphabet::masked, bio::alphabet::structure_rna and
* bio::alphabet::structure_aa).
* bio::alphabet::qualified, bio::alphabet::masked).
*/
//!\brief Construction from initialiser-list.
constexpr tuple_base(component_types... components) noexcept
Expand All @@ -171,9 +170,11 @@ class tuple_base :
/*!\brief Construction via a value of one of the components.
* \tparam component_type Must be one uniquely contained in the type list of the composite.
* \param alph The value of a component that should be assigned.
* \details
*
* Note: Since the tuple_base is a CRTP base class, we show the working examples
* with one of its derived classes (bio::alphabet::qualified).
*
* \include test/snippet/alphabet/composite/tuple_base_value_construction.cpp
*
*/
Expand All @@ -190,13 +191,15 @@ class tuple_base :
* \tparam indirect_component_type Type that models bio::alphabet::weakly_assignable_from for
* one of the component types.
* \param alph The value that should be assigned.
* \details
*
* Note that the value will be assigned to the **FIRST** type T that fulfils
* `assignable_from<T, indirect_component_type>`, regardless if other types are also
* fit for assignment.
*
* Note: Since the tuple_base is a CRTP base class, we show the working examples
* with one of its derived classes (bio::alphabet::qualified).
*
* \include test/snippet/alphabet/composite/tuple_base_subtype_construction.cpp
*
*/
Expand Down Expand Up @@ -234,9 +237,11 @@ class tuple_base :
/*!\brief Assignment via a value of one of the components.
* \tparam component_type One of the component types. Must be uniquely contained in the type list of the composite.
* \param alph The value of a component that should be assigned.
* \details
*
* Note: Since the tuple_base is a CRTP base class, we show the working examples
* with one of its derived classes (bio::alphabet::qualified).
*
* \include test/snippet/alphabet/composite/tuple_base_value_assignment.cpp
*
*/
Expand All @@ -254,9 +259,11 @@ class tuple_base :
* \tparam indirect_component_type Type that models bio::alphabet::weakly_assignable_from for
* one of the component types.
* \param alph The value of a component that should be assigned.
* \details
*
* Note: Since the tuple_base is a CRTP base class, we show the working examples
* with one of its derived classes (bio::alphabet::qualified).
*
* \include test/snippet/alphabet/composite/tuple_base_subtype_assignment.cpp
*
*/
Expand Down Expand Up @@ -334,7 +341,7 @@ class tuple_base :
return component_proxy<t, index>{l};
}

/*!\copybrief get
/*!\brief Tuple-like access to the contained components.
* \tparam type Return the element of specified type; only available if the type is unique in the set of components.
* \returns A proxy to the contained element that models the same alphabets concepts and supports assignment.
*
Expand All @@ -348,7 +355,7 @@ class tuple_base :
return get<meta::list_traits::find<type, component_list>>(l);
}

/*!\copybrief get
/*!\brief Tuple-like access to the contained components.
* \tparam index Return the i-th element.
* \returns A copy of the contained element.
*
Expand All @@ -363,7 +370,7 @@ class tuple_base :
return bio::alphabet::assign_rank_to(l.to_component_rank<index>(), t{});
}

/*!\copybrief get
/*!\brief Tuple-like access to the contained components.
* \tparam type Return the element of specified type; only available if the type is unique in the set of components.
* \returns A copy of the contained element.
*
Expand Down Expand Up @@ -420,7 +427,7 @@ class tuple_base :
return get<component_type>(lhs) == rhs;
}

//!\copydoc operator==(derived_type_t const lhs, indirect_component_type const rhs)
//!\copydoc bio::alphabet::tuple_base::operator==(derived_type_t const lhs, indirect_component_type const rhs)
template <std::same_as<derived_type> derived_type_t, typename indirect_component_type>
//!\cond
requires(detail::tuple_concept_guard<derived_type, indirect_component_type, component_types...> &&
Expand Down
2 changes: 1 addition & 1 deletion include/bio/alphabet/nucleotide/nucleotide_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class nucleotide_base : public base<derived_type, size, char>
}

private:
//!\brief Implementation of #char_is_valid().
//!\brief Implementation of char_is_valid().
static constexpr std::array<bool, 256> valid_char_table = []() constexpr
{
static_assert(sizeof(char_type) == 1, "This table is unusable for char types larger than 1 byte.");
Expand Down
2 changes: 1 addition & 1 deletion include/bio/ranges/container/bitcompressed_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ class bitcompressed_vector
*/
constexpr void swap(bitcompressed_vector & rhs) noexcept { std::swap(*this, rhs); }

//!\copydoc swap()
//!\copydoc #swap(bitcompressed_vector & rhs)
constexpr void swap(bitcompressed_vector && rhs) noexcept { std::swap(*this, rhs); }

/*!\brief Swap contents with another instance.
Expand Down
7 changes: 4 additions & 3 deletions include/bio/ranges/container/small_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class small_string : public small_vector<char, capacity_ + 1>
data_[0] = '\0';
}

//!\copydoc bio::ranges::small_vector::push_back(value_type const value)
//!\copydoc bio::ranges::small_vector::push_back
constexpr void push_back(char const value) noexcept
{
assert(sz < capacity_);
Expand All @@ -196,10 +196,11 @@ class small_string : public small_vector<char, capacity_ + 1>
data_[sz] = '\0';
}

//!\copydoc bio::ranges::small_vector::resize(size_type const)
//!\copydoc bio::ranges::small_vector::resize
constexpr void resize(size_type const count) noexcept { resize(count, '\0'); }

//!\copydoc bio::ranges::small_vector::resize(size_type const, value_type const value)
//!\copydoc bio::ranges::small_vector::resize
//!\param[in] value Append copies of value when resizing.
constexpr void resize(size_type const count, char const value) noexcept
{
assert(count <= capacity_);
Expand Down
18 changes: 9 additions & 9 deletions include/bio/ranges/container/small_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ class small_vector
/*!\name Iterators
* \{
*/
//!\brief Returns the begin to the string.
//!\brief Returns the begin iterator of the vector.
constexpr iterator begin() noexcept { return &data_[0]; }

//!\copydoc bio::ranges::small_vector::begin()
Expand Down Expand Up @@ -350,7 +350,7 @@ class small_vector
return (*this)[i];
}

//!\copydoc at()
//!\copydoc bio::ranges::small_vector::at()
const_reference at(size_type const i) const
{
if (i >= size()) // [[unlikely]]
Expand Down Expand Up @@ -381,7 +381,7 @@ class small_vector
return data_[i];
}

//!\copydoc operator[]()
//!\copydoc bio::ranges::small_vector::operator[]()
constexpr const_reference operator[](size_type const i) const noexcept
{
assert(i < size());
Expand All @@ -407,7 +407,7 @@ class small_vector
return (*this)[0];
}

//!\copydoc front()
//!\copydoc bio::ranges::small_vector::front()
constexpr const_reference front() const noexcept
{
assert(size() > 0);
Expand All @@ -433,7 +433,7 @@ class small_vector
return (*this)[size() - 1];
}

//!\copydoc back()
//!\copydoc bio::ranges::small_vector::back()
constexpr const_reference back() const noexcept
{
assert(size() > 0);
Expand All @@ -443,7 +443,7 @@ class small_vector
//!\brief Direct access to the underlying array.
constexpr value_type * data() noexcept { return data_.data(); }

//!\copydoc data()
//!\copydoc bio::ranges::small_vector::data()
constexpr value_type const * data() const noexcept { return data_.data(); }
//!\}

Expand Down Expand Up @@ -750,9 +750,9 @@ class small_vector
sz = count;
}

/*!\copybrief resize()
* \param value Append copies of value when resizing.
* \copydetails resize()
/*!\copybrief bio::ranges::small_vector::resize
* \param[in] value Append copies of value when resizing.
* \copydetails bio::ranges::small_vector::resize
*/
constexpr void resize(size_type const count, value_type const value) noexcept
{
Expand Down
4 changes: 2 additions & 2 deletions include/bio/ranges/detail/inherited_iterator_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ class inherited_iterator_base :
//!\brief Cast this to derived type.
constexpr derived_t * this_derived() { return static_cast<derived_t *>(this); }

//!\copydoc this_derived
//!\overload
constexpr derived_t const * this_derived() const { return static_cast<derived_t const *>(this); }

//!\brief Cast this to base type.
Expand All @@ -403,7 +403,7 @@ class inherited_iterator_base :
return static_cast<base_t *>(this);
}

//!\copydoc this_to_base
//!\overload
constexpr base_t const * this_to_base() const
{
if constexpr (wrap_base)
Expand Down
2 changes: 1 addition & 1 deletion include/bio/ranges/detail/random_access_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class random_access_iterator_base
//!\brief Cast this to derived type.
constexpr derived_t * this_derived() { return static_cast<derived_t *>(this); }

//!\copydoc this_derived
//!\overload
constexpr derived_t const * this_derived() const { return static_cast<derived_t const *>(this); }
};

Expand Down

0 comments on commit 1623832

Please sign in to comment.