|
Blender V5.3
|
#include <BLI_implicit_sharing_ptr.hh>
Public Types | |
| using | element_type = T |
Public Member Functions | |
| ImplicitSharingPtr ()=default | |
| ImplicitSharingPtr (const T *data) | |
| ImplicitSharingPtr (std::nullptr_t) | |
| ImplicitSharingPtr (const ImplicitSharingPtr &other) | |
| ImplicitSharingPtr (ImplicitSharingPtr &&other) | |
| template<typename U> requires std::is_base_of_v<T, U> | |
| ImplicitSharingPtr (const ImplicitSharingPtr< U, IsStrong > &other) | |
| template<typename U> requires std::is_base_of_v<T, U> | |
| ImplicitSharingPtr (ImplicitSharingPtr< U, IsStrong > &&other) | |
| ~ImplicitSharingPtr () | |
| ImplicitSharingPtr & | operator= (const ImplicitSharingPtr &other) |
| ImplicitSharingPtr & | operator= (ImplicitSharingPtr &&other) |
| const T * | operator-> () const |
| const T & | operator* () const |
| operator bool () const | |
| const T * | get () const |
| const T * | release () |
| void | reset () |
| bool | has_value () const |
| uint64_t | hash () const |
| T & | ensure_mutable_inplace () |
Static Public Member Functions | |
| static uint64_t | hash_as (const T *data) |
Friends | |
| template<typename U, bool OtherIsStrong> | |
| class | ImplicitSharingPtr |
| bool | operator== (const ImplicitSharingPtr &a, const ImplicitSharingPtr &b)=default |
| bool | operator== (const T *a, const ImplicitSharingPtr &b) |
| bool | operator== (const ImplicitSharingPtr &a, const T *b) |
ImplicitSharingPtr is a smart pointer that manages implicit sharing. It's designed to work with types that derive from ImplicitSharingMixin. It is fairly similar to #std::shared_ptr but requires the reference count to be embedded in the data.
Definition at line 23 of file BLI_implicit_sharing_ptr.hh.
| using blender::ImplicitSharingPtr< T, IsStrong >::element_type = T |
Definition at line 30 of file BLI_implicit_sharing_ptr.hh.
|
default |
|
inlineexplicit |
Definition at line 34 of file BLI_implicit_sharing_ptr.hh.
|
inline |
Definition at line 37 of file BLI_implicit_sharing_ptr.hh.
|
inline |
Definition at line 39 of file BLI_implicit_sharing_ptr.hh.
|
inline |
Definition at line 44 of file BLI_implicit_sharing_ptr.hh.
|
inline |
Definition at line 50 of file BLI_implicit_sharing_ptr.hh.
|
inline |
Definition at line 58 of file BLI_implicit_sharing_ptr.hh.
|
inline |
Definition at line 65 of file BLI_implicit_sharing_ptr.hh.
|
inline |
If there is only a single user of the data, return a mutable reference to it directly. Otherwise call #copy which is expected to return a new implicitly shared pointer that always has a single user.
Definition at line 144 of file BLI_implicit_sharing_ptr.hh.
Referenced by blender::bke::socket_value_visitor::RecursiveVisitor::edit_GList(), blender::bke::socket_value_visitor::RecursiveVisitor::edit_GPointer(), blender::nodes::Bundle::ensure_nested_bundle(), blender::nodes::GList::ensure_owns_direct_data(), blender::nodes::node_geo_combine_bundle_cc::CombineBundleOperation::execute(), blender::nodes::node_geo_get_bundle_item_cc::GetBundleItemOperation::execute(), blender::nodes::node_geo_store_bundle_item_cc::StoreBundleItemOperation::execute(), blender::bke::GeometrySet::get_component_for_write(), blender::geometry::mix_socket_values_same_type(), blender::nodes::node_geo_combine_bundle_cc::node_geo_exec(), blender::nodes::node_geo_get_bundle_item_cc::node_geo_exec(), blender::nodes::node_geo_join_bundle::node_geo_exec(), blender::nodes::node_geo_store_bundle_item_cc::node_geo_exec(), blender::nodes::node_geo_xpbd_solver_cc::node_geo_exec(), blender::bke::bake::tests::TEST_F(), blender::bke::socket_value_visitor::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), blender::nodes::tests::TEST_F(), and blender::bke::bake::try_load_geometry_bundle().
|
inline |
Definition at line 111 of file BLI_implicit_sharing_ptr.hh.
Referenced by blender::ImBuf::assign_byte_data(), blender::ImBuf::assign_float_data(), blender::ImBuf::assign_metadata(), blender::BKE_object_get_editmesh_eval_cage(), blender::BKE_object_get_mesh_deform_eval(), blender::nodes::GList::ArrayData::count_memory(), blender::IMB_colormanagement_working_space_convert(), blender::nodes::node_geo_sort_elements_cc::node_geo_exec(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().
|
inline |
Definition at line 129 of file BLI_implicit_sharing_ptr.hh.
Referenced by blender::bke::GeometrySet::has(), and blender::ImplicitSharingPtrAndData::has_value().
|
inline |
Definition at line 134 of file BLI_implicit_sharing_ptr.hh.
|
inlinestatic |
Definition at line 156 of file BLI_implicit_sharing_ptr.hh.
|
inline |
Definition at line 106 of file BLI_implicit_sharing_ptr.hh.
|
inline |
Definition at line 100 of file BLI_implicit_sharing_ptr.hh.
|
inline |
Definition at line 94 of file BLI_implicit_sharing_ptr.hh.
|
inline |
Definition at line 70 of file BLI_implicit_sharing_ptr.hh.
|
inline |
Definition at line 82 of file BLI_implicit_sharing_ptr.hh.
|
inline |
Definition at line 116 of file BLI_implicit_sharing_ptr.hh.
|
inline |
Definition at line 123 of file BLI_implicit_sharing_ptr.hh.
Referenced by blender::IMB_free_byte_pixels(), and blender::IMB_free_float_pixels().
|
friend |
Definition at line 27 of file BLI_implicit_sharing_ptr.hh.
Referenced by blender::compositor::Result::allocate_texture(), blender::bke::array_data_from_garray(), blender::nodes::array_data_from_garray(), blender::ArrayState< T >::ArrayState(), blender::ImBuf::assign_byte_data(), blender::ImBuf::assign_float_data(), blender::bke::attribute_init_to_data(), blender::bke::attribute_legacy_convert_customdata_to_storage(), blender::ImBuf::byte_data_for_write(), blender::tests::ImplicitlySharedData::copy(), blender::ImBuf::float_data_for_write(), blender::nodes::GList::SingleData::ForValue(), blender::nodes::GList::from_container(), blender::bke::Attribute::SingleData::from_value(), blender::imb_alloc_buffer(), blender::nodes::node_geo_bake_cc::LazyFunctionForBakeNode::make_attribute_field(), blender::ImBuf::metadata_for_write(), blender::compositor::BundleItem::new_bundle_item_value(), blender::bke::CurvesEditHints::positions_for_write(), blender::bke::read_attr_data(), blender::bke::save_shared_attribute(), blender::save_shared_attribute(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::try_capture_fields_on_geometry(), and blender::um_arraystore_cd_expand().
|
friend |
|
friend |
Definition at line 168 of file BLI_implicit_sharing_ptr.hh.
|
friend |
Definition at line 163 of file BLI_implicit_sharing_ptr.hh.