2010-01-23 19:44:49 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
Audacity(R) is copyright (c) 1999-2009 Audacity Team.
|
|
|
|
File License: wxwidgets
|
|
|
|
|
|
|
|
ImportExportCommands.h
|
|
|
|
Dan Horgan
|
|
|
|
|
|
|
|
******************************************************************//**
|
|
|
|
|
|
|
|
\class ImportCommand
|
|
|
|
\brief Command for importing audio
|
|
|
|
|
|
|
|
\class ExportCommand
|
|
|
|
\brief Command for exporting audio
|
|
|
|
|
|
|
|
*//*******************************************************************/
|
|
|
|
|
|
|
|
#include "Command.h"
|
|
|
|
#include "CommandType.h"
|
|
|
|
|
|
|
|
// Import
|
|
|
|
|
2016-02-24 06:06:39 +00:00
|
|
|
class ImportCommandType final : public CommandType
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
public:
|
2016-02-24 06:06:47 +00:00
|
|
|
wxString BuildName() override;
|
|
|
|
void BuildSignature(CommandSignature &signature) override;
|
2016-03-31 11:40:05 +00:00
|
|
|
CommandHolder Create(std::unique_ptr<CommandOutputTarget> &&target) override;
|
2010-01-23 19:44:49 +00:00
|
|
|
};
|
|
|
|
|
2016-02-24 06:06:39 +00:00
|
|
|
class ImportCommand final : public CommandImplementation
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ImportCommand(CommandType &type,
|
2016-03-31 11:40:05 +00:00
|
|
|
std::unique_ptr<CommandOutputTarget> &&target)
|
|
|
|
: CommandImplementation(type, std::move(target))
|
2010-01-23 19:44:49 +00:00
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ~ImportCommand();
|
2016-02-24 06:06:47 +00:00
|
|
|
bool Apply(CommandExecutionContext context) override;
|
2010-01-23 19:44:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Export
|
|
|
|
|
2016-02-24 06:06:39 +00:00
|
|
|
class ExportCommandType final : public CommandType
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
public:
|
2016-02-24 06:06:47 +00:00
|
|
|
wxString BuildName() override;
|
|
|
|
void BuildSignature(CommandSignature &signature) override;
|
2016-03-31 11:40:05 +00:00
|
|
|
CommandHolder Create(std::unique_ptr<CommandOutputTarget> &&target) override;
|
2010-01-23 19:44:49 +00:00
|
|
|
};
|
|
|
|
|
2016-02-24 06:06:39 +00:00
|
|
|
class ExportCommand final : public CommandImplementation
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ExportCommand(CommandType &type,
|
2016-03-31 11:40:05 +00:00
|
|
|
std::unique_ptr<CommandOutputTarget> &&target)
|
|
|
|
: CommandImplementation(type, std::move(target))
|
2010-01-23 19:44:49 +00:00
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ~ExportCommand();
|
2016-02-24 06:06:47 +00:00
|
|
|
bool Apply(CommandExecutionContext context) override;
|
2010-01-23 19:44:49 +00:00
|
|
|
};
|