Skip to content

Commit 1c9a312

Browse files
authored
GH-40318: [C++][Docs] Add documentation of array factories (#40373)
### Rationale for this change These factory functions are generally useful and available, so documenting them helps external users find them without having to search the source code. ### What changes are included in this PR? This PR adds the array factories in arrow/array/util.h into a doxygen group for array factories and adds that group to the Sphinx C++ API documentation. ### Are these changes tested? I built the docs locally to verify. ### Are there any user-facing changes? Nothing to the API, only docs. * GitHub Issue: #40318 Authored-by: Vyas Ramasubramani <vyasr@nvidia.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
1 parent e950eb4 commit 1c9a312

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

cpp/src/arrow/array/util.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131

3232
namespace arrow {
3333

34+
/// \defgroup array-factories Array factory functions
35+
///
36+
/// @{
37+
3438
/// \brief Create a strongly-typed Array instance from generic ArrayData
3539
/// \param[in] data the array contents
3640
/// \return the resulting Array instance
@@ -65,6 +69,8 @@ ARROW_EXPORT
6569
Result<std::shared_ptr<Array>> MakeEmptyArray(std::shared_ptr<DataType> type,
6670
MemoryPool* pool = default_memory_pool());
6771

72+
/// @}
73+
6874
namespace internal {
6975

7076
/// \brief Swap endian of each element in a generic ArrayData

docs/source/cpp/api/array.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ Arrays
2727
:project: arrow_cpp
2828
:members:
2929

30+
Factory functions
31+
=================
32+
33+
.. doxygengroup:: array-factories
34+
:content-only:
35+
3036
Concrete array subclasses
3137
=========================
3238

@@ -86,4 +92,4 @@ Utilities
8692
.. doxygenclass:: arrow::ArrayVisitor
8793
:project: arrow_cpp
8894
:members:
89-
:undoc-members:
95+
:undoc-members:

0 commit comments

Comments
 (0)