30 T *
get() {
return obj_.get(); }
39 mutable std::mutex mutex_;
40 std::unique_ptr<T> obj_;
42 std::shared_ptr<TbbTaskArenaAndGroup> construction_;
#define MRMESH_API
Definition MRMeshFwd.h:80
size_t heapBytes() const
returns the amount of memory this object occupies on heap
T & getOrCreate(const std::function< T()> &creator)
returns existing owned object or creates new one using creator function
T * get()
returns existing owned object and does not create new one
Definition MRUniqueThreadSafeOwner.h:30
UniqueThreadSafeOwner & operator=(const UniqueThreadSafeOwner &)
void update(const std::function< void(T &)> &updater)
calls given updater for the owned object (if any)
UniqueThreadSafeOwner(UniqueThreadSafeOwner &&b) noexcept
void reset()
deletes owned object
UniqueThreadSafeOwner(const UniqueThreadSafeOwner &)
only for bindings generation
Definition MRCameraOrientationPlugin.h:8