Audacity 3.2.0
Public Member Functions | Protected Attributes | List of all members
DecoratedCommand Class Reference

DecoratedCommand is a decorator for command. It forwards functions to the mCommand it holds. More...

#include <Command.h>

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

Public Member Functions

 DecoratedCommand (const OldStyleCommandPointer &cmd)
 
virtual ~DecoratedCommand ()
 
ComponentInterfaceSymbol GetSymbol () override
 
CommandSignatureGetSignature () override
 
bool SetParameter (const wxString &paramName, const wxVariant &paramValue) override
 
- Public Member Functions inherited from OldStyleCommand
 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
 

Protected Attributes

OldStyleCommandPointer mCommand
 

Additional Inherited Members

- Public Attributes inherited from OldStyleCommand
AudacityProjectmProject
 

Detailed Description

DecoratedCommand is a decorator for command. It forwards functions to the mCommand it holds.

Command which wraps another command It ISA command and HAS a command.

Definition at line 47 of file Command.h.

Constructor & Destructor Documentation

◆ DecoratedCommand()

DecoratedCommand::DecoratedCommand ( const OldStyleCommandPointer cmd)
inline

Definition at line 52 of file Command.h.

53 : OldStyleCommand{ cmd->mProject }, mCommand(cmd)
54 {
55 wxASSERT(cmd != NULL);
56 }
OldStyleCommandPointer mCommand
Definition: Command.h:50
Abstract base class for command interface. This is the version created by Dan Horgan....
Definition: Command.h:30

◆ ~DecoratedCommand()

DecoratedCommand::~DecoratedCommand ( )
virtual

Definition at line 102 of file Command.cpp.

103{
104}

Member Function Documentation

◆ GetSignature()

CommandSignature & DecoratedCommand::GetSignature ( )
overridevirtual

Implements OldStyleCommand.

Definition at line 111 of file Command.cpp.

112{
113 return mCommand->GetSignature();
114}

References mCommand.

◆ GetSymbol()

ComponentInterfaceSymbol DecoratedCommand::GetSymbol ( )
overridevirtual

Implements OldStyleCommand.

Definition at line 106 of file Command.cpp.

107{
108 return mCommand->GetSymbol();
109}

References mCommand.

Referenced by ApplyAndSendResponse::Apply().

Here is the caller graph for this function:

◆ SetParameter()

bool DecoratedCommand::SetParameter ( const wxString &  paramName,
const wxVariant &  paramValue 
)
overridevirtual

Reimplemented from OldStyleCommand.

Definition at line 116 of file Command.cpp.

118{
119 return mCommand->SetParameter(paramName, paramValue);
120}

References mCommand.

Member Data Documentation

◆ mCommand

OldStyleCommandPointer DecoratedCommand::mCommand
protected

Definition at line 50 of file Command.h.

Referenced by ApplyAndSendResponse::Apply(), GetSignature(), GetSymbol(), and SetParameter().


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