MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::ChangeMeshDataAction Class Reference

Undo action for ObjectMeshData change. More...

#include <MRChangeMeshDataAction.h>

+ Inheritance diagram for MR::ChangeMeshDataAction:

Public Types

using Obj = ObjectMesh
 
- Public Types inherited from MR::HistoryAction
enum class  Type { Undo , Redo }
 

Public Member Functions

 ChangeMeshDataAction (std::string name, const std::shared_ptr< ObjectMesh > &obj)
 use this constructor to remember object's data before making any changes in it
 
 ChangeMeshDataAction (std::string name, const std::shared_ptr< ObjectMesh > &obj, ObjectMeshData &&newData)
 use this constructor to remember object's data and immediately set new data
 
virtual std::string name () const override
 
virtual void action (HistoryAction::Type) override
 This function is called on history action (undo, redo, etc.)
 
virtual size_t heapBytes () const override
 returns the amount of memory this object occupies on heap
 
- Public Member Functions inherited from MR::HistoryAction
virtual ~HistoryAction ()=default
 

Static Public Member Functions

static void setObjectDirty (const std::shared_ptr< ObjectMesh > &obj)
 

Detailed Description

Undo action for ObjectMeshData change.

Member Typedef Documentation

◆ Obj

Constructor & Destructor Documentation

◆ ChangeMeshDataAction() [1/2]

MR::ChangeMeshDataAction::ChangeMeshDataAction ( std::string name,
const std::shared_ptr< ObjectMesh > & obj )
inline

use this constructor to remember object's data before making any changes in it

◆ ChangeMeshDataAction() [2/2]

MR::ChangeMeshDataAction::ChangeMeshDataAction ( std::string name,
const std::shared_ptr< ObjectMesh > & obj,
ObjectMeshData && newData )
inline

use this constructor to remember object's data and immediately set new data

Member Function Documentation

◆ action()

virtual void MR::ChangeMeshDataAction::action ( HistoryAction::Type actionType)
inlineoverridevirtual

This function is called on history action (undo, redo, etc.)

Implements MR::HistoryAction.

◆ heapBytes()

virtual size_t MR::ChangeMeshDataAction::heapBytes ( ) const
inlinenodiscardoverridevirtual

returns the amount of memory this object occupies on heap

Implements MR::HistoryAction.

◆ name()

virtual std::string MR::ChangeMeshDataAction::name ( ) const
inlineoverridevirtual

Implements MR::HistoryAction.

◆ setObjectDirty()

static void MR::ChangeMeshDataAction::setObjectDirty ( const std::shared_ptr< ObjectMesh > & obj)
inlinestatic

The documentation for this class was generated from the following file: