Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
EnumValueSymbols Class Reference

#include <Prefs.h>

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

Public Member Functions

 EnumValueSymbols ()=default
 
 EnumValueSymbols (std::initializer_list< EnumValueSymbol > symbols)
 
 EnumValueSymbols (std::vector< EnumValueSymbol > symbols)
 
 EnumValueSymbols (ByColumns_t, const TranslatableStrings &msgids, wxArrayStringEx internals)
 
const TranslatableStringsGetMsgids () const
 
const wxArrayStringExGetInternals () const
 

Private Attributes

TranslatableStrings mMsgids
 
wxArrayStringEx mInternals
 

Detailed Description

A table of EnumValueSymbol that you can access by "row" with operator [] but also allowing access to the "columns" of internal or translated strings, and also allowing convenient column-wise construction

Definition at line 373 of file Prefs.h.

Constructor & Destructor Documentation

◆ EnumValueSymbols() [1/4]

EnumValueSymbols::EnumValueSymbols ( )
default

◆ EnumValueSymbols() [2/4]

EnumValueSymbols::EnumValueSymbols ( std::initializer_list< EnumValueSymbol symbols)
inline

Definition at line 377 of file Prefs.h.

378 : vector( symbols )
379 {}

◆ EnumValueSymbols() [3/4]

EnumValueSymbols::EnumValueSymbols ( std::vector< EnumValueSymbol symbols)
inline

Definition at line 380 of file Prefs.h.

381 : vector( symbols )
382 {}

◆ EnumValueSymbols() [4/4]

EnumValueSymbols::EnumValueSymbols ( ByColumns_t  ,
const TranslatableStrings msgids,
wxArrayStringEx  internals 
)

Definition at line 310 of file Prefs.cpp.

315 : mInternals( std::move( internals ) )
316{
317 auto size = mInternals.size(), size2 = msgids.size();
318 if ( size != size2 ) {
319 wxASSERT( false );
320 size = std::min( size, size2 );
321 }
322 reserve( size );
323 auto iter1 = mInternals.begin();
324 auto iter2 = msgids.begin();
325 while( size-- )
326 emplace_back( *iter1++, *iter2++ );
327}
int min(int a, int b)
wxArrayStringEx mInternals
Definition: Prefs.h:399

References min(), mInternals, and size.

Here is the call graph for this function:

Member Function Documentation

◆ GetInternals()

const wxArrayStringEx & EnumValueSymbols::GetInternals ( ) const

Definition at line 337 of file Prefs.cpp.

338{
339 if ( mInternals.empty() )
340 mInternals = transform_container<wxArrayStringEx>( *this,
341 std::mem_fn( &EnumValueSymbol::Internal ) );
342 return mInternals;
343}
const wxString & Internal() const

References ComponentInterfaceSymbol::Internal(), and mInternals.

Referenced by anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieChoice().

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

◆ GetMsgids()

const TranslatableStrings & EnumValueSymbols::GetMsgids ( ) const

Definition at line 329 of file Prefs.cpp.

330{
331 if ( mMsgids.empty() )
332 mMsgids = transform_container<TranslatableStrings>( *this,
333 std::mem_fn( &EnumValueSymbol::Msgid ) );
334 return mMsgids;
335}
const TranslatableString & Msgid() const
TranslatableStrings mMsgids
Definition: Prefs.h:398

References mMsgids, and ComponentInterfaceSymbol::Msgid().

Here is the call graph for this function:

Member Data Documentation

◆ mInternals

wxArrayStringEx EnumValueSymbols::mInternals
mutableprivate

Definition at line 399 of file Prefs.h.

Referenced by EnumValueSymbols(), and GetInternals().

◆ mMsgids

TranslatableStrings EnumValueSymbols::mMsgids
mutableprivate

Definition at line 398 of file Prefs.h.

Referenced by GetMsgids().


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