sparrow 0.3.0
|
#include <algorithm>
#include <optional>
#include <ranges>
#include <tuple>
#include <type_traits>
#include <vector>
#include "sparrow/c_interface.hpp"
#include "sparrow/utils/memory.hpp"
#include "sparrow/utils/mp_utils.hpp"
Go to the source code of this file.
Classes | |
class | sparrow::children_ownership |
Namespaces | |
namespace | sparrow |
Functions | |
template<class T> requires std::same_as<T, ArrowArray> || std::same_as<T, ArrowSchema> | |
void | sparrow::release_common_arrow (T &t) |
Release the children and dictionnary of an ArrowArray or ArrowSchema . | |
template<class T> | |
constexpr int64_t | sparrow::ssize (const T &value) |
Get the size of a range, a tuple or an optional. | |
template<typename T, typename U> | |
constexpr T * | sparrow::get_raw_ptr (U &var) |
Get a raw pointer from a smart pointer, a range, an object or a pointer. | |
template<class T, std::ranges::input_range Range, class Allocator = std::allocator<T*>> requires (!std::ranges::view<Range>) | |
constexpr std::vector< T *, Allocator > | sparrow::to_raw_ptr_vec (Range &range) |
Create a vector of pointers to elements from a range. | |
template<class T, class Optional, class Allocator = std::allocator<T*>> requires (mpl::is_type_instance_of_v<Optional, std::optional>) | |
constexpr std::vector< T *, Allocator > | sparrow::to_raw_ptr_vec (Optional &optional) |
Create a vector of pointers to elements from a std::optional<range>. | |
template<class T, class Tuple, class Allocator = std::allocator<T*>> requires mpl::is_type_instance_of_v<Tuple, std::tuple> | |
constexpr std::vector< T *, Allocator > | sparrow::to_raw_ptr_vec (Tuple &tuple) |
Create a vector of pointers to elements of a tuple. | |
template<class T> requires std::same_as<T, std::nullopt_t> || (mpl::is_type_instance_of_v<T, std::optional> && mpl::testable<std::ranges::range_value_t<typename T::value_type>>) || (std::ranges::range<T> && mpl::testable<std::ranges::range_value_t<T>>) | |
constexpr bool | sparrow::all_element_are_true (const T &elements) |
Check if all elements of a range or std::optional<range> are valid by caling their bool operator. | |