MeshLib C Docs
Loading...
Searching...
No Matches
MRObjectFactory.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_std_shared_ptr_MR_Object MR_std_shared_ptr_MR_Object
 
typedef struct MR_ObjectFactoryBase MR_ObjectFactoryBase
 

Functions

MRC_API MR_std_shared_ptr_MR_ObjectMR_createObject (const char *className, const char *className_end)
 
MRC_API MR_ObjectFactoryBaseMR_ObjectFactoryBase_ConstructFromAnother (MR_PassBy _other_pass_by, MR_ObjectFactoryBase *_other)
 
MRC_API const MR_ObjectFactoryBaseMR_ObjectFactoryBase_OffsetPtr (const MR_ObjectFactoryBase *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_ObjectFactoryBaseMR_ObjectFactoryBase_OffsetMutablePtr (MR_ObjectFactoryBase *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 void MR_ObjectFactoryBase_Destroy (const MR_ObjectFactoryBase *_this)
 Destroys a heap-allocated instance of MR_ObjectFactoryBase. Does nothing if the pointer is null.
 
MRC_API void MR_ObjectFactoryBase_DestroyArray (const MR_ObjectFactoryBase *_this)
 Destroys a heap-allocated array of MR_ObjectFactoryBase. Does nothing if the pointer is null.
 
MRC_API MR_ObjectFactoryBaseMR_ObjectFactoryBase_AssignFromAnother (MR_ObjectFactoryBase *_this, MR_PassBy _other_pass_by, MR_ObjectFactoryBase *_other)
 

Typedef Documentation

◆ MR_ObjectFactoryBase

Generated from class MR::ObjectFactoryBase. Supported MR_PassBy modes: MR_PassBy_Copy (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_std_shared_ptr_MR_Object

Function Documentation

◆ MR_createObject()

MRC_API MR_std_shared_ptr_MR_Object * MR_createObject ( const char * className,
const char * className_end )

the function to create new object instance by registered class name Generated from function MR::createObject. Parameter className can not be null. If className_end is null, then className is assumed to be null-terminated. Never returns null. Returns an instance allocated on the heap! Must call MR_std_shared_ptr_MR_Object_Destroy() to free it when you're done using it.

◆ MR_ObjectFactoryBase_AssignFromAnother()

MRC_API MR_ObjectFactoryBase * MR_ObjectFactoryBase_AssignFromAnother ( MR_ObjectFactoryBase * _this,
MR_PassBy _other_pass_by,
MR_ObjectFactoryBase * _other )

Generated from method MR::ObjectFactoryBase::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_ObjectFactoryBase_ConstructFromAnother()

MRC_API MR_ObjectFactoryBase * MR_ObjectFactoryBase_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_ObjectFactoryBase * _other )

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

◆ MR_ObjectFactoryBase_Destroy()

MRC_API void MR_ObjectFactoryBase_Destroy ( const MR_ObjectFactoryBase * _this)

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

◆ MR_ObjectFactoryBase_DestroyArray()

MRC_API void MR_ObjectFactoryBase_DestroyArray ( const MR_ObjectFactoryBase * _this)

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

◆ MR_ObjectFactoryBase_OffsetMutablePtr()

MRC_API MR_ObjectFactoryBase * MR_ObjectFactoryBase_OffsetMutablePtr ( MR_ObjectFactoryBase * 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_ObjectFactoryBase_OffsetPtr()

MRC_API const MR_ObjectFactoryBase * MR_ObjectFactoryBase_OffsetPtr ( const MR_ObjectFactoryBase * 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.