summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-12-28 12:35:28 +0100
committerRobin Gareus <robin@gareus.org>2016-12-28 13:38:49 +0100
commit3120270d876c38f6ba22b49a44d93899f831cef6 (patch)
treeb8999b3a5c3dff201eb4251625eff8c1224c44be
parent6d566c9fe0abf2adf31ba56e2545ca1283ee8847 (diff)
Add enum for locale-config
-rw-r--r--libs/ardour/ardour/types.h8
-rw-r--r--libs/ardour/enums.cc20
2 files changed, 28 insertions, 0 deletions
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index 5e59053aef..9a7b719111 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -249,6 +249,12 @@ namespace ARDOUR {
TrackColor
};
+ enum LocaleMode {
+ SET_LC_ALL,
+ SET_LC_MESSAGES,
+ SET_LC_MESSAGES_AND_LC_NUMERIC
+ };
+
enum RoundMode {
RoundDownMaybe = -2, ///< Round down only if necessary
RoundDownAlways = -1, ///< Always round down, even if on a division
@@ -762,11 +768,13 @@ LIBARDOUR_API std::istream& operator>>(std::istream& o, ARDOUR::WaveformScale& s
LIBARDOUR_API std::istream& operator>>(std::istream& o, ARDOUR::WaveformShape& sf);
LIBARDOUR_API std::istream& operator>>(std::istream& o, ARDOUR::VUMeterStandard& sf);
LIBARDOUR_API std::istream& operator>>(std::istream& o, ARDOUR::MeterLineUp& sf);
+LIBARDOUR_API std::istream& operator>>(std::istream& o, ARDOUR::LocaleMode& sf);
LIBARDOUR_API std::ostream& operator<<(std::ostream& o, const ARDOUR::WaveformScale& sf);
LIBARDOUR_API std::ostream& operator<<(std::ostream& o, const ARDOUR::WaveformShape& sf);
LIBARDOUR_API std::ostream& operator<<(std::ostream& o, const ARDOUR::VUMeterStandard& sf);
LIBARDOUR_API std::ostream& operator<<(std::ostream& o, const ARDOUR::MeterLineUp& sf);
+LIBARDOUR_API std::ostream& operator<<(std::ostream& o, const ARDOUR::LocaleMode& sf);
static inline ARDOUR::framepos_t
diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc
index cd1a120c92..db8aeb17b2 100644
--- a/libs/ardour/enums.cc
+++ b/libs/ardour/enums.cc
@@ -63,6 +63,7 @@ setup_enum_writer ()
NoteMode _NoteMode;
ChannelMode _ChannelMode;
ColorMode _ColorMode;
+ LocaleMode _LocaleMode;
MeterFalloff _MeterFalloff;
MeterHold _MeterHold;
VUMeterStandard _VUMeterStandard;
@@ -247,6 +248,11 @@ setup_enum_writer ()
REGISTER_ENUM (TrackColor);
REGISTER (_ColorMode);
+ REGISTER_ENUM (SET_LC_ALL);
+ REGISTER_ENUM (SET_LC_MESSAGES);
+ REGISTER_ENUM (SET_LC_MESSAGES_AND_LC_NUMERIC);
+ REGISTER (_LocaleMode);
+
REGISTER_ENUM (MeterFalloffOff);
REGISTER_ENUM (MeterFalloffSlowest);
REGISTER_ENUM (MeterFalloffSlow);
@@ -869,6 +875,20 @@ std::ostream& operator<<(std::ostream& o, const MeterLineUp& var)
return o << s;
}
+std::istream& operator>>(std::istream& o, LocaleMode& var)
+{
+ std::string s;
+ o >> s;
+ var = (LocaleMode) string_2_enum (s, var);
+ return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const LocaleMode& var)
+{
+ std::string s = enum_2_string (var);
+ return o << s;
+}
+
std::istream& operator>>(std::istream& o, PFLPosition& var)
{
std::string s;