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

Go to the source code of this file.

Typedefs

typedef struct MR_std_filesystem_path MR_std_filesystem_path
 
typedef struct MR_std_string MR_std_string
 
typedef struct MR_SystemMemory MR_SystemMemory
 Generated from class MR::SystemMemory.
 

Functions

MRC_API void MR_SetCurrentThreadName (const char *name)
 Generated from function MR::SetCurrentThreadName.
 
MRC_API MR_std_filesystem_pathMR_getUserConfigDir (void)
 
MRC_API MR_std_filesystem_pathMR_getUserConfigFilePath (void)
 
MRC_API MR_std_filesystem_pathMR_GetTempDirectory (void)
 
MRC_API MR_std_filesystem_pathMR_GetHomeDirectory (void)
 
MRC_API MR_std_stringMR_GetMRVersionString (void)
 
MRC_API void MR_OpenLink (const MR_std_string *url)
 
MRC_API bool MR_OpenDocument (const char *path, const char *path_end)
 
MRC_API MR_std_stringMR_GetCpuId (void)
 
MRC_API MR_std_stringMR_GetDetailedOSName (void)
 
MRC_API MR_std_stringMR_getOSNoSpaces (void)
 
MRC_API void MR_setNewHandlerIfNeeded (void)
 Generated from function MR::setNewHandlerIfNeeded.
 
MRC_API MR_std_stringMR_getCurrentStacktrace (void)
 
MRC_API const MR_uint64_tMR_SystemMemory_Get_physicalTotal (const MR_SystemMemory *_this)
 
MRC_API void MR_SystemMemory_Set_physicalTotal (MR_SystemMemory *_this, MR_uint64_t value)
 
MRC_API MR_uint64_tMR_SystemMemory_GetMutable_physicalTotal (MR_SystemMemory *_this)
 
MRC_API const MR_uint64_tMR_SystemMemory_Get_physicalAvailable (const MR_SystemMemory *_this)
 
MRC_API void MR_SystemMemory_Set_physicalAvailable (MR_SystemMemory *_this, MR_uint64_t value)
 
MRC_API MR_uint64_tMR_SystemMemory_GetMutable_physicalAvailable (MR_SystemMemory *_this)
 
MRC_API MR_SystemMemoryMR_SystemMemory_DefaultConstruct (void)
 
MRC_API MR_SystemMemoryMR_SystemMemory_DefaultConstructArray (size_t num_elems)
 
MRC_API MR_SystemMemoryMR_SystemMemory_ConstructFrom (MR_uint64_t physicalTotal, MR_uint64_t physicalAvailable)
 
MRC_API const MR_SystemMemoryMR_SystemMemory_OffsetPtr (const MR_SystemMemory *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_SystemMemoryMR_SystemMemory_OffsetMutablePtr (MR_SystemMemory *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_SystemMemoryMR_SystemMemory_ConstructFromAnother (const MR_SystemMemory *_other)
 
MRC_API void MR_SystemMemory_Destroy (const MR_SystemMemory *_this)
 Destroys a heap-allocated instance of MR_SystemMemory. Does nothing if the pointer is null.
 
MRC_API void MR_SystemMemory_DestroyArray (const MR_SystemMemory *_this)
 Destroys a heap-allocated array of MR_SystemMemory. Does nothing if the pointer is null.
 
MRC_API MR_SystemMemoryMR_SystemMemory_AssignFromAnother (MR_SystemMemory *_this, const MR_SystemMemory *_other)
 
MRC_API MR_SystemMemoryMR_getSystemMemory (void)
 
MRC_API void MR_setupLoggerByDefault (void)
 

Typedef Documentation

◆ MR_std_filesystem_path

◆ MR_std_string

typedef struct MR_std_string MR_std_string

◆ MR_SystemMemory

Generated from class MR::SystemMemory.

Function Documentation

◆ MR_GetCpuId()

MRC_API MR_std_string * MR_GetCpuId ( void )

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

◆ MR_getCurrentStacktrace()

MRC_API MR_std_string * MR_getCurrentStacktrace ( void )

returns string representation of the current stacktrace Generated from function MR::getCurrentStacktrace. Never returns null. Returns an instance allocated on the heap! Must call MR_std_string_Destroy() to free it when you're done using it.

◆ MR_GetDetailedOSName()

MRC_API MR_std_string * MR_GetDetailedOSName ( void )

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

◆ MR_GetHomeDirectory()

MRC_API MR_std_filesystem_path * MR_GetHomeDirectory ( void )

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

◆ MR_GetMRVersionString()

MRC_API MR_std_string * MR_GetMRVersionString ( void )

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

◆ MR_getOSNoSpaces()

MRC_API MR_std_string * MR_getOSNoSpaces ( void )

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

◆ MR_getSystemMemory()

MRC_API MR_SystemMemory * MR_getSystemMemory ( void )

return information about memory available in the system Generated from function MR::getSystemMemory. Never returns null. Returns an instance allocated on the heap! Must call MR_SystemMemory_Destroy() to free it when you're done using it.

◆ MR_GetTempDirectory()

MRC_API MR_std_filesystem_path * MR_GetTempDirectory ( void )

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

◆ MR_getUserConfigDir()

MRC_API MR_std_filesystem_path * MR_getUserConfigDir ( void )

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

◆ MR_getUserConfigFilePath()

MRC_API MR_std_filesystem_path * MR_getUserConfigFilePath ( void )

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

◆ MR_OpenDocument()

MRC_API bool MR_OpenDocument ( const char * path,
const char * path_end )

Generated from function MR::OpenDocument. Parameter path is a UTF-8 encoded filesystem path.

◆ MR_OpenLink()

MRC_API void MR_OpenLink ( const MR_std_string * url)

Generated from function MR::OpenLink. Parameter url can not be null. It is a single object.

◆ MR_SetCurrentThreadName()

MRC_API void MR_SetCurrentThreadName ( const char * name)

Generated from function MR::SetCurrentThreadName.

◆ MR_setNewHandlerIfNeeded()

MRC_API void MR_setNewHandlerIfNeeded ( void )

Generated from function MR::setNewHandlerIfNeeded.

◆ MR_setupLoggerByDefault()

MRC_API void MR_setupLoggerByDefault ( void )

Setups logger: 1) makes stdout sink 2) makes file sink (MRLog.txt) 3) redirect std streams to logger 4) print stacktrace on crash (not in wasm) log level - trace Generated from function MR::setupLoggerByDefault.

◆ MR_SystemMemory_AssignFromAnother()

MRC_API MR_SystemMemory * MR_SystemMemory_AssignFromAnother ( MR_SystemMemory * _this,
const MR_SystemMemory * _other )

Generated from a method of class MR::SystemMemory named operator=. Parameter _this can not be null. It is a single object. Parameter _other 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_SystemMemory_ConstructFrom()

MRC_API MR_SystemMemory * MR_SystemMemory_ConstructFrom ( MR_uint64_t physicalTotal,
MR_uint64_t physicalAvailable )

Constructs MR::SystemMemory elementwise. Never returns null. Returns an instance allocated on the heap! Must call MR_SystemMemory_Destroy() to free it when you're done using it.

◆ MR_SystemMemory_ConstructFromAnother()

MRC_API MR_SystemMemory * MR_SystemMemory_ConstructFromAnother ( const MR_SystemMemory * _other)

Generated from a constructor of class MR::SystemMemory. Parameter _other can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_SystemMemory_Destroy() to free it when you're done using it.

◆ MR_SystemMemory_DefaultConstruct()

MRC_API MR_SystemMemory * MR_SystemMemory_DefaultConstruct ( void )

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

◆ MR_SystemMemory_DefaultConstructArray()

MRC_API MR_SystemMemory * MR_SystemMemory_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_SystemMemory_DestroyArray(). Use MR_SystemMemory_OffsetMutablePtr() and MR_SystemMemory_OffsetPtr() to access the array elements.

◆ MR_SystemMemory_Destroy()

MRC_API void MR_SystemMemory_Destroy ( const MR_SystemMemory * _this)

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

◆ MR_SystemMemory_DestroyArray()

MRC_API void MR_SystemMemory_DestroyArray ( const MR_SystemMemory * _this)

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

◆ MR_SystemMemory_Get_physicalAvailable()

MRC_API const MR_uint64_t * MR_SystemMemory_Get_physicalAvailable ( const MR_SystemMemory * _this)

available amount of physical memory in the system, in bytes (0 if no info) Returns a pointer to a member variable of class MR::SystemMemory named physicalAvailable. 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_SystemMemory_Get_physicalTotal()

MRC_API const MR_uint64_t * MR_SystemMemory_Get_physicalTotal ( const MR_SystemMemory * _this)

total amount of physical memory in the system, in bytes (0 if no info) Returns a pointer to a member variable of class MR::SystemMemory named physicalTotal. 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_SystemMemory_GetMutable_physicalAvailable()

MRC_API MR_uint64_t * MR_SystemMemory_GetMutable_physicalAvailable ( MR_SystemMemory * _this)

available amount of physical memory in the system, in bytes (0 if no info) Returns a mutable pointer to a member variable of class MR::SystemMemory named physicalAvailable. 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_SystemMemory_GetMutable_physicalTotal()

MRC_API MR_uint64_t * MR_SystemMemory_GetMutable_physicalTotal ( MR_SystemMemory * _this)

total amount of physical memory in the system, in bytes (0 if no info) Returns a mutable pointer to a member variable of class MR::SystemMemory named physicalTotal. 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_SystemMemory_OffsetMutablePtr()

MRC_API MR_SystemMemory * MR_SystemMemory_OffsetMutablePtr ( MR_SystemMemory * 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_SystemMemory_OffsetPtr()

MRC_API const MR_SystemMemory * MR_SystemMemory_OffsetPtr ( const MR_SystemMemory * 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_SystemMemory_Set_physicalAvailable()

MRC_API void MR_SystemMemory_Set_physicalAvailable ( MR_SystemMemory * _this,
MR_uint64_t value )

available amount of physical memory in the system, in bytes (0 if no info) Modifies a member variable of class MR::SystemMemory named physicalAvailable. Parameter _this can not be null. It is a single object.

◆ MR_SystemMemory_Set_physicalTotal()

MRC_API void MR_SystemMemory_Set_physicalTotal ( MR_SystemMemory * _this,
MR_uint64_t value )

total amount of physical memory in the system, in bytes (0 if no info) Modifies a member variable of class MR::SystemMemory named physicalTotal. Parameter _this can not be null. It is a single object.