sparrow ..
Loading...
Searching...
No Matches
sparrow::layout_element_functor< Layout, is_const > Class Template Reference

Functor for accessing elements in a layout. More...

#include <dictionary_encoded_array.hpp>

Public Types

using layout_type = Layout
 
using storage_type = std::conditional_t<is_const, const layout_type*, layout_type>
 
using return_type
 

Public Member Functions

constexpr layout_element_functor ()=default
 Default constructor.
 
constexpr layout_element_functor (storage_type layout_)
 Constructs a functor with the given layout.
 
constexpr return_type operator() (std::size_t i) const
 Access operator for getting element at index.
 

Detailed Description

template<class Layout, bool is_const>
class sparrow::layout_element_functor< Layout, is_const >

Functor for accessing elements in a layout.

Template Parameters
LayoutThe layout type.
is_constWhether the functor provides const access.

Definition at line 45 of file dictionary_encoded_array.hpp.

Member Typedef Documentation

◆ layout_type

template<class Layout, bool is_const>
using sparrow::layout_element_functor< Layout, is_const >::layout_type = Layout

Definition at line 49 of file dictionary_encoded_array.hpp.

◆ return_type

template<class Layout, bool is_const>
using sparrow::layout_element_functor< Layout, is_const >::return_type
Initial value:
std::
conditional_t<is_const, typename layout_type::const_reference, typename layout_type::reference>

Definition at line 51 of file dictionary_encoded_array.hpp.

◆ storage_type

template<class Layout, bool is_const>
using sparrow::layout_element_functor< Layout, is_const >::storage_type = std::conditional_t<is_const, const layout_type*, layout_type>

Definition at line 50 of file dictionary_encoded_array.hpp.

Constructor & Destructor Documentation

◆ layout_element_functor() [1/2]

template<class Layout, bool is_const>
sparrow::layout_element_functor< Layout, is_const >::layout_element_functor ( )
constexprdefault

Default constructor.

◆ layout_element_functor() [2/2]

template<class Layout, bool is_const>
sparrow::layout_element_functor< Layout, is_const >::layout_element_functor ( storage_type layout_)
inlineexplicitconstexpr

Constructs a functor with the given layout.

Parameters
layout_Pointer to the layout to access.

Definition at line 64 of file dictionary_encoded_array.hpp.

Member Function Documentation

◆ operator()()

template<class Layout, bool is_const>
return_type sparrow::layout_element_functor< Layout, is_const >::operator() ( std::size_t i) const
inlinenodiscardconstexpr

Access operator for getting element at index.

Parameters
iThe index of the element to access.
Returns
Reference to the element at the specified index.

Definition at line 75 of file dictionary_encoded_array.hpp.


The documentation for this class was generated from the following file: