Audacity  2.2.2
Public Member Functions | Private Attributes | Friends | List of all members
IdentInterfaceSymbol Class Reference

IdentInterfaceSymbol pairs a persistent string identifier used internally with an optional, different string as msgid for lookup in a translation catalog. More...

#include <IdentInterface.h>

Public Member Functions

 IdentInterfaceSymbol ()=default
 
 IdentInterfaceSymbol (const wxString &msgid)
 
 IdentInterfaceSymbol (const wxChar *msgid)
 
 IdentInterfaceSymbol (const wxString &internal, const wxString &msgid)
 
const wxString & Internal () const
 
const wxString & Msgid () const
 
const wxString & Translation () const
 
bool empty () const
 

Private Attributes

wxString mInternal
 
wxString mMsgid
 

Friends

bool operator== (const IdentInterfaceSymbol &a, const IdentInterfaceSymbol &b)
 
bool operator!= (const IdentInterfaceSymbol &a, const IdentInterfaceSymbol &b)
 

Detailed Description

IdentInterfaceSymbol pairs a persistent string identifier used internally with an optional, different string as msgid for lookup in a translation catalog.

If there is need to change a msgid in a later version of the program, change the constructor call to supply a second argument but leave the first the same, so that compatibility of older configuration files containing that internal string is not broken.

Definition at line 57 of file IdentInterface.h.

Constructor & Destructor Documentation

IdentInterfaceSymbol::IdentInterfaceSymbol ( )
default
IdentInterfaceSymbol::IdentInterfaceSymbol ( const wxString &  msgid)
inline

Definition at line 63 of file IdentInterface.h.

64  : mInternal{ msgid }, mMsgid{ msgid }
65  {}
IdentInterfaceSymbol::IdentInterfaceSymbol ( const wxChar *  msgid)
inline

Definition at line 68 of file IdentInterface.h.

69  : mInternal{ msgid }, mMsgid{ msgid }
70  {}
IdentInterfaceSymbol::IdentInterfaceSymbol ( const wxString &  internal,
const wxString &  msgid 
)
inline

Definition at line 74 of file IdentInterface.h.

75  : mInternal{ internal }
76  // Do not permit non-empty msgid with empty internal
77  , mMsgid{ internal.empty() ? wxString{} : msgid }
78  {}

Member Function Documentation

bool IdentInterfaceSymbol::empty ( ) const
inline

Definition at line 85 of file IdentInterface.h.

References mInternal.

Referenced by OldStyleCommandType::GetSymbol().

85 { return mInternal.empty(); }
const wxString& IdentInterfaceSymbol::Internal ( ) const
inline
const wxString& IdentInterfaceSymbol::Msgid ( ) const
inline

Definition at line 81 of file IdentInterface.h.

References mMsgid.

Referenced by AudacityProject::AddEffectMenuItems(), and PluginManager::SaveGroup().

81 { return mMsgid; }
const wxString& IdentInterfaceSymbol::Translation ( ) const
inline

Friends And Related Function Documentation

bool operator!= ( const IdentInterfaceSymbol a,
const IdentInterfaceSymbol b 
)
friend

Definition at line 91 of file IdentInterface.h.

93  { return !( a == b ); }
bool operator== ( const IdentInterfaceSymbol a,
const IdentInterfaceSymbol b 
)
friend

Definition at line 87 of file IdentInterface.h.

89  { return a.mInternal == b.mInternal; }

Member Data Documentation

wxString IdentInterfaceSymbol::mInternal
private

Definition at line 96 of file IdentInterface.h.

Referenced by empty(), and Internal().

wxString IdentInterfaceSymbol::mMsgid
private

Definition at line 97 of file IdentInterface.h.

Referenced by Msgid(), and Translation().


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