opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
osc::UndoRedo< T > Class Template Referencefinal

#include <undo_redo.h>

Inheritance diagram for osc::UndoRedo< T >:
[legend]
Collaboration diagram for osc::UndoRedo< T >:
[legend]

Public Member Functions

template<typename... Args>
requires std::constructible_from<T, Args&&...>
 UndoRedo (Args &&... args)
 
const Tscratch () const
 
Tupd_scratch ()
 
const UndoRedoEntry< T > & undo_entry_at (size_t pos) const
 
const UndoRedoEntry< T > & redo_entry_at (size_t pos) const
 
- Public Member Functions inherited from osc::UndoRedoBase
virtual ~UndoRedoBase () noexcept
 
void commit_scratch (std::string_view commit_message)
 
const UndoRedoEntryBasehead () const
 
UID head_id () const
 
void rollback ()
 
size_t num_undo_entries () const
 
const UndoRedoEntryBaseundo_entry_at (size_t pos) const
 
void undo_to (size_t pos)
 
bool can_undo () const
 
void undo ()
 
size_t num_redo_entries () const
 
const UndoRedoEntryBaseredo_entry_at (size_t pos) const
 
bool can_redo () const
 
void redo_to (size_t pos)
 
void redo ()
 

Private Member Functions

UndoRedoEntryBase impl_construct_commit_from_scratch (std::string_view commit_message) final
 
void impl_copy_assign_scratch_from_commit (const UndoRedoEntryBase &commit) final
 

Additional Inherited Members

- Protected Member Functions inherited from osc::UndoRedoBase
 UndoRedoBase (UndoRedoEntryBase initial_commit)
 
 UndoRedoBase (const UndoRedoBase &)
 
 UndoRedoBase (UndoRedoBase &&) noexcept
 
UndoRedoBaseoperator= (const UndoRedoBase &)
 
UndoRedoBaseoperator= (UndoRedoBase &&) noexcept
 

Constructor & Destructor Documentation

◆ UndoRedo()

template<Undoable T>
template<typename... Args>
requires std::constructible_from<T, Args&&...>
osc::UndoRedo< T >::UndoRedo ( Args &&...  args)
inlineexplicit

Member Function Documentation

◆ impl_construct_commit_from_scratch()

template<Undoable T>
UndoRedoEntryBase osc::UndoRedo< T >::impl_construct_commit_from_scratch ( std::string_view  commit_message)
inlinefinalprivatevirtual

Implements osc::UndoRedoBase.

◆ impl_copy_assign_scratch_from_commit()

template<Undoable T>
void osc::UndoRedo< T >::impl_copy_assign_scratch_from_commit ( const UndoRedoEntryBase commit)
inlinefinalprivatevirtual

Implements osc::UndoRedoBase.

◆ redo_entry_at()

template<Undoable T>
const UndoRedoEntry< T > & osc::UndoRedo< T >::redo_entry_at ( size_t  pos) const
inline

◆ scratch()

template<Undoable T>
const T & osc::UndoRedo< T >::scratch ( ) const
inline

◆ undo_entry_at()

template<Undoable T>
const UndoRedoEntry< T > & osc::UndoRedo< T >::undo_entry_at ( size_t  pos) const
inline

◆ upd_scratch()

template<Undoable T>
T & osc::UndoRedo< T >::upd_scratch ( )
inline

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