Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit aa94336

Browse files
author
Pawel Karczewski
committed
[doc] Add non-member methods documentation to corresponding pages
Fixes #1076
1 parent 9ec6394 commit aa94336

15 files changed

Lines changed: 216 additions & 10 deletions

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ make cppformat
3333

3434
**NOTE**: We're using specific clang-format - version exactly **9.0** is required.
3535

36+
## Doxygen documentation
37+
38+
* Each new feature should be documented using doxygen comment blocks.
39+
* Each non-member function should be added to corresponding class documentation by `@relates` tag
3640
# Submitting Pull Requests
3741

3842
We take outside code contributions to `libpmemobj-cpp` through GitHub pull requests.

include/libpmemobj++/allocator.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: BSD-3-Clause
2-
/* Copyright 2016-2020, Intel Corporation */
2+
/* Copyright 2016-2021, Intel Corporation */
33

44
/**
55
* @file
@@ -414,6 +414,7 @@ class standard_alloc_policy<void> {
414414
* Determines if memory from another allocator can be deallocated from this one.
415415
*
416416
* @return true.
417+
* @relates standard_alloc_policy
417418
*/
418419
template <typename T, typename T2>
419420
inline bool
@@ -426,6 +427,7 @@ operator==(standard_alloc_policy<T> const &, standard_alloc_policy<T2> const &)
426427
* Determines if memory from another allocator can be deallocated from this one.
427428
*
428429
* @return false.
430+
* @relates standard_alloc_policy
429431
*/
430432
template <typename T, typename OtherAllocator>
431433
inline bool
@@ -512,6 +514,7 @@ class allocator : public Policy, public Traits {
512514
*
513515
* @return true if allocators are equivalent in terms of deallocation, false
514516
* otherwise.
517+
* @relates allocator
515518
*/
516519
template <typename T, typename P, typename Tr, typename T2, typename P2,
517520
typename Tr2>
@@ -530,6 +533,7 @@ operator==(const allocator<T, P, Tr> &lhs, const allocator<T2, P2, Tr2> &rhs)
530533
*
531534
* @return false if allocators are equivalent in terms of deallocation, true
532535
* otherwise.
536+
* @relates allocator
533537
*/
534538
template <typename T, typename P, typename Tr, typename OtherAllocator>
535539
inline bool

include/libpmemobj++/container/array.hpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ struct array {
722722

723723
/**
724724
* Non-member equal operator.
725+
* @relates array
725726
*/
726727
template <typename T, std::size_t N>
727728
inline bool
@@ -732,6 +733,7 @@ operator==(const array<T, N> &lhs, const array<T, N> &rhs)
732733

733734
/**
734735
* Non-member not-equal operator.
736+
* @relates array
735737
*/
736738
template <typename T, std::size_t N>
737739
inline bool
@@ -742,6 +744,7 @@ operator!=(const array<T, N> &lhs, const array<T, N> &rhs)
742744

743745
/**
744746
* Non-member less than operator.
747+
* @relates array
745748
*/
746749
template <typename T, std::size_t N>
747750
inline bool
@@ -753,6 +756,7 @@ operator<(const array<T, N> &lhs, const array<T, N> &rhs)
753756

754757
/**
755758
* Non-member greater than operator.
759+
* @relates array
756760
*/
757761
template <typename T, std::size_t N>
758762
inline bool
@@ -763,6 +767,7 @@ operator>(const array<T, N> &lhs, const array<T, N> &rhs)
763767

764768
/**
765769
* Non-member greater or equal operator.
770+
* @relates array
766771
*/
767772
template <typename T, std::size_t N>
768773
inline bool
@@ -773,6 +778,7 @@ operator>=(const array<T, N> &lhs, const array<T, N> &rhs)
773778

774779
/**
775780
* Non-member less or equal operator.
781+
* @relates array
776782
*/
777783
template <typename T, std::size_t N>
778784
inline bool
@@ -783,6 +789,7 @@ operator<=(const array<T, N> &lhs, const array<T, N> &rhs)
783789

784790
/**
785791
* Non-member cbegin.
792+
* @relates array
786793
*/
787794
template <typename T, std::size_t N>
788795
typename pmem::obj::array<T, N>::const_iterator
@@ -793,6 +800,7 @@ cbegin(const pmem::obj::array<T, N> &a)
793800

794801
/**
795802
* Non-member cend.
803+
* @relates array
796804
*/
797805
template <typename T, std::size_t N>
798806
typename pmem::obj::array<T, N>::const_iterator
@@ -803,6 +811,7 @@ cend(const pmem::obj::array<T, N> &a)
803811

804812
/**
805813
* Non-member crbegin.
814+
* @relates array
806815
*/
807816
template <typename T, std::size_t N>
808817
typename pmem::obj::array<T, N>::const_reverse_iterator
@@ -813,6 +822,7 @@ crbegin(const pmem::obj::array<T, N> &a)
813822

814823
/**
815824
* Non-member crend.
825+
* @relates array
816826
*/
817827
template <typename T, std::size_t N>
818828
typename pmem::obj::array<T, N>::const_reverse_iterator
@@ -823,6 +833,7 @@ crend(const pmem::obj::array<T, N> &a)
823833

824834
/**
825835
* Non-member begin.
836+
* @relates array
826837
*/
827838
template <typename T, std::size_t N>
828839
typename pmem::obj::array<T, N>::iterator
@@ -833,6 +844,7 @@ begin(pmem::obj::array<T, N> &a)
833844

834845
/**
835846
* Non-member begin.
847+
* @relates array
836848
*/
837849
template <typename T, std::size_t N>
838850
typename pmem::obj::array<T, N>::const_iterator
@@ -843,6 +855,7 @@ begin(const pmem::obj::array<T, N> &a)
843855

844856
/**
845857
* Non-member end.
858+
* @relates array
846859
*/
847860
template <typename T, std::size_t N>
848861
typename pmem::obj::array<T, N>::iterator
@@ -853,6 +866,7 @@ end(pmem::obj::array<T, N> &a)
853866

854867
/**
855868
* Non-member end.
869+
* @relates array
856870
*/
857871
template <typename T, std::size_t N>
858872
typename pmem::obj::array<T, N>::const_iterator
@@ -863,6 +877,7 @@ end(const pmem::obj::array<T, N> &a)
863877

864878
/**
865879
* Non-member rbegin.
880+
* @relates array
866881
*/
867882
template <typename T, std::size_t N>
868883
typename pmem::obj::array<T, N>::reverse_iterator
@@ -873,6 +888,7 @@ rbegin(pmem::obj::array<T, N> &a)
873888

874889
/**
875890
* Non-member rbegin.
891+
* @relates array
876892
*/
877893
template <typename T, std::size_t N>
878894
typename pmem::obj::array<T, N>::const_reverse_iterator
@@ -883,6 +899,7 @@ rbegin(const pmem::obj::array<T, N> &a)
883899

884900
/**
885901
* Non-member rend.
902+
* @relates array
886903
*/
887904
template <typename T, std::size_t N>
888905
typename pmem::obj::array<T, N>::reverse_iterator
@@ -893,6 +910,7 @@ rend(pmem::obj::array<T, N> &a)
893910

894911
/**
895912
* Non-member rend.
913+
* @relates array
896914
*/
897915
template <typename T, std::size_t N>
898916
typename pmem::obj::array<T, N>::const_reverse_iterator
@@ -903,6 +921,7 @@ rend(const pmem::obj::array<T, N> &a)
903921

904922
/**
905923
* Non-member swap function.
924+
* @relates array
906925
*/
907926
template <typename T, size_t N>
908927
inline void
@@ -913,6 +932,7 @@ swap(pmem::obj::array<T, N> &lhs, pmem::obj::array<T, N> &rhs)
913932

914933
/**
915934
* Non-member get function.
935+
* @relates array
916936
*/
917937
template <size_t I, typename T, size_t N>
918938
T &
@@ -925,6 +945,7 @@ get(pmem::obj::array<T, N> &a)
925945

926946
/**
927947
* Non-member get function.
948+
* @relates array
928949
*/
929950
template <size_t I, typename T, size_t N>
930951
T &&
@@ -937,6 +958,7 @@ get(pmem::obj::array<T, N> &&a)
937958

938959
/**
939960
* Non-member get function.
961+
* @relates array
940962
*/
941963
template <size_t I, typename T, size_t N>
942964
const T &
@@ -949,6 +971,7 @@ get(const pmem::obj::array<T, N> &a) noexcept
949971

950972
/**
951973
* Non-member get function.
974+
* @relates array
952975
*/
953976
template <size_t I, typename T, size_t N>
954977
const T &&

0 commit comments

Comments
 (0)