4#include "MRPch/MRBindingMacros.h"
27 [[nodiscard]]
const T*
get() {
return obj_.get(); }
30 [[nodiscard]] std::shared_ptr<const T>
getPtr() {
return obj_; }
46 std::shared_ptr<T> obj_;
49 std::shared_ptr<TaskGroup> construction_;
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:79
Definition MRSharedThreadSafeOwner.h:21
MRMESH_API void update(const std::function< void(T &)> &updater)
MRMESH_API size_t heapBytes() const
returns the amount of memory this object occupies on heap
const T * get()
returns the currently owned instance, the pointer becomes invalid after reset() or update()
Definition MRSharedThreadSafeOwner.h:27
MRMESH_API void reset()
stops owning T-instance
MRMESH_API const T & getOrCreate(const std::function< T()> &creator)
std::shared_ptr< const T > getPtr()
returns the currently owned instance
Definition MRSharedThreadSafeOwner.h:30