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 309 of file Prefs.cpp.

314 : mInternals( std::move( internals ) )
315{
316 auto size = mInternals.size(), size2 = msgids.size();
317 if ( size != size2 ) {
318 wxASSERT( false );
319 size = std::min( size, size2 );
320 }
321 reserve( size );
322 auto iter1 = mInternals.begin();
323 auto iter2 = msgids.begin();
324 while( size-- )
325 emplace_back( *iter1++, *iter2++ );
326}
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 336 of file Prefs.cpp.

337{
338 if ( mInternals.empty() )
339 mInternals = transform_container<wxArrayStringEx>( *this,
340 std::mem_fn( &EnumValueSymbol::Internal ) );
341 return mInternals;
342}
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 328 of file Prefs.cpp.

329{
330 if ( mMsgids.empty() )
331 mMsgids = transform_container<TranslatableStrings>( *this,
332 std::mem_fn( &EnumValueSymbol::Msgid ) );
333 return mMsgids;
334}
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: