Blender V4.3
blender::bke::bake::BlobReadSharing Class Reference

#include <BKE_bake_items_serialize.hh>

Inherits blender::NonCopyable, and blender::NonMovable.

Public Member Functions

 ~BlobReadSharing ()
 
std::optional< ImplicitSharingInfoAndDataread_shared (const io::serialize::DictionaryValue &io_data, FunctionRef< std::optional< ImplicitSharingInfoAndData >()> read_fn) const
 

Detailed Description

Avoids loading the same data multiple times by caching and sharing previously read buffers.

Definition at line 135 of file BKE_bake_items_serialize.hh.

Constructor & Destructor Documentation

◆ ~BlobReadSharing()

blender::bke::bake::BlobReadSharing::~BlobReadSharing ( )

Definition at line 216 of file bake_items_serialize.cc.

Member Function Documentation

◆ read_shared()

std::optional< ImplicitSharingInfoAndData > blender::bke::bake::BlobReadSharing::read_shared ( const io::serialize::DictionaryValue & io_data,
FunctionRef< std::optional< ImplicitSharingInfoAndData >()> read_fn ) const
nodiscard

Check if the data identified by io_data has been read before or load it now.

Returns
Shared ownership to the read data, or none if there was an error.

Definition at line 262 of file bake_items_serialize.cc.

References data, lock, and blender::io::serialize::JsonFormatter::serialize().

Referenced by blender::bke::bake::read_blob_shared_simple_gspan().


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