1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-27 06:07:59 +02:00
audacity/src/commands/CommandType.h
Paul Licameli 7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
2016-02-24 20:58:30 -05:00

54 lines
1.3 KiB
C++

/**********************************************************************
Audacity - A Digital Audio Editor
Copyright 1999-2009 Audacity Team
License: wxwidgets
Dan Horgan
******************************************************************//**
\file CommandType.h
\brief Contains declarations for CommandType class
*//*******************************************************************/
#ifndef __COMMANDTYPE__
#define __COMMANDTYPE__
#include "CommandMisc.h"
class Command;
class CommandOutputTarget;
class CommandSignature;
class wxString;
class CommandType /* not final */
{
private:
wxString *mName;
CommandSignature *mSignature;
public:
CommandType();
virtual ~CommandType();
wxString GetName();
CommandSignature &GetSignature();
wxString Describe();
// Subclasses should override the following:
// =========================================
// Return the name of the command type
virtual wxString BuildName() = 0;
/// Postcondition: signature is a 'signature' map containing parameter
// names, validators and default values.
virtual void BuildSignature(CommandSignature &signature) = 0;
// Create a command instance with the specified output target
virtual Command *Create(CommandOutputTarget *target) = 0;
};
#endif /* End of include guard: __COMMANDTYPE__ */