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 380 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 384 of file Prefs.h.

385 : vector( symbols )
386 {}

◆ EnumValueSymbols() [3/4]

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

Definition at line 387 of file Prefs.h.

388 : vector( symbols )
389 {}

◆ EnumValueSymbols() [4/4]

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

Definition at line 344 of file Prefs.cpp.

349 : mInternals( std::move( internals ) )
350{
351 auto size = mInternals.size(), size2 = msgids.size();
352 if ( size != size2 ) {
353 wxASSERT( false );
354 size = std::min( size, size2 );
355 }
356 reserve( size );
357 auto iter1 = mInternals.begin();
358 auto iter2 = msgids.begin();
359 while( size-- )
360 emplace_back( *iter1++, *iter2++ );
361}
int min(int a, int b)
wxArrayStringEx mInternals
Definition: Prefs.h:406

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

372{
373 if ( mInternals.empty() )
374 mInternals = transform_container<wxArrayStringEx>( *this,
375 std::mem_fn( &EnumValueSymbol::Internal ) );
376 return mInternals;
377}
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 363 of file Prefs.cpp.

364{
365 if ( mMsgids.empty() )
366 mMsgids = transform_container<TranslatableStrings>( *this,
367 std::mem_fn( &EnumValueSymbol::Msgid ) );
368 return mMsgids;
369}
const TranslatableString & Msgid() const
TranslatableStrings mMsgids
Definition: Prefs.h:405

References mMsgids, and ComponentInterfaceSymbol::Msgid().

Here is the call graph for this function:

Member Data Documentation

◆ mInternals

wxArrayStringEx EnumValueSymbols::mInternals
mutableprivate

Definition at line 406 of file Prefs.h.

Referenced by EnumValueSymbols(), and GetInternals().

◆ mMsgids

TranslatableStrings EnumValueSymbols::mMsgids
mutableprivate

Definition at line 405 of file Prefs.h.

Referenced by GetMsgids().


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