Blender V5.3
blender::GMutableSpan Class Reference

#include <BLI_generic_span.hh>

Inherited by blender::GMutableVArraySpan.

Public Member Functions

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

Protected Attributes

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

Detailed Description

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

Definition at line 145 of file BLI_generic_span.hh.

Constructor & Destructor Documentation

◆ GMutableSpan() [1/6]

◆ GMutableSpan() [2/6]

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

◆ GMutableSpan() [3/6]

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

Definition at line 163 of file BLI_generic_span.hh.

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

◆ GMutableSpan() [4/6]

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

Definition at line 167 of file BLI_generic_span.hh.

References type(), and type_.

◆ GMutableSpan() [5/6]

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

Definition at line 169 of file BLI_generic_span.hh.

References type(), and type_.

◆ GMutableSpan() [6/6]

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

Definition at line 172 of file BLI_generic_span.hh.

References blender::begin(), GMutableSpan(), size(), and T.

Member Function Documentation

◆ copy_from()

void blender::GMutableSpan::copy_from ( GSpan values)
inline

◆ data()

void * blender::GMutableSpan::data ( ) const
inline

Definition at line 208 of file BLI_generic_span.hh.

References data_.

Referenced by blender::ed::object::bake_targets_output_vertex_colors(), blender::geometry::construct::build_output_mesh(), blender::fn::multi_function::CustomMF_DefaultOutput::call(), blender::fn::multi_function::CustomMF_GenericCopy::call(), blender::nodes::node_geo_menu_switch_cc::MenuSwitchFn::call(), blender::ed::sculpt_paint::color::color_vert_set(), blender::bke::DataTypeConversions::convert_to_initialized_n(), blender::array_utils::copy(), blender::array_utils::copy(), blender::bke::copy_attributes_group_to_group(), blender::compositor::Result::download_to_cpu(), blender::fn::evaluate_fields(), blender::nodes::node_composite_denoise_cc::DenoiseOperation::execute(), blender::nodes::node_composite_convert_color_space_cc::ConvertColorSpaceOperation::execute_cpu(), blender::nodes::node_composite_convert_to_display_cc::ConvertToDisplayOperation::execute_cpu(), blender::geometry::extract_mesh_faces(), blender::bke::curves::fill_points(), blender::array_utils::gather(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::geometry::construct::interpolate_new_corner_attribute_from_faces(), blender::ed::mesh::join_generic_attributes(), blender::bke::mesh_calc_edges(), blender::nodes::node_geo_extrude_mesh_cc::mix_groups_or_default(), blender::bke::bake::read_blob_simple_gspan(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), blender::ed::curves::resize_curves(), blender::geometry::smooth_curve_attribute(), blender::compositor::StringImage::StringImage(), and blender::bke::validate_float_attribute().

◆ drop_back()

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

◆ drop_front()

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

◆ is_empty()

◆ operator GSpan()

blender::GMutableSpan::operator GSpan ( ) const
inline

Definition at line 177 of file BLI_generic_span.hh.

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

◆ operator[]()

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

◆ size()

int64_t blender::GMutableSpan::size ( ) const
inline

Definition at line 198 of file BLI_generic_span.hh.

References size_.

Referenced by blender::ed::greasepencil::add_single_curve(), blender::fn::multi_function::ParamsBuilder::add_single_mutable(), blender::fn::multi_function::ParamsBuilder::add_uninitialized_single_output(), blender::ed::pointcloud::apply_selection_operation(), blender::bke::DataTypeConversions::convert_to_initialized_n(), blender::array_utils::copy(), blender::array_utils::copy(), blender::bke::copy_attributes_group_to_group(), blender::ed::pointcloud::fill_selection_true(), blender::array_utils::gather(), blender::bke::attribute_math::gather(), blender::bke::attribute_math::gather(), GMutableSpan(), GMutableSpan(), GMutableSpan(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::nodes::node_geo_distribute_points_on_faces_cc::interpolate_attribute(), blender::geometry::interpolate_curves_with_samples(), blender::bke::curves::nurbs::interpolate_to_evaluated(), blender::bke::CurvesGeometry::interpolate_to_evaluated(), blender::ed::curves::invert_selection(), blender::bke::mesh_apply_spatial_organization(), blender::bke::mesh_calc_edges(), blender::bke::attribute_math::mix_groups(), blender::ed::curves::resize_curves(), blender::ed::greasepencil::resize_single_curve(), blender::geometry::reverse_order(), blender::geometry::sample_curve_attribute(), blender::bke::sample_vertex_attributes(), slice(), blender::tests::TEST_F(), blender::tests::TEST_F(), blender::tests::TEST_F(), blender::geometry::threaded_copy(), blender::geometry::threaded_fill(), blender::ed::sculpt_paint::greasepencil::trim_end_points(), blender::bke::try_direct_evaluate_point_data(), and blender::fn::multi_function::Params::uninitialized_single_output().

◆ size_in_bytes()

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

◆ slice() [1/2]

◆ slice() [2/2]

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

◆ take_back()

◆ take_front()

◆ type()

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

Definition at line 182 of file BLI_generic_span.hh.

References blender::BLI_assert(), and type_.

Referenced by blender::ed::sculpt_paint::color::active_color_attribute_for_write(), blender::fn::multi_function::ParamsBuilder::add_single_mutable(), blender::fn::multi_function::ParamsBuilder::add_uninitialized_single_output(), blender::ed::curves::apply_selection_operation_at_index(), blender::ed::object::bake_targets_output_vertex_colors(), blender::nodes::node_geo_blur_attribute_cc::blur_on_curves(), blender::nodes::node_geo_blur_attribute_cc::blur_on_mesh(), blender::fn::multi_function::CustomMF_DefaultOutput::call(), blender::ed::sculpt_paint::color::color_vert_set(), blender::bke::DataTypeConversions::convert_to_initialized_n(), blender::array_utils::copy(), blender::array_utils::copy(), blender::data_transfer_layersmapping_add_item_attr(), blender::geometry::execute_instances_tasks(), blender::bke::curves::fill_points(), blender::ed::curves::fill_selection(), blender::ed::curves::fill_selection_false(), blender::ed::curves::fill_selection_false(), blender::ed::pointcloud::fill_selection_false(), blender::ed::curves::fill_selection_true(), blender::ed::curves::fill_selection_true(), blender::ed::pointcloud::fill_selection_true(), blender::array_utils::gather(), GMutableSpan(), GMutableSpan(), GMutableSpan(), GMutableSpan(), blender::GMutableVArraySpan::GMutableVArraySpan(), blender::geometry::interpolate_curves_with_samples(), blender::ed::curves::invert_selection(), blender::ed::pointcloud::invert_selection(), blender::ed::curves::is_everything_selected(), blender::bke::mesh_apply_spatial_organization(), blender::geometry::mix(), blender::geometry::mix_arrays(), blender::geometry::mix_arrays(), blender::nodes::node_geo_extrude_mesh_cc::mix_groups_or_default(), blender::geometry::mix_with_indices(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), blender::geometry::reverse_order(), blender::bke::mesh_surface_sample::sample_corner_attribute(), blender::geometry::sample_curve_attribute(), blender::bke::mesh_surface_sample::sample_face_attribute(), blender::bke::mesh_surface_sample::sample_point_attribute(), blender::ed::curves::select_adjacent(), blender::ed::curves::select_ends_exec(), blender::geometry::smooth_curve_attribute(), blender::geometry::subdivide_attribute_linear(), blender::ed::sculpt_paint::color::swap_gathered_colors(), blender::geometry::threaded_copy(), blender::geometry::threaded_fill(), and blender::bke::validate_float_attribute().

◆ type_ptr()

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

Definition at line 188 of file BLI_generic_span.hh.

References type_.

Referenced by blender::GMutableVArraySpan::GMutableVArraySpan().

◆ typed()

template<typename T>
MutableSpan< T > blender::GMutableSpan::typed ( ) const
inline

Definition at line 220 of file BLI_generic_span.hh.

References blender::BLI_assert(), data_, blender::CPPType::is(), blender::MutableSpan< T >::MutableSpan(), size_, T, and type_.

Referenced by blender::ed::curves::apply_selection_operation_at_index(), blender::ed::object::bake_targets_output_vertex_colors(), blender::bke::bake::deserialize_value_list(), blender::ed::curves::fill_selection(), blender::ed::curves::fill_selection_false(), blender::ed::curves::fill_selection_false(), blender::ed::pointcloud::fill_selection_false(), blender::ed::curves::fill_selection_true(), blender::ed::curves::fill_selection_true(), blender::ed::pointcloud::fill_selection_true(), blender::geometry::gather_point_attributes_to_interpolate(), blender::bke::get_mutable_attribute(), blender::ed::greasepencil::grease_pencil_material_select_exec(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::ed::curves::invert_selection(), blender::ed::pointcloud::invert_selection(), blender::ed::curves::is_everything_selected(), blender::geometry::merge_points(), blender::nodes::node_geo_sort_list_cc::node_geo_exec(), blender::bke::mesh_surface_sample::sample_corner_attribute(), blender::geometry::sample_curve_attribute(), blender::bke::mesh_surface_sample::sample_face_attribute(), blender::bke::mesh_surface_sample::sample_point_attribute(), blender::ed::curves::select_adjacent(), blender::ed::curves::select_ends_exec(), blender::ed::greasepencil::select_similar_by_value(), blender::compositor::Result::store_pixel(), blender::tests::TEST_F(), blender::tests::TEST_F(), blender::tests::TEST_F(), and blender::tests::TEST_F().

Member Data Documentation

◆ data_

◆ size_

◆ type_


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