sparrow 0.9.0
|
Base class defining common immutable interface for arrays with a bitmap. More...
#include <array_base.hpp>
Classes | |
struct | iterator_types |
Public Types | |
using | self_type = array_crtp_base<D> |
using | derived_type = D |
using | inner_types = array_inner_types<derived_type> |
using | size_type = std::size_t |
using | difference_type = std::ptrdiff_t |
using | bitmap_type = typename inner_types::bitmap_type |
using | bitmap_const_reference = bitmap_type::const_reference |
using | bitmap_iterator = bitmap_type::iterator |
using | const_bitmap_iterator = bitmap_type::const_iterator |
using | const_bitmap_range = std::ranges::subrange<const_bitmap_iterator> |
using | inner_value_type = typename inner_types::inner_value_type |
using | value_type = nullable<inner_value_type> |
using | inner_const_reference = typename inner_types::inner_const_reference |
using | const_reference = nullable<inner_const_reference, bitmap_const_reference> |
using | const_value_iterator = typename inner_types::const_value_iterator |
using | const_value_range = std::ranges::subrange<const_value_iterator> |
using | iterator_tag = typename inner_types::iterator_tag |
using | const_iterator = layout_iterator<iterator_types> |
using | const_reverse_iterator = std::reverse_iterator<const_iterator> |
Public Member Functions | |
std::optional< std::string_view > | name () const |
std::optional< key_value_view > | metadata () const |
bool | empty () const |
Checks if the array has no element, i.e. | |
size_type | size () const |
Returns the number of elements in the array. | |
const_reference | at (size_type i) const |
Returns a constant reference to the element at the specified position in the array with bounds checking. | |
const_reference | operator[] (size_type i) const |
Returns a constant reference to the element at the specified position in the array. | |
const_reference | front () const |
Returns a constant reference to the first element in the container. | |
const_reference | back () const |
Returns a constant reference to the last element in the container. | |
const_iterator | begin () const |
Returns a constant iterator to the first element of the array. | |
const_iterator | end () const |
Returns a constant iterator to the element following the last element of the array. | |
const_iterator | cbegin () const |
Returns a constant iterator to the first element of the array. | |
const_iterator | cend () const |
Returns a constant iterator to the element following the last element of the array. | |
const_reverse_iterator | rbegin () const |
Returns a constant reverse iterator to the first element of the reversed array. | |
const_reverse_iterator | rend () const |
Returns a reverse iterator to the element following the last element of the reversed array. | |
const_reverse_iterator | crbegin () const |
Returns a constant reverse iterator to the first element of the reversed array. | |
const_reverse_iterator | crend () const |
Returns a reverse iterator to the element following the last element of the reversed array. | |
const_bitmap_range | bitmap () const |
Returns the validity bitmap of the array (i.e. | |
const_value_range | values () const |
Returns the raw values of the array (i.e. | |
D | slice (size_type start, size_type end) const |
Slices the array to keep only the elements between the given start and end . | |
D | slice_view (size_type start, size_type end) const |
Slices the array to keep only the elements between the given start and end . | |
Protected Member Functions | |
array_crtp_base (arrow_proxy) | |
array_crtp_base (const array_crtp_base &)=default | |
array_crtp_base & | operator= (const array_crtp_base &)=default |
array_crtp_base (array_crtp_base &&) noexcept=default | |
array_crtp_base & | operator= (array_crtp_base &&) noexcept=default |
arrow_proxy & | get_arrow_proxy () |
const arrow_proxy & | get_arrow_proxy () const |
bitmap_const_reference | has_value (size_type i) const |
const_bitmap_iterator | bitmap_begin () const |
const_bitmap_iterator | bitmap_end () const |
const_bitmap_iterator | bitmap_cbegin () const |
const_bitmap_iterator | bitmap_cend () const |
![]() | |
derived_type & | derived_cast () |
const derived_type & | derived_cast () const |
Friends | |
class | layout_iterator< iterator_types > |
class | detail::array_access |
Additional Inherited Members | |
![]() | |
using | derived_type = D |
Base class defining common immutable interface for arrays with a bitmap.
This class is a CRTP base class that defines and implements common immutable interface for arrays with a bitmap. These arrays hold nullable elements.
D | The derived type, i.e. the inheriting class for which array_crtp_base provides the interface. |
Definition at line 66 of file array_base.hpp.
using sparrow::array_crtp_base< D >::bitmap_const_reference = bitmap_type::const_reference |
Definition at line 79 of file array_base.hpp.
using sparrow::array_crtp_base< D >::bitmap_iterator = bitmap_type::iterator |
Definition at line 80 of file array_base.hpp.
using sparrow::array_crtp_base< D >::bitmap_type = typename inner_types::bitmap_type |
Definition at line 78 of file array_base.hpp.
using sparrow::array_crtp_base< D >::const_bitmap_iterator = bitmap_type::const_iterator |
Definition at line 81 of file array_base.hpp.
using sparrow::array_crtp_base< D >::const_bitmap_range = std::ranges::subrange<const_bitmap_iterator> |
Definition at line 82 of file array_base.hpp.
using sparrow::array_crtp_base< D >::const_iterator = layout_iterator<iterator_types> |
Definition at line 104 of file array_base.hpp.
using sparrow::array_crtp_base< D >::const_reference = nullable<inner_const_reference, bitmap_const_reference> |
Definition at line 88 of file array_base.hpp.
using sparrow::array_crtp_base< D >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 105 of file array_base.hpp.
using sparrow::array_crtp_base< D >::const_value_iterator = typename inner_types::const_value_iterator |
Definition at line 90 of file array_base.hpp.
using sparrow::array_crtp_base< D >::const_value_range = std::ranges::subrange<const_value_iterator> |
Definition at line 91 of file array_base.hpp.
using sparrow::array_crtp_base< D >::derived_type = D |
Definition at line 71 of file array_base.hpp.
using sparrow::array_crtp_base< D >::difference_type = std::ptrdiff_t |
Definition at line 76 of file array_base.hpp.
using sparrow::array_crtp_base< D >::inner_const_reference = typename inner_types::inner_const_reference |
Definition at line 87 of file array_base.hpp.
using sparrow::array_crtp_base< D >::inner_types = array_inner_types<derived_type> |
Definition at line 73 of file array_base.hpp.
using sparrow::array_crtp_base< D >::inner_value_type = typename inner_types::inner_value_type |
Definition at line 84 of file array_base.hpp.
using sparrow::array_crtp_base< D >::iterator_tag = typename inner_types::iterator_tag |
Definition at line 93 of file array_base.hpp.
using sparrow::array_crtp_base< D >::self_type = array_crtp_base<D> |
Definition at line 70 of file array_base.hpp.
using sparrow::array_crtp_base< D >::size_type = std::size_t |
Definition at line 75 of file array_base.hpp.
using sparrow::array_crtp_base< D >::value_type = nullable<inner_value_type> |
Definition at line 85 of file array_base.hpp.
|
explicitprotected |
|
protecteddefault |
|
protecteddefaultnoexcept |
|
nodiscard |
Returns a constant reference to the element at the specified position in the array with bounds checking.
i | the index of the element in the array. |
std::out_of_range | if i is not within the range of the container. |
Definition at line 232 of file array_base.hpp.
|
nodiscard |
Returns a constant reference to the last element in the container.
Calling back
on an empty container causes undefined behavior.
Definition at line 272 of file array_base.hpp.
|
nodiscard |
Returns a constant iterator to the first element of the array.
Definition at line 282 of file array_base.hpp.
|
nodiscard |
Returns the validity bitmap of the array (i.e.
the "has_value" part of the nullable elements) as a constant range.
Definition at line 371 of file array_base.hpp.
|
protected |
Definition at line 412 of file array_base.hpp.
|
protected |
Definition at line 424 of file array_base.hpp.
|
protected |
Definition at line 430 of file array_base.hpp.
|
protected |
Definition at line 418 of file array_base.hpp.
|
nodiscard |
Returns a constant iterator to the first element of the array.
This method ensures that a constant iterator is returned, even when called on a non-const array.
Definition at line 303 of file array_base.hpp.
|
nodiscard |
Returns a constant iterator to the element following the last element of the array.
This method ensures that a constant iterator is returned, even when called on a non-const array.
Definition at line 314 of file array_base.hpp.
|
nodiscard |
Returns a constant reverse iterator to the first element of the reversed array.
It corresponds to the last element of the non- reversed array. This method ensures that a constant reverse iterator is returned, even when called on a non-const array.
Definition at line 348 of file array_base.hpp.
|
nodiscard |
Returns a reverse iterator to the element following the last element of the reversed array.
It corresponds to the element preceding the first element of the non-reversed array. This method ensures that a constant reverse iterator is returned, even when called on a non-const array.
Definition at line 361 of file array_base.hpp.
|
nodiscard |
Checks if the array has no element, i.e.
Definition at line 211 of file array_base.hpp.
|
nodiscard |
Returns a constant iterator to the element following the last element of the array.
Definition at line 292 of file array_base.hpp.
|
nodiscard |
Returns a constant reference to the first element in the container.
Calling front
on an empty container causes undefined behavior.
Definition at line 261 of file array_base.hpp.
|
nodiscardprotected |
|
nodiscardprotected |
Definition at line 399 of file array_base.hpp.
|
protected |
|
nodiscard |
|
nodiscard |
|
protecteddefaultnoexcept |
|
protecteddefault |
|
nodiscard |
Returns a constant reference to the element at the specified position in the array.
i | the index of the element in the array. |
Definition at line 249 of file array_base.hpp.
|
nodiscard |
Returns a constant reverse iterator to the first element of the reversed array.
It corresponds to the last element of the non- reversed array.
Definition at line 325 of file array_base.hpp.
|
nodiscard |
Returns a reverse iterator to the element following the last element of the reversed array.
It corresponds to the element preceding the first element of the non-reversed array.
Definition at line 336 of file array_base.hpp.
|
nodiscard |
Returns the number of elements in the array.
Definition at line 220 of file array_base.hpp.
|
nodiscard |
Slices the array to keep only the elements between the given start
and end
.
A copy of the Array is modified. The data is not modified, only the ArrowArray.offset and ArrowArray.length are updated. If end
is greater than the size of the buffers, the following elements will be invalid.
start | The index of the first element to keep. Must be less than end . |
end | The index of the first element to discard. Must be less than the size of the buffers. |
Definition at line 436 of file array_base.hpp.
|
nodiscard |
Slices the array to keep only the elements between the given start
and end
.
A view of the Array is returned. The data is not modified, only the ArrowArray.offset and ArrowArray.length are updated. If end
is greater than the size of the buffers, the following elements will be invalid.
start | The index of the first element to keep. Must be less than end . |
end | The index of the first element to discard. Must be less than the size of the buffers. |
Definition at line 443 of file array_base.hpp.
|
nodiscard |
Returns the raw values of the array (i.e.
the "value" part og the nullable elements) as a constant range.
Definition at line 381 of file array_base.hpp.
|
friend |
Definition at line 182 of file array_base.hpp.
|
friend |
Definition at line 178 of file array_base.hpp.