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 378 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 382 of file Prefs.h.

383 : vector( symbols )
384 {}

◆ EnumValueSymbols() [3/4]

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

Definition at line 385 of file Prefs.h.

386 : vector( symbols )
387 {}

◆ EnumValueSymbols() [4/4]

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

Definition at line 325 of file Prefs.cpp.

330 : mInternals( std::move( internals ) )
331{
332 auto size = mInternals.size(), size2 = msgids.size();
333 if ( size != size2 ) {
334 wxASSERT( false );
335 size = std::min( size, size2 );
336 }
337 reserve( size );
338 auto iter1 = mInternals.begin();
339 auto iter2 = msgids.begin();
340 while( size-- )
341 emplace_back( *iter1++, *iter2++ );
342}
int min(int a, int b)
wxArrayStringEx mInternals
Definition: Prefs.h:404

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

353{
354 if ( mInternals.empty() )
355 mInternals = transform_container<wxArrayStringEx>( *this,
356 std::mem_fn( &EnumValueSymbol::Internal ) );
357 return mInternals;
358}
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 344 of file Prefs.cpp.

345{
346 if ( mMsgids.empty() )
347 mMsgids = transform_container<TranslatableStrings>( *this,
348 std::mem_fn( &EnumValueSymbol::Msgid ) );
349 return mMsgids;
350}
const TranslatableString & Msgid() const
TranslatableStrings mMsgids
Definition: Prefs.h:403

References mMsgids, and ComponentInterfaceSymbol::Msgid().

Here is the call graph for this function:

Member Data Documentation

◆ mInternals

wxArrayStringEx EnumValueSymbols::mInternals
mutableprivate

Definition at line 404 of file Prefs.h.

Referenced by EnumValueSymbols(), and GetInternals().

◆ mMsgids

TranslatableStrings EnumValueSymbols::mMsgids
mutableprivate

Definition at line 403 of file Prefs.h.

Referenced by GetMsgids().


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