mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-20 09:31:15 +02:00
Type aliases for some uses of ComponentInterfaceSymbol...
... to be replaced later with distinct types Also changing FamilyId => Family in function names Also NumericFormatId => NumericFormatSymbol
This commit is contained in:
@@ -119,7 +119,7 @@ public:
|
||||
// So config compatibility will break if it is changed across Audacity versions
|
||||
virtual ComponentInterfaceSymbol GetSymbol() = 0;
|
||||
|
||||
virtual ComponentInterfaceSymbol GetVendor() = 0;
|
||||
virtual VendorSymbol GetVendor() = 0;
|
||||
|
||||
virtual wxString GetVersion() = 0;
|
||||
|
||||
|
@@ -164,7 +164,7 @@ public:
|
||||
using ObsoleteMap = std::pair< wxString, size_t >;
|
||||
|
||||
bool ReadEnum(const wxString & key, int *pi,
|
||||
const ComponentInterfaceSymbol choices[], size_t nChoices,
|
||||
const EnumValueSymbol choices[], size_t nChoices,
|
||||
const ObsoleteMap obsoletes[] = nullptr,
|
||||
size_t nObsoletes = 0) const
|
||||
{
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
*pi = std::find( choices, choices + nChoices,
|
||||
ComponentInterfaceSymbol{ s, {} } ) - choices;
|
||||
EnumValueSymbol{ s, {} } ) - choices;
|
||||
if (*pi == (int)nChoices)
|
||||
*pi = -1;
|
||||
if (*pi < 0 && obsoletes) {
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
}
|
||||
|
||||
bool ReadEnum(const wxString & key, int *pi, int defVal,
|
||||
const ComponentInterfaceSymbol choices[], size_t nChoices,
|
||||
const EnumValueSymbol choices[], size_t nChoices,
|
||||
const ObsoleteMap obsoletes[] = nullptr,
|
||||
size_t nObsoletes = 0) const
|
||||
{
|
||||
@@ -201,7 +201,7 @@ public:
|
||||
}
|
||||
|
||||
bool WriteEnum(const wxString & key, int value,
|
||||
const ComponentInterfaceSymbol choices[], size_t nChoices)
|
||||
const EnumValueSymbol choices[], size_t nChoices)
|
||||
{
|
||||
if (value < 0 || value >= (int)nChoices)
|
||||
{
|
||||
@@ -248,7 +248,7 @@ public:
|
||||
}
|
||||
|
||||
bool ReadAndVerify(const wxString & key, int *val, int defVal,
|
||||
const ComponentInterfaceSymbol choices[], size_t nChoices,
|
||||
const EnumValueSymbol choices[], size_t nChoices,
|
||||
const ObsoleteMap obsoletes[] = nullptr,
|
||||
size_t nObsoletes = 0) const
|
||||
{
|
||||
|
@@ -59,8 +59,6 @@ typedef enum EffectType : int
|
||||
EffectTypeTool,
|
||||
} EffectType;
|
||||
|
||||
using NumericFormatId = ComponentInterfaceSymbol;
|
||||
|
||||
|
||||
/*************************************************************************************//**
|
||||
|
||||
@@ -80,7 +78,7 @@ public:
|
||||
// Classification determines which menu it appears in.
|
||||
virtual EffectType GetClassification() { return GetType();};
|
||||
|
||||
virtual ComponentInterfaceSymbol GetFamilyId() = 0;
|
||||
virtual EffectFamilySymbol GetFamily() = 0;
|
||||
|
||||
// These should move to the "EffectClientInterface" class once all
|
||||
// effects have been converted.
|
||||
@@ -120,7 +118,7 @@ public:
|
||||
|
||||
virtual double GetDefaultDuration() = 0;
|
||||
virtual double GetDuration() = 0;
|
||||
virtual NumericFormatId GetDurationFormat() = 0;
|
||||
virtual NumericFormatSymbol GetDurationFormat() = 0;
|
||||
virtual void SetDuration(double seconds) = 0;
|
||||
|
||||
virtual bool Apply() = 0;
|
||||
|
@@ -245,6 +245,19 @@ typedef enum
|
||||
ChannelNameBottomFrontRight,
|
||||
} ChannelName, *ChannelNames;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// some frequently needed forward declarations
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class ComponentInterfaceSymbol;
|
||||
|
||||
using EnumValueSymbol = ComponentInterfaceSymbol;
|
||||
using NumericFormatSymbol = EnumValueSymbol;
|
||||
|
||||
using VendorSymbol = ComponentInterfaceSymbol;
|
||||
|
||||
using EffectFamilySymbol = ComponentInterfaceSymbol;
|
||||
|
||||
// LLL FIXME: Until a complete API is devised, we have to use
|
||||
// AUDACITY_DLL_API when defining API classes. This
|
||||
// it ugly, but a part of the game. Remove it when
|
||||
|
Reference in New Issue
Block a user