2015-04-22 19:22:01 +02:00
|
|
|
#ifndef MEDIA_LOCALEAWARESTRING_H
|
|
|
|
#define MEDIA_LOCALEAWARESTRING_H
|
|
|
|
|
|
|
|
#include <c++utilities/application/global.h>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace Media {
|
|
|
|
|
|
|
|
class LIB_EXPORT LocaleAwareString : public std::string
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
LocaleAwareString(const std::string &value = std::string());
|
|
|
|
~LocaleAwareString();
|
|
|
|
|
|
|
|
const std::vector<std::string> &languages() const;
|
|
|
|
std::vector<std::string> &languages();
|
|
|
|
const std::vector<std::string> &countries() const;
|
|
|
|
std::vector<std::string> &countries();
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<std::string> m_languages;
|
2015-11-10 21:20:12 +01:00
|
|
|
std::vector<std::string> m_countries;
|
2015-04-22 19:22:01 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
inline LocaleAwareString::LocaleAwareString(const std::string &value) :
|
|
|
|
std::string(value)
|
|
|
|
{}
|
|
|
|
|
|
|
|
inline LocaleAwareString::~LocaleAwareString()
|
|
|
|
{}
|
|
|
|
|
|
|
|
inline const std::vector<std::string> &LocaleAwareString::languages() const
|
|
|
|
{
|
|
|
|
return m_languages;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline std::vector<std::string> &LocaleAwareString::languages()
|
|
|
|
{
|
|
|
|
return m_languages;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const std::vector<std::string> &LocaleAwareString::countries() const
|
|
|
|
{
|
2015-11-10 21:20:12 +01:00
|
|
|
return m_countries;
|
2015-04-22 19:22:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
inline std::vector<std::string> &LocaleAwareString::countries()
|
|
|
|
{
|
2015-11-10 21:20:12 +01:00
|
|
|
return m_countries;
|
2015-04-22 19:22:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Media
|
|
|
|
|
|
|
|
#endif // MEDIA_LOCALEAWARESTRING_H
|