Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-40318: [C++][Docs] Add documentation of array factories #40373

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cpp/src/arrow/array/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@

namespace arrow {

/// \defgroup array-factories Array factory functions
///
/// @{

/// \brief Create a strongly-typed Array instance from generic ArrayData
/// \param[in] data the array contents
/// \return the resulting Array instance
Expand Down Expand Up @@ -65,6 +69,8 @@ ARROW_EXPORT
Result<std::shared_ptr<Array>> MakeEmptyArray(std::shared_ptr<DataType> type,
MemoryPool* pool = default_memory_pool());

/// @}

namespace internal {

/// \brief Swap endian of each element in a generic ArrayData
Expand Down
8 changes: 7 additions & 1 deletion docs/source/cpp/api/array.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ Arrays
:project: arrow_cpp
:members:

Factory functions
=================

.. doxygengroup:: array-factories
:content-only:

Concrete array subclasses
=========================

Expand Down Expand Up @@ -86,4 +92,4 @@ Utilities
.. doxygenclass:: arrow::ArrayVisitor
:project: arrow_cpp
:members:
:undoc-members:
:undoc-members:
Loading