|
Blender V4.3
|
#include <algorithm>#include <memory>#include <new>#include <type_traits>#include "BLI_utildefines.h"#include "MEM_guardedalloc.h"Go to the source code of this file.
Namespaces | |
| namespace | blender |
| namespace | blender::detail |
Macros | |
| #define | BLI_SCOPED_DEFER_NAME1(a, b) a##b |
| #define | BLI_SCOPED_DEFER_NAME2(a, b) BLI_SCOPED_DEFER_NAME1(a, b) |
| #define | BLI_SCOPED_DEFER_NAME(a) BLI_SCOPED_DEFER_NAME2(_scoped_defer_##a##_, __LINE__) |
| #define | BLI_SCOPED_DEFER(function_to_defer) |
Typedefs | |
| template<typename T > | |
| using | blender::destruct_ptr = std::unique_ptr<T, DestructValueAtAddress<T>> |
Functions | |
| template<typename T > | |
| void | blender::destruct_n (T *ptr, int64_t n) |
| template<typename T > | |
| void | blender::default_construct_n (T *ptr, int64_t n) |
| template<typename T > | |
| void | blender::initialized_copy_n (const T *src, int64_t n, T *dst) |
| template<typename T > | |
| void | blender::uninitialized_copy_n (const T *src, int64_t n, T *dst) |
| template<typename From , typename To > | |
| void | blender::uninitialized_convert_n (const From *src, int64_t n, To *dst) |
| template<typename T > | |
| void | blender::initialized_move_n (T *src, int64_t n, T *dst) |
| template<typename T > | |
| void | blender::uninitialized_move_n (T *src, int64_t n, T *dst) |
| template<typename T > | |
| void | blender::initialized_relocate_n (T *src, int64_t n, T *dst) |
| template<typename T > | |
| void | blender::uninitialized_relocate_n (T *src, int64_t n, T *dst) |
| template<typename T > | |
| void | blender::initialized_fill_n (T *dst, int64_t n, const T &value) |
| template<typename T > | |
| void | blender::uninitialized_fill_n (T *dst, int64_t n, const T &value) |
| constexpr int64_t | blender::default_inline_buffer_capacity (size_t element_size) |
| template<typename Container > | |
| Container & | blender::copy_assign_container (Container &dst, const Container &src) |
| template<typename Container > | |
| Container & | blender::move_assign_container (Container &dst, Container &&src) noexcept(std::is_nothrow_move_constructible_v< Container >) |
| template<typename T > | |
| bool | blender::assign_if_different (T &old_value, T new_value) |
Variables | |
| template<typename T > | |
| constexpr bool | blender::is_trivial_extended_v = std::is_trivial_v<T> |
| template<typename T > | |
| constexpr bool | blender::is_trivially_destructible_extended_v |
| template<typename T > | |
| constexpr bool | blender::is_trivially_copy_constructible_extended_v |
| template<typename T > | |
| constexpr bool | blender::is_trivially_move_constructible_extended_v |
| template<typename From , typename To > | |
| constexpr bool | blender::is_convertible_pointer_v |
| template<typename From , typename To > | |
| constexpr bool | blender::is_span_convertible_pointer_v |
| template<typename T , typename... Args> | |
| constexpr bool | blender::is_same_any_v = (std::is_same_v<T, Args> || ...) |
| #define BLI_SCOPED_DEFER | ( | function_to_defer | ) |
Execute the given function when the current scope ends. This can be used to cheaply implement some RAII-like behavior for C types that don't support it. Long term, the types we want to use this with should either be converted to C++ or get a proper C++ API. Until then, this function can help avoid common resource leakages.
Definition at line 407 of file BLI_memory_utils.hh.
Referenced by blender::ed::viewer_path::activate_geometry_node(), asset_shelf_popover_invoke(), blender::ed::object::bake_simulation::bake_single_node_gather_bake_request(), BKE_crazyspace_build_sculpt(), BKE_curve_minmax(), BKE_sculpt_get_first_deform_matrices(), BM_mesh_bm_from_me(), blender::bke::mesh::build_vert_to_edge_map(), blender::ed::sculpt_paint::auto_mask::calc_face_factors(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), blender::ed::space_node::create_inspection_string_for_generic_value(), blender::ed::object::bake_simulation::delete_single_bake_exec(), depthdropper_init(), blender::ed::space_node::draw_nodetree(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), blender::fn::lazy_function::Executor::execute(), blender::io::usd::export_in_memory_texture(), eyedropper_init(), blender::ed::greasepencil::fill_strokes(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected(), blender::ed::viewer_path::find_geometry_nodes_viewer(), blender::bke::bake::find_sorted_meta_files(), blender::nodes::gizmos::foreach_active_gizmo_exposed_to_modifier(), blender::nodes::gizmos::foreach_active_gizmo_in_open_node_editor(), blender::nodes::node_geo_interpolate_curves_cc::generate_interpolated_curves(), blender::bke::AttributeFieldInput::get_varray_for_context(), blender::bke::EvaluateOnDomainInput::get_varray_for_context(), blender::ed::sculpt_paint::grease_pencil_fill_extension_cut(), blender::ed::greasepencil::grease_pencil_layer_add_exec(), blender::ed::greasepencil::grease_pencil_layer_mask_add_exec(), blender::ed::greasepencil::grease_pencil_move_to_layer_exec(), imapaint_pick_face(), blender::bke::bake::load_attributes(), M_Geometry_delaunay_2d_cdt(), blender::ed::mesh::set_attribute::mesh_set_attribute_exec(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::nodes::node_geo_image_info_cc::node_geo_exec(), blender::nodes::node_geo_import_obj::node_geo_exec(), blender::nodes::node_geo_import_stl::node_geo_exec(), blender::nodes::nodes_geo_import_ply::node_geo_exec(), blender::ed::space_node::node_group_make_test_selected(), blender::bke::bake::pack_files_from_directory(), blender::ed::object::bake_simulation::pack_single_bake_exec(), blender::ed::greasepencil::process_image(), blender::nodes::node_geo_raycast_cc::raycast_to_mesh(), blender::ed::asset::index::AssetIndexFile::read_contents(), blender::io::stl::read_stl_ascii(), blender::io::stl::read_stl_file(), blender::bke::mesh::reverse_group_indices_in_groups(), blender::bke::mesh::reverse_indices_in_groups(), blender::nodes::node_geo_scale_elements_cc::reverse_indices_in_groups(), blender::ed::geometry::run_node_group_exec(), blender::ed::geometry::run_node_group_get_name(), blender::ed::sculpt_paint::sample_curves_3d_brush(), blender::ed::greasepencil::selection_update(), blender::ed::curves::set_attribute_exec(), blender::ed::curves::set_attribute_invoke(), blender::ed::curves::snap_curves_to_surface::snap_curves_to_surface_exec_object(), blender::geometry::curve_constraints::solve_length_and_collision_constraints(), blender::tests::TEST(), blender::tests::TEST(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), ui_but_event_operator_string_from_panel(), ui_but_event_property_operator_string(), blender::ed::object::bake_simulation::unpack_single_bake_exec(), blender::ed::viewer_path::update_active_geometry_nodes_viewer(), blender::nodes::node_geo_distribute_points_on_faces_cc::update_elimination_mask_for_close_points(), blender::ed::sculpt_paint::use_add_density_mode(), and blender::ed::curves::validate_value().
| #define BLI_SCOPED_DEFER_NAME | ( | a | ) | BLI_SCOPED_DEFER_NAME2(_scoped_defer_##a##_, __LINE__) |
Definition at line 399 of file BLI_memory_utils.hh.
Definition at line 397 of file BLI_memory_utils.hh.
| #define BLI_SCOPED_DEFER_NAME2 | ( | a, | |
| b ) BLI_SCOPED_DEFER_NAME1(a, b) |
Definition at line 398 of file BLI_memory_utils.hh.