MeshLib C Docs
Loading...
Searching...
No Matches
MRHistoryAction.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_pair_bool_int MR_std_pair_bool_int
typedef enum MR_HistoryAction_Type MR_HistoryAction_Type

Enumerations

enum  MR_HistoryAction_Type { MR_HistoryAction_Type_Undo = 0 , MR_HistoryAction_Type_Redo = 1 }

Functions

MRC_API void MR_HistoryAction_Destroy (const MR_HistoryAction *_this)
 Destroys a heap-allocated instance of MR_HistoryAction. Does nothing if the pointer is null.
MRC_API void MR_HistoryAction_DestroyArray (const MR_HistoryAction *_this)
 Destroys a heap-allocated array of MR_HistoryAction. Does nothing if the pointer is null.
MRC_API MR_std_stringMR_HistoryAction_name (const MR_HistoryAction *_this)
MRC_API void MR_HistoryAction_action (MR_HistoryAction *_this, MR_HistoryAction_Type actionType)
MRC_API MR_uint64_t MR_HistoryAction_heapBytes (const MR_HistoryAction *_this)
MRC_API const MR_HistoryActionMR_HistoryAction_OffsetPtr (const MR_HistoryAction *ptr, ptrdiff_t i)
MRC_API MR_HistoryActionMR_HistoryAction_OffsetMutablePtr (MR_HistoryAction *ptr, ptrdiff_t i)
MRC_API MR_std_pair_bool_intMR_filterHistoryActionsVector (MR_std_vector_std_shared_ptr_MR_HistoryAction *historyVector, MR_PassBy filteringCondition_pass_by, MR_std_function_bool_from_const_std_shared_ptr_MR_HistoryAction_ref *filteringCondition, const MR_uint64_t *firstRedoIndex, const bool *deepFiltering)
 Remove actions from history actions vector that match the condition.

Typedef Documentation

◆ MR_HistoryAction_Type

◆ MR_std_pair_bool_int

Stores two objects: bool and bool. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

Enumeration Type Documentation

◆ MR_HistoryAction_Type

Enumerator
MR_HistoryAction_Type_Undo 
MR_HistoryAction_Type_Redo 

Function Documentation

◆ MR_filterHistoryActionsVector()

MRC_API MR_std_pair_bool_int * MR_filterHistoryActionsVector ( MR_std_vector_std_shared_ptr_MR_HistoryAction * historyVector,
MR_PassBy filteringCondition_pass_by,
MR_std_function_bool_from_const_std_shared_ptr_MR_HistoryAction_ref * filteringCondition,
const MR_uint64_t * firstRedoIndex,
const bool * deepFiltering )

Remove actions from history actions vector that match the condition.

Parameters
firstRedoIndex- set redo index for calculate how many actions removed before it
deepFiltering- filter actions into combined actions
Returns
pair (anything removed, how many removed before firstRedoIndex) Generated from function MR::filterHistoryActionsVector. Parameter historyVector can not be null. It is a single object. Parameter firstRedoIndex has a default argument: 0, pass a null pointer to use it. Parameter deepFiltering has a default argument: true, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_pair_bool_int_Destroy() to free it when you're done using it.

◆ MR_HistoryAction_action()

MRC_API void MR_HistoryAction_action ( MR_HistoryAction * _this,
MR_HistoryAction_Type actionType )

This function is called on history action (undo, redo, etc.) Generated from method MR::HistoryAction::action. Parameter _this can not be null. It is a single object.

◆ MR_HistoryAction_Destroy()

MRC_API void MR_HistoryAction_Destroy ( const MR_HistoryAction * _this)

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

◆ MR_HistoryAction_DestroyArray()

MRC_API void MR_HistoryAction_DestroyArray ( const MR_HistoryAction * _this)

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

◆ MR_HistoryAction_heapBytes()

MRC_API MR_uint64_t MR_HistoryAction_heapBytes ( const MR_HistoryAction * _this)

returns the amount of memory this object occupies on heap Generated from method MR::HistoryAction::heapBytes. Parameter _this can not be null. It is a single object.

◆ MR_HistoryAction_name()

MRC_API MR_std_string * MR_HistoryAction_name ( const MR_HistoryAction * _this)

Generated from method MR::HistoryAction::name. Parameter _this can not be null. It is a single object. 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_HistoryAction_OffsetMutablePtr()

MRC_API MR_HistoryAction * MR_HistoryAction_OffsetMutablePtr ( MR_HistoryAction * 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. The reference to the parameter ptr might be preserved in the return value.

◆ MR_HistoryAction_OffsetPtr()

MRC_API const MR_HistoryAction * MR_HistoryAction_OffsetPtr ( const MR_HistoryAction * 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. The reference to the parameter ptr might be preserved in the return value.