3#include <NDEVR/DesignCommand.h>
4#include <NDEVR/TranslatedString.h>
33 bool canUndo()
const {
return m_undo_commands.size() > 0; }
34 bool canRedo()
const {
return m_undone_commands.size() > 0; }
53#if NDEVR_SUPPORTS_THREADING
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:59
Stores logic for performing, undoing, or redoing DesignCommands.
Definition DesignCommandManager.h:14
bool hasPendingCommands() const
const DynamicPointer< DesignCommand > & lastPendingCommand() const
Buffer< UUID > m_thread_pending_commands
Definition DesignCommandManager.h:54
bool canRedo() const
Definition DesignCommandManager.h:34
Buffer< UUID > m_pending_commands
Definition DesignCommandManager.h:52
DesignCommandManager(DesignObjectLookup *lookup, ProgressInfo *log)
Resource< UUID > command_id
Definition DesignCommandManager.h:43
DesignObjectLookup * m_lookup
Definition DesignCommandManager.h:58
Resource< TranslatedString > command_hint
Definition DesignCommandManager.h:45
Resource< bool > command_lock
Definition DesignCommandManager.h:47
Thread * m_command_thread
Definition DesignCommandManager.h:55
const Buffer< UUID > & undoneCommands() const
Definition DesignCommandManager.h:27
Buffer< UUID > m_undo_commands
Definition DesignCommandManager.h:50
virtual void runCommand(const DynamicPointer< DesignCommand > &command)
bool canUndo() const
Definition DesignCommandManager.h:33
void executePendingCommands()
ProgressInfo * m_log
Definition DesignCommandManager.h:57
virtual ~DesignCommandManager()
virtual void undoCommand(UUID command)
Resource< TranslatedString > command_name
Definition DesignCommandManager.h:44
const DynamicPointer< DesignCommand > & getCommand(UUID command_id) const
virtual void postCommand(const DynamicPointer< DesignCommand > &command)
Buffer< UUID > m_undone_commands
Definition DesignCommandManager.h:51
virtual void executeCommand(DynamicPointer< DesignCommand > command)
Dictionary< UUID, DynamicPointer< DesignCommand > > m_commands
Definition DesignCommandManager.h:49
virtual void finishCommand(const DynamicPointer< DesignCommand > &command)
A core class where all Design Objects including models, materials, and geometries are stored.
Definition DesignObjectLookup.h:65
A hash-based key-value store, useful for quick associative lookups.
Definition Dictionary.h:59
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:319
A light-weight base class for Log that allows processes to update, without the need for.
Definition ProgressInfo.hpp:48
Used to lock a particular variable for reading. Any number of readers can be created when no write lo...
Definition RWLock.h:91
A core part of the engine, stores variables that can be listened to with ResourceListener.
Definition Toggle.h:41
A thread is a single sequence stream within the software.
Definition Thread.h:66
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:62
Used to lock a particular variable for writing. Only one write lock can be created when no read locks...
Definition RWLock.h:115