MeshLib C Docs
Loading...
Searching...
No Matches
MRUniqueThreadSafeOwner.h File Reference
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stddef.h>

Go to the source code of this file.

Typedefs

typedef struct MR_AABBTree MR_AABBTree
 
typedef struct MR_AABBTreePoints MR_AABBTreePoints
 
typedef struct MR_std_function_MR_AABBTree MR_std_function_MR_AABBTree
 
typedef struct MR_std_function_MR_AABBTreePoints MR_std_function_MR_AABBTreePoints
 
typedef struct MR_std_function_void_from_MR_AABBTreePoints_ref MR_std_function_void_from_MR_AABBTreePoints_ref
 
typedef struct MR_std_function_void_from_MR_AABBTree_ref MR_std_function_void_from_MR_AABBTree_ref
 
typedef struct MR_UniqueThreadSafeOwner_MR_AABBTree MR_UniqueThreadSafeOwner_MR_AABBTree
 
typedef struct MR_UniqueThreadSafeOwner_MR_AABBTreePoints MR_UniqueThreadSafeOwner_MR_AABBTreePoints
 

Functions

MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreeMR_UniqueThreadSafeOwner_MR_AABBTree_DefaultConstruct (void)
 
MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreeMR_UniqueThreadSafeOwner_MR_AABBTree_DefaultConstructArray (size_t num_elems)
 
MRC_API const MR_UniqueThreadSafeOwner_MR_AABBTreeMR_UniqueThreadSafeOwner_MR_AABBTree_OffsetPtr (const MR_UniqueThreadSafeOwner_MR_AABBTree *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreeMR_UniqueThreadSafeOwner_MR_AABBTree_OffsetMutablePtr (MR_UniqueThreadSafeOwner_MR_AABBTree *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreeMR_UniqueThreadSafeOwner_MR_AABBTree_ConstructFromAnother (MR_PassBy b_pass_by, MR_UniqueThreadSafeOwner_MR_AABBTree *b)
 
MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTree_Destroy (const MR_UniqueThreadSafeOwner_MR_AABBTree *_this)
 Destroys a heap-allocated instance of MR_UniqueThreadSafeOwner_MR_AABBTree. Does nothing if the pointer is null.
 
MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTree_DestroyArray (const MR_UniqueThreadSafeOwner_MR_AABBTree *_this)
 Destroys a heap-allocated array of MR_UniqueThreadSafeOwner_MR_AABBTree. Does nothing if the pointer is null.
 
MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreeMR_UniqueThreadSafeOwner_MR_AABBTree_AssignFromAnother (MR_UniqueThreadSafeOwner_MR_AABBTree *_this, MR_PassBy b_pass_by, MR_UniqueThreadSafeOwner_MR_AABBTree *b)
 
MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTree_reset (MR_UniqueThreadSafeOwner_MR_AABBTree *_this)
 
MRC_API MR_AABBTreeMR_UniqueThreadSafeOwner_MR_AABBTree_get (MR_UniqueThreadSafeOwner_MR_AABBTree *_this)
 
MRC_API MR_AABBTreeMR_UniqueThreadSafeOwner_MR_AABBTree_getOrCreate (MR_UniqueThreadSafeOwner_MR_AABBTree *_this, const MR_std_function_MR_AABBTree *creator)
 
MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTree_update (MR_UniqueThreadSafeOwner_MR_AABBTree *_this, const MR_std_function_void_from_MR_AABBTree_ref *updater)
 
MRC_API MR_uint64_t MR_UniqueThreadSafeOwner_MR_AABBTree_heapBytes (const MR_UniqueThreadSafeOwner_MR_AABBTree *_this)
 
MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreePointsMR_UniqueThreadSafeOwner_MR_AABBTreePoints_DefaultConstruct (void)
 
MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreePointsMR_UniqueThreadSafeOwner_MR_AABBTreePoints_DefaultConstructArray (size_t num_elems)
 
MRC_API const MR_UniqueThreadSafeOwner_MR_AABBTreePointsMR_UniqueThreadSafeOwner_MR_AABBTreePoints_OffsetPtr (const MR_UniqueThreadSafeOwner_MR_AABBTreePoints *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreePointsMR_UniqueThreadSafeOwner_MR_AABBTreePoints_OffsetMutablePtr (MR_UniqueThreadSafeOwner_MR_AABBTreePoints *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreePointsMR_UniqueThreadSafeOwner_MR_AABBTreePoints_ConstructFromAnother (MR_PassBy b_pass_by, MR_UniqueThreadSafeOwner_MR_AABBTreePoints *b)
 
MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTreePoints_Destroy (const MR_UniqueThreadSafeOwner_MR_AABBTreePoints *_this)
 Destroys a heap-allocated instance of MR_UniqueThreadSafeOwner_MR_AABBTreePoints. Does nothing if the pointer is null.
 
MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTreePoints_DestroyArray (const MR_UniqueThreadSafeOwner_MR_AABBTreePoints *_this)
 Destroys a heap-allocated array of MR_UniqueThreadSafeOwner_MR_AABBTreePoints. Does nothing if the pointer is null.
 
MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreePointsMR_UniqueThreadSafeOwner_MR_AABBTreePoints_AssignFromAnother (MR_UniqueThreadSafeOwner_MR_AABBTreePoints *_this, MR_PassBy b_pass_by, MR_UniqueThreadSafeOwner_MR_AABBTreePoints *b)
 
MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTreePoints_reset (MR_UniqueThreadSafeOwner_MR_AABBTreePoints *_this)
 
MRC_API MR_AABBTreePointsMR_UniqueThreadSafeOwner_MR_AABBTreePoints_get (MR_UniqueThreadSafeOwner_MR_AABBTreePoints *_this)
 
MRC_API MR_AABBTreePointsMR_UniqueThreadSafeOwner_MR_AABBTreePoints_getOrCreate (MR_UniqueThreadSafeOwner_MR_AABBTreePoints *_this, const MR_std_function_MR_AABBTreePoints *creator)
 
MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTreePoints_update (MR_UniqueThreadSafeOwner_MR_AABBTreePoints *_this, const MR_std_function_void_from_MR_AABBTreePoints_ref *updater)
 
MRC_API MR_uint64_t MR_UniqueThreadSafeOwner_MR_AABBTreePoints_heapBytes (const MR_UniqueThreadSafeOwner_MR_AABBTreePoints *_this)
 

Typedef Documentation

◆ MR_AABBTree

typedef struct MR_AABBTree MR_AABBTree

◆ MR_AABBTreePoints

◆ MR_std_function_MR_AABBTree

◆ MR_std_function_MR_AABBTreePoints

◆ MR_std_function_void_from_MR_AABBTree_ref

◆ MR_std_function_void_from_MR_AABBTreePoints_ref

◆ MR_UniqueThreadSafeOwner_MR_AABBTree

This class is base class for unique thread safe owning of some objects, for example AABBTree classes derived from this one should have function like getOrCreate Generated from class MR::UniqueThreadSafeOwner<MR::AABBTree>.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints

This class is base class for unique thread safe owning of some objects, for example AABBTree classes derived from this one should have function like getOrCreate Generated from class MR::UniqueThreadSafeOwner<MR::AABBTreePoints>.

Function Documentation

◆ MR_UniqueThreadSafeOwner_MR_AABBTree_AssignFromAnother()

MRC_API MR_UniqueThreadSafeOwner_MR_AABBTree * MR_UniqueThreadSafeOwner_MR_AABBTree_AssignFromAnother ( MR_UniqueThreadSafeOwner_MR_AABBTree * _this,
MR_PassBy b_pass_by,
MR_UniqueThreadSafeOwner_MR_AABBTree * b )

Generated from a method of class MR::UniqueThreadSafeOwner<MR::AABBTree> named operator=. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniqueThreadSafeOwner_MR_AABBTree_ConstructFromAnother()

MRC_API MR_UniqueThreadSafeOwner_MR_AABBTree * MR_UniqueThreadSafeOwner_MR_AABBTree_ConstructFromAnother ( MR_PassBy b_pass_by,
MR_UniqueThreadSafeOwner_MR_AABBTree * b )

Generated from a constructor of class MR::UniqueThreadSafeOwner<MR::AABBTree>. Never returns null. Returns an instance allocated on the heap! Must call MR_UniqueThreadSafeOwner_MR_AABBTree_Destroy() to free it when you're done using it.

◆ MR_UniqueThreadSafeOwner_MR_AABBTree_DefaultConstruct()

MRC_API MR_UniqueThreadSafeOwner_MR_AABBTree * MR_UniqueThreadSafeOwner_MR_AABBTree_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_UniqueThreadSafeOwner_MR_AABBTree_Destroy() to free it when you're done using it.

◆ MR_UniqueThreadSafeOwner_MR_AABBTree_DefaultConstructArray()

MRC_API MR_UniqueThreadSafeOwner_MR_AABBTree * MR_UniqueThreadSafeOwner_MR_AABBTree_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_UniqueThreadSafeOwner_MR_AABBTree_DestroyArray(). Use MR_UniqueThreadSafeOwner_MR_AABBTree_OffsetMutablePtr() and MR_UniqueThreadSafeOwner_MR_AABBTree_OffsetPtr() to access the array elements.

◆ MR_UniqueThreadSafeOwner_MR_AABBTree_Destroy()

MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTree_Destroy ( const MR_UniqueThreadSafeOwner_MR_AABBTree * _this)

Destroys a heap-allocated instance of MR_UniqueThreadSafeOwner_MR_AABBTree. Does nothing if the pointer is null.

◆ MR_UniqueThreadSafeOwner_MR_AABBTree_DestroyArray()

MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTree_DestroyArray ( const MR_UniqueThreadSafeOwner_MR_AABBTree * _this)

Destroys a heap-allocated array of MR_UniqueThreadSafeOwner_MR_AABBTree. Does nothing if the pointer is null.

◆ MR_UniqueThreadSafeOwner_MR_AABBTree_get()

MRC_API MR_AABBTree * MR_UniqueThreadSafeOwner_MR_AABBTree_get ( MR_UniqueThreadSafeOwner_MR_AABBTree * _this)

returns existing owned object and does not create new one Generated from a method of class MR::UniqueThreadSafeOwner<MR::AABBTree> named get. Parameter _this can not be null. It is a single object.

◆ MR_UniqueThreadSafeOwner_MR_AABBTree_getOrCreate()

MRC_API MR_AABBTree * MR_UniqueThreadSafeOwner_MR_AABBTree_getOrCreate ( MR_UniqueThreadSafeOwner_MR_AABBTree * _this,
const MR_std_function_MR_AABBTree * creator )

returns existing owned object or creates new one using creator function Generated from a method of class MR::UniqueThreadSafeOwner<MR::AABBTree> named getOrCreate. Parameter _this can not be null. It is a single object. Parameter creator can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniqueThreadSafeOwner_MR_AABBTree_heapBytes()

MRC_API MR_uint64_t MR_UniqueThreadSafeOwner_MR_AABBTree_heapBytes ( const MR_UniqueThreadSafeOwner_MR_AABBTree * _this)

returns the amount of memory this object occupies on heap Generated from a method of class MR::UniqueThreadSafeOwner<MR::AABBTree> named heapBytes. Parameter _this can not be null. It is a single object.

◆ MR_UniqueThreadSafeOwner_MR_AABBTree_OffsetMutablePtr()

MRC_API MR_UniqueThreadSafeOwner_MR_AABBTree * MR_UniqueThreadSafeOwner_MR_AABBTree_OffsetMutablePtr ( MR_UniqueThreadSafeOwner_MR_AABBTree * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_UniqueThreadSafeOwner_MR_AABBTree_OffsetPtr()

MRC_API const MR_UniqueThreadSafeOwner_MR_AABBTree * MR_UniqueThreadSafeOwner_MR_AABBTree_OffsetPtr ( const MR_UniqueThreadSafeOwner_MR_AABBTree * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_UniqueThreadSafeOwner_MR_AABBTree_reset()

MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTree_reset ( MR_UniqueThreadSafeOwner_MR_AABBTree * _this)

deletes owned object Generated from a method of class MR::UniqueThreadSafeOwner<MR::AABBTree> named reset. Parameter _this can not be null. It is a single object.

◆ MR_UniqueThreadSafeOwner_MR_AABBTree_update()

MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTree_update ( MR_UniqueThreadSafeOwner_MR_AABBTree * _this,
const MR_std_function_void_from_MR_AABBTree_ref * updater )

calls given updater for the owned object (if any) Generated from a method of class MR::UniqueThreadSafeOwner<MR::AABBTree> named update. Parameter _this can not be null. It is a single object. Parameter updater can not be null. It is a single object.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints_AssignFromAnother()

MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreePoints * MR_UniqueThreadSafeOwner_MR_AABBTreePoints_AssignFromAnother ( MR_UniqueThreadSafeOwner_MR_AABBTreePoints * _this,
MR_PassBy b_pass_by,
MR_UniqueThreadSafeOwner_MR_AABBTreePoints * b )

Generated from a method of class MR::UniqueThreadSafeOwner<MR::AABBTreePoints> named operator=. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints_ConstructFromAnother()

MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreePoints * MR_UniqueThreadSafeOwner_MR_AABBTreePoints_ConstructFromAnother ( MR_PassBy b_pass_by,
MR_UniqueThreadSafeOwner_MR_AABBTreePoints * b )

Generated from a constructor of class MR::UniqueThreadSafeOwner<MR::AABBTreePoints>. Never returns null. Returns an instance allocated on the heap! Must call MR_UniqueThreadSafeOwner_MR_AABBTreePoints_Destroy() to free it when you're done using it.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints_DefaultConstruct()

MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreePoints * MR_UniqueThreadSafeOwner_MR_AABBTreePoints_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_UniqueThreadSafeOwner_MR_AABBTreePoints_Destroy() to free it when you're done using it.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints_DefaultConstructArray()

MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreePoints * MR_UniqueThreadSafeOwner_MR_AABBTreePoints_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_UniqueThreadSafeOwner_MR_AABBTreePoints_DestroyArray(). Use MR_UniqueThreadSafeOwner_MR_AABBTreePoints_OffsetMutablePtr() and MR_UniqueThreadSafeOwner_MR_AABBTreePoints_OffsetPtr() to access the array elements.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints_Destroy()

MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTreePoints_Destroy ( const MR_UniqueThreadSafeOwner_MR_AABBTreePoints * _this)

Destroys a heap-allocated instance of MR_UniqueThreadSafeOwner_MR_AABBTreePoints. Does nothing if the pointer is null.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints_DestroyArray()

MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTreePoints_DestroyArray ( const MR_UniqueThreadSafeOwner_MR_AABBTreePoints * _this)

Destroys a heap-allocated array of MR_UniqueThreadSafeOwner_MR_AABBTreePoints. Does nothing if the pointer is null.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints_get()

MRC_API MR_AABBTreePoints * MR_UniqueThreadSafeOwner_MR_AABBTreePoints_get ( MR_UniqueThreadSafeOwner_MR_AABBTreePoints * _this)

returns existing owned object and does not create new one Generated from a method of class MR::UniqueThreadSafeOwner<MR::AABBTreePoints> named get. Parameter _this can not be null. It is a single object.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints_getOrCreate()

MRC_API MR_AABBTreePoints * MR_UniqueThreadSafeOwner_MR_AABBTreePoints_getOrCreate ( MR_UniqueThreadSafeOwner_MR_AABBTreePoints * _this,
const MR_std_function_MR_AABBTreePoints * creator )

returns existing owned object or creates new one using creator function Generated from a method of class MR::UniqueThreadSafeOwner<MR::AABBTreePoints> named getOrCreate. Parameter _this can not be null. It is a single object. Parameter creator can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints_heapBytes()

MRC_API MR_uint64_t MR_UniqueThreadSafeOwner_MR_AABBTreePoints_heapBytes ( const MR_UniqueThreadSafeOwner_MR_AABBTreePoints * _this)

returns the amount of memory this object occupies on heap Generated from a method of class MR::UniqueThreadSafeOwner<MR::AABBTreePoints> named heapBytes. Parameter _this can not be null. It is a single object.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints_OffsetMutablePtr()

MRC_API MR_UniqueThreadSafeOwner_MR_AABBTreePoints * MR_UniqueThreadSafeOwner_MR_AABBTreePoints_OffsetMutablePtr ( MR_UniqueThreadSafeOwner_MR_AABBTreePoints * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints_OffsetPtr()

MRC_API const MR_UniqueThreadSafeOwner_MR_AABBTreePoints * MR_UniqueThreadSafeOwner_MR_AABBTreePoints_OffsetPtr ( const MR_UniqueThreadSafeOwner_MR_AABBTreePoints * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints_reset()

MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTreePoints_reset ( MR_UniqueThreadSafeOwner_MR_AABBTreePoints * _this)

deletes owned object Generated from a method of class MR::UniqueThreadSafeOwner<MR::AABBTreePoints> named reset. Parameter _this can not be null. It is a single object.

◆ MR_UniqueThreadSafeOwner_MR_AABBTreePoints_update()

MRC_API void MR_UniqueThreadSafeOwner_MR_AABBTreePoints_update ( MR_UniqueThreadSafeOwner_MR_AABBTreePoints * _this,
const MR_std_function_void_from_MR_AABBTreePoints_ref * updater )

calls given updater for the owned object (if any) Generated from a method of class MR::UniqueThreadSafeOwner<MR::AABBTreePoints> named update. Parameter _this can not be null. It is a single object. Parameter updater can not be null. It is a single object.