Blender V5.3
blender::GSpan Class Reference

#include <BLI_generic_span.hh>

Inherited by blender::GVArraySpan.

Public Member Functions

 GSpan ()=default
 GSpan (const CPPType *type, const void *buffer, int64_t size)
 GSpan (const CPPType &type, const void *buffer, int64_t size)
 GSpan (const CPPType &type)
 GSpan (const CPPType *type)
template<typename T>
 GSpan (Span< T > array)
template<typename T>
 GSpan (MutableSpan< T > array)
const CPPType & type () const
const CPPType * type_ptr () const
bool is_empty () const
int64_t size () const
int64_t size_in_bytes () const
const void * data () const
const void * operator[] (int64_t index) const
template<typename T>
Span< T > typed () const
GSpan slice (const int64_t start, int64_t size) const
GSpan slice (const IndexRange range) const
GSpan drop_front (const int64_t n) const
GSpan drop_back (const int64_t n) const
GSpan take_front (const int64_t n) const
GSpan take_back (const int64_t n) const

Protected Attributes

const CPPType * type_ = nullptr
const void * data_ = nullptr
int64_t size_ = 0

Detailed Description

A generic span. It behaves just like a Span<T>, but the type is only known at run-time.

Definition at line 19 of file BLI_generic_span.hh.

Constructor & Destructor Documentation

◆ GSpan() [1/7]

◆ GSpan() [2/7]

blender::GSpan::GSpan ( const CPPType * type,
const void * buffer,
int64_t size )
inline

◆ GSpan() [3/7]

blender::GSpan::GSpan ( const CPPType & type,
const void * buffer,
int64_t size )
inline

Definition at line 37 of file BLI_generic_span.hh.

References GSpan(), size(), and type().

◆ GSpan() [4/7]

blender::GSpan::GSpan ( const CPPType & type)
inline

Definition at line 39 of file BLI_generic_span.hh.

References type(), and type_.

◆ GSpan() [5/7]

blender::GSpan::GSpan ( const CPPType * type)
inline

Definition at line 41 of file BLI_generic_span.hh.

References type(), and type_.

◆ GSpan() [6/7]

template<typename T>
blender::GSpan::GSpan ( Span< T > array)
inline

Definition at line 44 of file BLI_generic_span.hh.

References data(), GSpan(), size(), and T.

◆ GSpan() [7/7]

template<typename T>
blender::GSpan::GSpan ( MutableSpan< T > array)
inline

Definition at line 50 of file BLI_generic_span.hh.

References data(), GSpan(), size(), and T.

Member Function Documentation

◆ data()

◆ drop_back()

GSpan blender::GSpan::drop_back ( const int64_t n) const
inline

Definition at line 119 of file BLI_generic_span.hh.

References blender::BLI_assert(), data_, GSpan(), size_, and type_.

◆ drop_front()

GSpan blender::GSpan::drop_front ( const int64_t n) const
inline

◆ is_empty()

bool blender::GSpan::is_empty ( ) const
inline

◆ operator[]()

const void * blender::GSpan::operator[] ( int64_t index) const
inline

◆ size()

◆ size_in_bytes()

int64_t blender::GSpan::size_in_bytes ( ) const
inline

Definition at line 76 of file BLI_generic_span.hh.

References blender::CPPType::size, size_, and type_.

Referenced by blender::bke::validate_float_attribute().

◆ slice() [1/2]

GSpan blender::GSpan::slice ( const IndexRange range) const
inline

◆ slice() [2/2]

◆ take_back()

GSpan blender::GSpan::take_back ( const int64_t n) const
inline

◆ take_front()

GSpan blender::GSpan::take_front ( const int64_t n) const
inline

Definition at line 126 of file BLI_generic_span.hh.

References blender::BLI_assert(), data_, GSpan(), size_, and type_.

◆ type()

const CPPType & blender::GSpan::type ( ) const
inline

Definition at line 55 of file BLI_generic_span.hh.

References blender::BLI_assert(), and type_.

Referenced by blender::fn::multi_function::ParamsBuilder::add_readonly_single_input(), blender::ed::greasepencil::image_render::attribute_interpolate(), blender::draw::pbvh::calc_generic_corner_attribute_grids(), blender::draw::pbvh::calc_generic_vert_attribute_grids(), blender::ed::sculpt_paint::color::color_corner_get(), blender::ed::sculpt_paint::color::color_vert_get(), blender::bke::DataTypeConversions::convert_to_initialized_n(), blender::bke::LegacyMeshInterpolator::copy(), blender::GMutableSpan::copy_from(), blender::bke::copy_profile_point_domain_attribute_to_mesh(), blender::geometry::curve_simplify(), blender::draw::pbvh::fill_generic_face_attribute_grids(), blender::bke::gather_attributes(), blender::ed::sculpt_paint::color::gather_colors(), blender::ed::sculpt_paint::color::gather_colors_vert(), blender::bke::attribute_math::gather_group_to_group(), blender::bke::attribute_math::gather_ranges_to_groups(), blender::bke::attribute_math::gather_to_groups(), blender::geometry::gaussian_blur_1D(), GSpan(), GSpan(), GSpan(), GSpan(), blender::GVArray::GVArray(), blender::GVArraySpan::GVArraySpan(), blender::ed::curves::has_anything_selected(), blender::geometry::construct::interpolate_new_corner_attribute_from_faces(), blender::bke::curves::bezier::interpolate_to_evaluated(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::bke::curves::nurbs::interpolate_to_evaluated(), blender::bke::attribute_math::mix_groups(), blender::nodes::node_geo_extrude_mesh_cc::mix_groups_or_default(), blender::geometry::prepare_attribute_fallbacks(), blender::geometry::sample_curve_attribute(), and blender::geometry::simplify_curve_attribute().

◆ type_ptr()

const CPPType * blender::GSpan::type_ptr ( ) const
inline

Definition at line 61 of file BLI_generic_span.hh.

References type_.

Referenced by blender::GVArraySpan::GVArraySpan().

◆ typed()

Member Data Documentation

◆ data_

const void* blender::GSpan::data_ = nullptr
protected

◆ size_

◆ type_


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