MeshLib Documentation
Loading...
Searching...
No Matches
MR::ChangeValue< T > Class Template Reference

#include <MRChangeValue.h>

+ Inheritance diagram for MR::ChangeValue< T >:

Public Member Functions

 ChangeValue (const std::string &name, T *currentValue, T oldValue)
 Constructed from original object's pointer and old value.
 
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
 

Additional Inherited Members

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

Detailed Description

template<typename T>
class MR::ChangeValue< T >

This is an action to undo/redo a change in the value of a variable in the case of temporary objects, it is necessary to delete the history. this module should not exist anymore than the object that was passed to it.

Constructor & Destructor Documentation

◆ ChangeValue()

template<typename T >
MR::ChangeValue< T >::ChangeValue ( const std::string & name,
T * currentValue,
T oldValue )
inline

Constructed from original object's pointer and old value.

Member Function Documentation

◆ action()

template<typename T >
virtual void MR::ChangeValue< T >::action ( HistoryAction::Type actionType)
inlineoverridevirtual

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

Implements MR::HistoryAction.

◆ heapBytes()

template<typename T >
virtual size_t MR::ChangeValue< T >::heapBytes ( ) const
inlinenodiscardoverridevirtual

returns the amount of memory this object occupies on heap

Implements MR::HistoryAction.

◆ name()

template<typename T >
virtual std::string MR::ChangeValue< T >::name ( ) const
inlineoverridevirtual

Implements MR::HistoryAction.


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