API Documentation
Loading...
Searching...
No Matches
DesignCommandManager Class Reference

Stores logic for performing, undoing, or redoing DesignCommands. More...

#include <DesignCommandManager.h>

Collaboration diagram for DesignCommandManager:
[legend]

Public Member Functions

bool canRedo () const
 
bool canUndo () const
 
void clear ()
 
WLock commandLock ()
 
RLock commandReadLock ()
 
 DesignCommandManager (DesignObjectLookup *lookup, ProgressInfo *log)
 
virtual void executeCommand (DynamicPointer< DesignCommand > command)
 
void executePendingCommands ()
 
virtual void finishCommand (const DynamicPointer< DesignCommand > &command)
 
const DynamicPointer< DesignCommand > & getCommand (UUID command_id) const
 
bool hasCommand (UUID id)
 
bool hasPendingCommands () const
 
const DynamicPointer< DesignCommand > & lastPendingCommand () const
 
virtual void postCommand (const DynamicPointer< DesignCommand > &command)
 
Buffer< UUIDredo ()
 
virtual void runCommand (const DynamicPointer< DesignCommand > &command)
 
WLock tryCommandLock ()
 
Buffer< UUIDundo ()
 
virtual void undoCommand (UUID command)
 
const Buffer< UUID > & undoneCommands () const
 
virtual ~DesignCommandManager ()
 

Public Attributes

Resource< TranslatedStringcommand_hint
 
Resource< UUIDcommand_id
 
Resource< bool > command_lock
 
Resource< TranslatedStringcommand_name
 

Protected Attributes

Threadm_command_thread
 
Dictionary< UUID, DynamicPointer< DesignCommand > > m_commands
 
ProgressInfom_log
 
DesignObjectLookupm_lookup
 
Buffer< UUIDm_pending_commands
 
Buffer< UUIDm_thread_pending_commands
 
Buffer< UUIDm_undo_commands
 
Buffer< UUIDm_undone_commands
 

Detailed Description

Stores logic for performing, undoing, or redoing DesignCommands.


Constructor & Destructor Documentation

◆ DesignCommandManager()

◆ ~DesignCommandManager()

virtual ~DesignCommandManager ( )
virtual

Member Function Documentation

◆ canRedo()

bool canRedo ( ) const
inline

◆ canUndo()

bool canUndo ( ) const
inline

◆ clear()

void clear ( )

◆ commandLock()

WLock commandLock ( )

◆ commandReadLock()

RLock commandReadLock ( )

◆ executeCommand()

virtual void executeCommand ( DynamicPointer< DesignCommand > command)
virtual

◆ executePendingCommands()

void executePendingCommands ( )

◆ finishCommand()

virtual void finishCommand ( const DynamicPointer< DesignCommand > & command)
virtual

◆ getCommand()

const DynamicPointer< DesignCommand > & getCommand ( UUID command_id) const

◆ hasCommand()

bool hasCommand ( UUID id)

◆ hasPendingCommands()

bool hasPendingCommands ( ) const

◆ lastPendingCommand()

const DynamicPointer< DesignCommand > & lastPendingCommand ( ) const

◆ postCommand()

virtual void postCommand ( const DynamicPointer< DesignCommand > & command)
virtual

◆ redo()

Buffer< UUID > redo ( )

◆ runCommand()

virtual void runCommand ( const DynamicPointer< DesignCommand > & command)
virtual

◆ tryCommandLock()

WLock tryCommandLock ( )

◆ undo()

Buffer< UUID > undo ( )

◆ undoCommand()

virtual void undoCommand ( UUID command)
virtual

◆ undoneCommands()

const Buffer< UUID > & undoneCommands ( ) const
inline

Member Data Documentation

◆ command_hint

Resource<TranslatedString> command_hint

◆ command_id

Resource<UUID> command_id

◆ command_lock

Resource<bool> command_lock

◆ command_name

Resource<TranslatedString> command_name

◆ m_command_thread

Thread* m_command_thread
protected

◆ m_commands

Dictionary<UUID, DynamicPointer<DesignCommand> > m_commands
protected

◆ m_log

ProgressInfo* m_log
protected

◆ m_lookup

DesignObjectLookup* m_lookup
protected

◆ m_pending_commands

Buffer<UUID> m_pending_commands
protected

◆ m_thread_pending_commands

Buffer<UUID> m_thread_pending_commands
protected

◆ m_undo_commands

Buffer<UUID> m_undo_commands
protected

◆ m_undone_commands

Buffer<UUID> m_undone_commands
protected

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