Audacity
3.2.0
libraries
lib-numeric-formats
NumericConverterFormats.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
/**********************************************************************
3
4
Audacity: A Digital Audio Editor
5
6
@file NumericConverterFormats.h
7
8
Dmitry Vedenko
9
10
**********************************************************************/
11
#pragma once
12
13
#include "
NumericConverterType.h
"
14
#include "
ComponentInterfaceSymbol.h
"
15
16
class
FormatterContext
;
17
18
namespace
NumericConverterFormats
19
{
20
struct
DefaultFormatRegistrator
final
21
{
22
explicit
DefaultFormatRegistrator
(
23
const
NumericConverterType
& type,
const
NumericFormatSymbol
& symbol);
24
};
25
27
NUMERIC_FORMATS_API
NumericFormatSymbol
Default
(
const
NumericConverterType
& type);
28
30
NUMERIC_FORMATS_API
NumericFormatSymbol
Lookup
(
31
const
FormatterContext
& context,
const
NumericConverterType
& type,
32
const
wxString& formatIdentifier);
33
35
NUMERIC_FORMATS_API
NumericFormatSymbol
Lookup
(
36
const
FormatterContext
& context,
const
NumericConverterType
& type,
37
const
NumericFormatSymbol
& formatIdentifier);
38
39
NUMERIC_FORMATS_API
NumericFormatSymbol
DefaultSelectionFormat
();
40
NUMERIC_FORMATS_API
NumericFormatSymbol
TimeAndSampleFormat
();
41
NUMERIC_FORMATS_API
NumericFormatSymbol
SecondsFormat
();
42
NUMERIC_FORMATS_API
NumericFormatSymbol
HoursMinsSecondsFormat
();
43
NUMERIC_FORMATS_API
NumericFormatSymbol
HundredthsFormat
();
44
NUMERIC_FORMATS_API
NumericFormatSymbol
MillisecondsFormat
();
45
NUMERIC_FORMATS_API
NumericFormatSymbol
HertzFormat
();
46
NUMERIC_FORMATS_API
NumericFormatSymbol
OctavesFormat
();
47
49
NUMERIC_FORMATS_API
NumericFormatSymbol
50
GetBestDurationFormat
(
const
NumericFormatSymbol
& timeFormat);
51
}
ComponentInterfaceSymbol.h
NumericConverterType.h
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition:
ComponentInterfaceSymbol.h:27
FormatterContext
A context in which formatter operates.
Definition:
NumericConverterFormatterContext.h:24
Identifier
An explicitly nonlocalized string, not meant for the user to see.
Definition:
Identifier.h:22
NumericConverterFormats
Definition:
NumericConverterFormats.cpp:30
NumericConverterFormats::HoursMinsSecondsFormat
NUMERIC_FORMATS_API NumericFormatSymbol HoursMinsSecondsFormat()
Definition:
NumericConverterFormats.cpp:104
NumericConverterFormats::MillisecondsFormat
NUMERIC_FORMATS_API NumericFormatSymbol MillisecondsFormat()
Definition:
NumericConverterFormats.cpp:111
NumericConverterFormats::HundredthsFormat
NUMERIC_FORMATS_API NumericFormatSymbol HundredthsFormat()
Definition:
NumericConverterFormats.cpp:118
NumericConverterFormats::DefaultSelectionFormat
NUMERIC_FORMATS_API NumericFormatSymbol DefaultSelectionFormat()
Definition:
NumericConverterFormats.cpp:86
NumericConverterFormats::HertzFormat
NUMERIC_FORMATS_API NumericFormatSymbol HertzFormat()
Definition:
NumericConverterFormats.cpp:125
NumericConverterFormats::SecondsFormat
NUMERIC_FORMATS_API NumericFormatSymbol SecondsFormat()
Definition:
NumericConverterFormats.cpp:98
NumericConverterFormats::GetBestDurationFormat
NUMERIC_FORMATS_API NumericFormatSymbol GetBestDurationFormat(const NumericFormatSymbol &timeFormat)
Return the best duration format for the given time format. Currently is an identity function.
Definition:
NumericConverterFormats.cpp:138
NumericConverterFormats::Default
NumericFormatSymbol Default(const NumericConverterType &type)
Returns the default format for the type or empty symbol, if no default symbol is registered.
Definition:
NumericConverterFormats.cpp:47
NumericConverterFormats::OctavesFormat
NUMERIC_FORMATS_API NumericFormatSymbol OctavesFormat()
Definition:
NumericConverterFormats.cpp:131
NumericConverterFormats::TimeAndSampleFormat
NUMERIC_FORMATS_API NumericFormatSymbol TimeAndSampleFormat()
Definition:
NumericConverterFormats.cpp:91
NumericConverterFormats::Lookup
NUMERIC_FORMATS_API NumericFormatSymbol Lookup(const FormatterContext &context, const NumericConverterType &type, const NumericFormatSymbol &formatIdentifier)
Looks up the format, returns Default for the type if the format is not registered.
Definition:
NumericConverterFormats.cpp:62
NumericConverterFormats::DefaultFormatRegistrator
Definition:
NumericConverterFormats.h:21
NumericConverterFormats::DefaultFormatRegistrator::DefaultFormatRegistrator
DefaultFormatRegistrator(const NumericConverterType &type, const NumericFormatSymbol &symbol)
Definition:
NumericConverterFormats.cpp:31
Generated by
1.9.3