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

Go to the source code of this file.

Typedefs

typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float
 

Functions

MRC_API bool MR_reportProgress_2 (MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb, float v)
 
MRC_API bool MR_reportProgress_4 (MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb, float v, MR_uint64_t counter, int32_t divider)
 
MRC_API MR_std_function_bool_from_floatMR_subprogress_float (MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb, float from, float to)
 
MRC_API MR_std_function_bool_from_floatMR_subprogress_uint64_t (MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb, MR_uint64_t index, MR_uint64_t count)
 

Typedef Documentation

◆ MR_std_function_bool_from_float

Function Documentation

◆ MR_reportProgress_2()

MRC_API bool MR_reportProgress_2 ( MR_PassBy cb_pass_by,
MR_std_function_bool_from_float * cb,
float v )

safely invokes

Parameters
cbwith given value; just returning true for empty callback Generated from function MR::reportProgress.

◆ MR_reportProgress_4()

MRC_API bool MR_reportProgress_4 ( MR_PassBy cb_pass_by,
MR_std_function_bool_from_float * cb,
float v,
MR_uint64_t counter,
int32_t divider )

safely invokes

Parameters
cbwith given value if
counteris divisible by
divider(preferably a power of 2); just returning true for empty callback Generated from function MR::reportProgress.

◆ MR_subprogress_float()

MRC_API MR_std_function_bool_from_float * MR_subprogress_float ( MR_PassBy cb_pass_by,
MR_std_function_bool_from_float * cb,
float from,
float to )

returns a callback that maps [0,1] linearly into [from,to] in the call to

Parameters
cb(which can be empty) Generated from function MR::subprogress. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_bool_from_float_Destroy() to free it when you're done using it.

◆ MR_subprogress_uint64_t()

MRC_API MR_std_function_bool_from_float * MR_subprogress_uint64_t ( MR_PassBy cb_pass_by,
MR_std_function_bool_from_float * cb,
MR_uint64_t index,
MR_uint64_t count )

returns a callback that maps [0,1] linearly into [(index+0)/count,(index+1)/count] in the call to

Parameters
cb(which can be empty) Generated from function MR::subprogress. Never returns null. Returns an instance allocated on the heap! Must call MR_std_function_bool_from_float_Destroy() to free it when you're done using it.