Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
OldStyleCommandType Class Referenceabstract

Base class for containing data common to all commands of a given type. Also acts as a factory. More...

#include <CommandType.h>

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

Public Member Functions

 OldStyleCommandType ()
 
virtual ~OldStyleCommandType ()
 
ComponentInterfaceSymbol GetSymbol () const override
 
CommandSignatureGetSignature ()
 
wxString Describe ()
 
virtual ComponentInterfaceSymbol BuildName () const =0
 
virtual void BuildSignature (CommandSignature &signature)=0
 Postcondition: signature is a 'signature' map containing parameter. More...
 
virtual OldStyleCommandPointer Create (AudacityProject &project, std::unique_ptr< CommandOutputTargets > &&target)=0
 
- Public Member Functions inherited from AudacityCommand
 AudacityCommand ()
 
virtual ~AudacityCommand ()
 
PluginPath GetPath () const override
 
VendorSymbol GetVendor () const override
 
wxString GetVersion () const override
 
ComponentInterfaceSymbol GetSymbol () const override=0
 
virtual TranslatableString GetDescription () const override
 
virtual ManualPageID ManualPage ()
 
virtual bool IsBatchProcessing () const
 
virtual void SetBatchProcessing (bool start)
 
virtual bool Apply (const CommandContext &WXUNUSED(context))
 
bool ShowInterface (wxWindow *parent, bool forceModal=false)
 
wxDialog * CreateUI (wxWindow *parent, AudacityCommand *client)
 
bool SaveSettingsAsString (wxString &parms)
 
bool LoadSettingsFromString (const wxString &parms)
 
bool DoAudacityCommand (const CommandContext &context, bool shouldPrompt=true)
 
int MessageBox (const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
 
virtual bool Init ()
 
virtual bool PromptUser (AudacityProject &)
 
virtual bool CheckWhetherSkipAudacityCommand ()
 
virtual void End ()
 
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
 
virtual bool TransferDataToWindow ()
 
virtual bool TransferDataFromWindow ()
 
virtual bool VisitSettings (SettingsVisitor &)
 
virtual bool VisitSettings (ConstSettingsVisitor &)
 
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
 
virtual PluginPath GetPath () const =0
 
virtual ComponentInterfaceSymbol GetSymbol () const =0
 
virtual VendorSymbol GetVendor () const =0
 
virtual wxString GetVersion () const =0
 
virtual TranslatableString GetDescription () const =0
 
TranslatableString GetName () const
 

Private Attributes

std::optional< CommandSignaturemSignature
 

Additional Inherited Members

- Public Types inherited from AudacityCommand
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 
- Protected Attributes inherited from AudacityCommand
ProgressDialogmProgress
 
wxDialog * mUIDialog
 
wxWindow * mUIParent
 

Detailed Description

Base class for containing data common to all commands of a given type. Also acts as a factory.

Definition at line 44 of file CommandType.h.

Constructor & Destructor Documentation

◆ OldStyleCommandType()

OldStyleCommandType::OldStyleCommandType ( )

Definition at line 23 of file CommandType.cpp.

24 : mSignature{}
25{
26}
std::optional< CommandSignature > mSignature
Definition: CommandType.h:47

◆ ~OldStyleCommandType()

OldStyleCommandType::~OldStyleCommandType ( )
virtual

Definition at line 28 of file CommandType.cpp.

29{
30}

Member Function Documentation

◆ BuildName()

virtual ComponentInterfaceSymbol OldStyleCommandType::BuildName ( ) const
pure virtual

Implemented in BatchEvalCommandType.

Referenced by GetSymbol().

Here is the caller graph for this function:

◆ BuildSignature()

virtual void OldStyleCommandType::BuildSignature ( CommandSignature signature)
pure virtual

Postcondition: signature is a 'signature' map containing parameter.

Implemented in BatchEvalCommandType.

Referenced by GetSignature().

Here is the caller graph for this function:

◆ Create()

virtual OldStyleCommandPointer OldStyleCommandType::Create ( AudacityProject project,
std::unique_ptr< CommandOutputTargets > &&  target 
)
pure virtual

Implemented in BatchEvalCommandType.

Referenced by CommandBuilder::BuildCommand().

Here is the caller graph for this function:

◆ Describe()

wxString OldStyleCommandType::Describe ( )

Definition at line 47 of file CommandType.cpp.

48{
49 // PRL: Is this intended for end-user visibility or just debugging? It did not
50 // use _(""), so I assume it is meant to use internal strings
51 wxString desc = GetSymbol().Internal() + wxT("\nParameters:");
53 ParamValueMap::iterator iter;
54 ParamValueMap defaults = mSignature->GetDefaults();
55 for (iter = defaults.begin(); iter != defaults.end(); ++iter)
56 {
57 desc += wxT("\n") + iter->first + wxT(": ")
58 + mSignature->GetValidator(iter->first).GetDescription()
59 + wxT(" (default: ")
60 + iter->second.MakeString() + wxT(")");
61 }
62 return desc;
63}
wxT("CloseDown"))
std::map< wxString, wxVariant > ParamValueMap
Definition: CommandMisc.h:23
const wxString & Internal() const
CommandSignature & GetSignature()
Definition: CommandType.cpp:37
ComponentInterfaceSymbol GetSymbol() const override
Definition: CommandType.cpp:32
const TranslatableString desc
Definition: ExportPCM.cpp:51

References anonymous_namespace{ExportPCM.cpp}::desc, GetSignature(), GetSymbol(), ComponentInterfaceSymbol::Internal(), mSignature, and wxT().

Here is the call graph for this function:

◆ GetSignature()

CommandSignature & OldStyleCommandType::GetSignature ( )

Definition at line 37 of file CommandType.cpp.

38{
39 if (!mSignature)
40 {
41 mSignature.emplace();
43 }
44 return *mSignature;
45}
virtual void BuildSignature(CommandSignature &signature)=0
Postcondition: signature is a 'signature' map containing parameter.

References BuildSignature(), and mSignature.

Referenced by Describe(), CommandImplementation::GetSignature(), and CommandImplementation::SetParameter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSymbol()

ComponentInterfaceSymbol OldStyleCommandType::GetSymbol ( ) const
overridevirtual

Implements AudacityCommand.

Definition at line 32 of file CommandType.cpp.

33{
34 return BuildName();
35}
virtual ComponentInterfaceSymbol BuildName() const =0

References BuildName().

Referenced by Describe(), and CommandImplementation::GetSymbol().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mSignature

std::optional<CommandSignature> OldStyleCommandType::mSignature
private

Definition at line 47 of file CommandType.h.

Referenced by Describe(), and GetSignature().


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