Audacity 3.2.0
CommandType.cpp
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
21#include "CommandType.h"
22
24 : mSignature{}
25{
26}
27
29{
30}
31
33{
34 return BuildName();
35}
36
38{
39 if (!mSignature)
40 {
41 mSignature.emplace();
43 }
44 return *mSignature;
45}
46
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
Contains declarations for CommandType class.
Class that maps parameter names to default values and validators.
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
const wxString & Internal() const
virtual ComponentInterfaceSymbol BuildName() const =0
std::optional< CommandSignature > mSignature
Definition: CommandType.h:47
virtual void BuildSignature(CommandSignature &signature)=0
Postcondition: signature is a 'signature' map containing parameter.
CommandSignature & GetSignature()
Definition: CommandType.cpp:37
virtual ~OldStyleCommandType()
Definition: CommandType.cpp:28
ComponentInterfaceSymbol GetSymbol() const override
Definition: CommandType.cpp:32
const TranslatableString desc
Definition: ExportPCM.cpp:51