Audacity  2.2.0
ExecMenuCommand.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity - A Digital Audio Editor
4  Copyright 1999-2009 Audacity Team
5  License: wxWidgets
6 
7  Dan Horgan
8 
9 ******************************************************************//*******************************************************************/
19 
20 #ifndef __EXECMENUCOMMAND__
21 #define __EXECMENUCOMMAND__
22 
23 #include "Command.h"
24 #include "CommandType.h"
25 
26 class ExecMenuCommandType final : public CommandType
27 {
28 public:
29  wxString BuildName() override;
30  void BuildSignature(CommandSignature &signature) override;
31  CommandHolder Create(std::unique_ptr<CommandOutputTarget> &&target) override;
32 };
33 
35 {
36 public:
38  std::unique_ptr<CommandOutputTarget> &&target)
39  : CommandImplementation(type, std::move(target))
40  { }
41  virtual ~ExecMenuCommand() { }
42  bool Apply(CommandExecutionContext context) override;
43 };
44 
45 #endif /* End of include guard: __EXECMENUCOMMAND__ */
void BuildSignature(CommandSignature &signature) override
Postcondition: signature is a 'signature' map containing parameter.
Definition: ExecMenuCommand.cpp:25
std::shared_ptr< Command > CommandHolder
Definition: AppCommandEvent.h:26
Contains declarations for CommandType class.
Contains declaration of Command base class.
virtual ~ExecMenuCommand()
Definition: ExecMenuCommand.h:41
Definition: ExecMenuCommand.h:26
A command which asks the CommandManager to execute a menu command by name.
Definition: ExecMenuCommand.h:34
is derived from Command. It validates and applies the command. CommandImplementation::Apply() is over...
Definition: Command.h:118
Base class for containing data common to all commands of a given type. Also acts as a factory...
Definition: CommandType.h:29
CommandHolder Create(std::unique_ptr< CommandOutputTarget > &&target) override
Definition: ExecMenuCommand.cpp:31
Represents a context to which a command may be applied.
Definition: Command.h:50
wxString BuildName() override
Definition: ExecMenuCommand.cpp:20
bool Apply(CommandExecutionContext context) override
Definition: ExecMenuCommand.cpp:36
ExecMenuCommand(CommandType &type, std::unique_ptr< CommandOutputTarget > &&target)
Definition: ExecMenuCommand.h:37
Class that maps parameter names to default values and validators.
Definition: CommandSignature.h:28