MeshLib C Docs
Loading...
Searching...
No Matches
MRMutexOwner.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_MutexOwner MR_MutexOwner
 

Functions

MRC_API MR_MutexOwnerMR_MutexOwner_DefaultConstruct (void)
 
MRC_API MR_MutexOwnerMR_MutexOwner_DefaultConstructArray (size_t num_elems)
 
MRC_API const MR_MutexOwnerMR_MutexOwner_OffsetPtr (const MR_MutexOwner *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_MutexOwnerMR_MutexOwner_OffsetMutablePtr (MR_MutexOwner *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_MutexOwnerMR_MutexOwner_ConstructFromAnother (MR_PassBy _other_pass_by, MR_MutexOwner *_other)
 
MRC_API void MR_MutexOwner_Destroy (const MR_MutexOwner *_this)
 Destroys a heap-allocated instance of MR_MutexOwner. Does nothing if the pointer is null.
 
MRC_API void MR_MutexOwner_DestroyArray (const MR_MutexOwner *_this)
 Destroys a heap-allocated array of MR_MutexOwner. Does nothing if the pointer is null.
 
MRC_API MR_MutexOwnerMR_MutexOwner_AssignFromAnother (MR_MutexOwner *_this, MR_PassBy _other_pass_by, MR_MutexOwner *_other)
 

Typedef Documentation

◆ MR_MutexOwner

typedef struct MR_MutexOwner MR_MutexOwner

This class exists to provide copy and move constructors and assignment operations for std::mutex which actually does nothing Generated from class MR::MutexOwner.

Function Documentation

◆ MR_MutexOwner_AssignFromAnother()

MRC_API MR_MutexOwner * MR_MutexOwner_AssignFromAnother ( MR_MutexOwner * _this,
MR_PassBy _other_pass_by,
MR_MutexOwner * _other )

Generated from a method of class MR::MutexOwner 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_MutexOwner_ConstructFromAnother()

MRC_API MR_MutexOwner * MR_MutexOwner_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_MutexOwner * _other )

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

◆ MR_MutexOwner_DefaultConstruct()

MRC_API MR_MutexOwner * MR_MutexOwner_DefaultConstruct ( void )

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

◆ MR_MutexOwner_DefaultConstructArray()

MRC_API MR_MutexOwner * MR_MutexOwner_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_MutexOwner_DestroyArray(). Use MR_MutexOwner_OffsetMutablePtr() and MR_MutexOwner_OffsetPtr() to access the array elements.

◆ MR_MutexOwner_Destroy()

MRC_API void MR_MutexOwner_Destroy ( const MR_MutexOwner * _this)

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

◆ MR_MutexOwner_DestroyArray()

MRC_API void MR_MutexOwner_DestroyArray ( const MR_MutexOwner * _this)

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

◆ MR_MutexOwner_OffsetMutablePtr()

MRC_API MR_MutexOwner * MR_MutexOwner_OffsetMutablePtr ( MR_MutexOwner * 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_MutexOwner_OffsetPtr()

MRC_API const MR_MutexOwner * MR_MutexOwner_OffsetPtr ( const MR_MutexOwner * 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.