Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
OldStyleCommand Class Referenceabstract

Abstract base class for command interface. This is the version created by Dan Horgan. It was previously a factory for other command classes. It created a separation between the type of a command and the command itself, which is being removed. These Commands were managed by CommandDirectory. More...

#include <Command.h>

Inheritance diagram for OldStyleCommand:
[legend]
Collaboration diagram for OldStyleCommand:
[legend]

Public Member Functions

 OldStyleCommand (AudacityProject &project)
 
virtual ~OldStyleCommand ()
 
virtual ComponentInterfaceSymbol GetSymbol ()=0
 
virtual CommandSignatureGetSignature ()=0
 
virtual bool SetParameter (const wxString &paramName, const wxVariant &paramValue)
 
virtual bool Apply ()=0
 
virtual bool Apply (const CommandContext &context)=0
 

Public Attributes

AudacityProjectmProject
 

Detailed Description

Abstract base class for command interface. This is the version created by Dan Horgan. It was previously a factory for other command classes. It created a separation between the type of a command and the command itself, which is being removed. These Commands were managed by CommandDirectory.

OldStyleCommand is the key class that allows us to carry a converted (not textual) command from a non-GUI place to the GUI thread. It contains the command AND the context that will be used for its output.

Definition at line 29 of file Command.h.

Constructor & Destructor Documentation

◆ OldStyleCommand()

OldStyleCommand::OldStyleCommand ( AudacityProject project)
inline

Definition at line 34 of file Command.h.

34: mProject{ project } {};
const auto project
AudacityProject & mProject
Definition: Command.h:32

◆ ~OldStyleCommand()

virtual OldStyleCommand::~OldStyleCommand ( )
inlinevirtual

Definition at line 35 of file Command.h.

35{ }

Member Function Documentation

◆ Apply() [1/2]

virtual bool OldStyleCommand::Apply ( )
pure virtual

◆ Apply() [2/2]

virtual bool OldStyleCommand::Apply ( const CommandContext context)
pure virtual

◆ GetSignature()

virtual CommandSignature & OldStyleCommand::GetSignature ( )
pure virtual

◆ GetSymbol()

virtual ComponentInterfaceSymbol OldStyleCommand::GetSymbol ( )
pure virtual

◆ SetParameter()

bool OldStyleCommand::SetParameter ( const wxString &  paramName,
const wxVariant &  paramValue 
)
virtual

Reimplemented in DecoratedCommand, and CommandImplementation.

Definition at line 95 of file Command.cpp.

97{
98 wxASSERT_MSG(false, wxT("Tried to set parameter for command which doesn't support parameters!"));
99 return false;
100}
wxT("CloseDown"))

References wxT().

Here is the call graph for this function:

Member Data Documentation

◆ mProject

AudacityProject& OldStyleCommand::mProject

Definition at line 32 of file Command.h.

Referenced by CommandImplementation::SetParameter().


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