Tag Parser  10.0.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
localeawarestring.h
Go to the documentation of this file.
1 #ifndef TAG_PARSER_LOCALEAWARESTRING_H
2 #define TAG_PARSER_LOCALEAWARESTRING_H
3 
4 #include "./localehelper.h"
5 
6 #include <string>
7 #include <vector>
8 
9 namespace TagParser {
10 
14 class TAG_PARSER_EXPORT LocaleAwareString : public std::string {
15 public:
16  explicit LocaleAwareString(const std::string &value = std::string());
17  explicit LocaleAwareString(std::string &&value);
19 
20  const Locale &locale() const;
21  Locale &locale();
22 
23 private:
24  Locale m_locale;
25 };
26 
30 inline LocaleAwareString::LocaleAwareString(const std::string &value)
31  : std::string(value)
32 {
33 }
34 
38 inline LocaleAwareString::LocaleAwareString(std::string &&value)
39  : std::string(value)
40 {
41 }
42 
47 {
48 }
49 
53 inline const Locale &LocaleAwareString::locale() const
54 {
55  return m_locale;
56 }
57 
62 {
63  return m_locale;
64 }
65 
66 } // namespace TagParser
67 
68 #endif // TAG_PARSER_LOCALEAWARESTRING_H
The LocaleAwareString class is a standard string with locale information (languages,...
const Locale & locale() const
Returns the associated locale.
LocaleAwareString(const std::string &value=std::string())
Constructs a new LocaleAwareString from the specified standard string.
~LocaleAwareString()
Destroys the instance.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Contains all classes and functions of the TagInfo library.
Definition: aaccodebook.h:10
The Locale struct specifies a language and/or a country using one or more LocaleDetail objects.
Definition: localehelper.h:61