Tag Parser  9.1.2
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 "./global.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  LocaleAwareString(const std::string &value = std::string());
17  LocaleAwareString(std::string &&value);
19 
20  const std::vector<std::string> &languages() const;
21  std::vector<std::string> &languages();
22  const std::vector<std::string> &countries() const;
23  std::vector<std::string> &countries();
24 
25 private:
26  std::vector<std::string> m_languages;
27  std::vector<std::string> m_countries;
28 };
29 
33 inline LocaleAwareString::LocaleAwareString(const std::string &value)
34  : std::string(value)
35 {
36 }
37 
41 inline LocaleAwareString::LocaleAwareString(std::string &&value)
42  : std::string(value)
43 {
44 }
45 
50 {
51 }
52 
56 inline const std::vector<std::string> &LocaleAwareString::languages() const
57 {
58  return m_languages;
59 }
60 
64 inline std::vector<std::string> &LocaleAwareString::languages()
65 {
66  return m_languages;
67 }
68 
72 inline const std::vector<std::string> &LocaleAwareString::countries() const
73 {
74  return m_countries;
75 }
76 
80 inline std::vector<std::string> &LocaleAwareString::countries()
81 {
82  return m_countries;
83 }
84 
85 } // namespace TagParser
86 
87 #endif // TAG_PARSER_LOCALEAWARESTRING_H
global.h
TagParser::LocaleAwareString::countries
const std::vector< std::string > & countries() const
Returns associated countries.
Definition: localeawarestring.h:72
TagParser::LocaleAwareString
The LocaleAwareString class is a standard string with locale information (languages,...
Definition: localeawarestring.h:14
TagParser
Contains all classes and functions of the TagInfo library.
Definition: aaccodebook.h:10
TagParser::LocaleAwareString::languages
const std::vector< std::string > & languages() const
Returns associated languages.
Definition: localeawarestring.h:56
TAG_PARSER_EXPORT
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
TagParser::LocaleAwareString::LocaleAwareString
LocaleAwareString(const std::string &value=std::string())
Constructs a new LocaleAwareString from the specified standard string.
Definition: localeawarestring.h:33
TagParser::LocaleAwareString::~LocaleAwareString
~LocaleAwareString()
Destroys the instance.
Definition: localeawarestring.h:49