Audacity 3.2.0
Public Member Functions | List of all members
NumericConverterFormats::DefaultFormatRegistrator Struct Referencefinal

#include <NumericConverterFormats.h>

Public Member Functions

 DefaultFormatRegistrator (const NumericConverterType &type, const NumericFormatSymbol &symbol)
 

Detailed Description

Definition at line 20 of file NumericConverterFormats.h.

Constructor & Destructor Documentation

◆ DefaultFormatRegistrator()

NumericConverterFormats::DefaultFormatRegistrator::DefaultFormatRegistrator ( const NumericConverterType type,
const NumericFormatSymbol symbol 
)
explicit

Definition at line 31 of file NumericConverterFormats.cpp.

33{
34 auto& defaultSymbols = GetDefaultSymbols();
35
36 if (defaultSymbols.find(type) != defaultSymbols.end())
37 {
38 // We do not allow to register multiple defaults
39 // for a single type
40 assert(false);
41 return;
42 }
43
44 defaultSymbols.emplace(type, symbol);
45}
std::unordered_map< NumericConverterType, NumericFormatSymbol > & GetDefaultSymbols()

References anonymous_namespace{NumericConverterFormats.cpp}::GetDefaultSymbols().

Here is the call graph for this function:

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