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 46 of file Command.h.

Constructor & Destructor Documentation

◆ DecoratedCommand()

DecoratedCommand::DecoratedCommand ( const OldStyleCommandPointer cmd)
inline

Definition at line 51 of file Command.h.

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

◆ ~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 49 of file Command.h.

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


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