added comments and move c'tor
This commit is contained in:
parent
0cd61e5e6d
commit
054e404858
|
@ -8,10 +8,14 @@
|
|||
|
||||
namespace Media {
|
||||
|
||||
/*!
|
||||
* \brief The LocaleAwareString class is a standard string with locale information (languages, countries).
|
||||
*/
|
||||
class LIB_EXPORT LocaleAwareString : public std::string
|
||||
{
|
||||
public:
|
||||
LocaleAwareString(const std::string &value = std::string());
|
||||
LocaleAwareString(std::string &&value);
|
||||
~LocaleAwareString();
|
||||
|
||||
const std::vector<std::string> &languages() const;
|
||||
|
@ -24,28 +28,53 @@ private:
|
|||
std::vector<std::string> m_countries;
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Constructs a new LocaleAwareString from the specified standard string.
|
||||
*/
|
||||
inline LocaleAwareString::LocaleAwareString(const std::string &value) :
|
||||
std::string(value)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a new LocaleAwareString from the specified standard string.
|
||||
*/
|
||||
inline LocaleAwareString::LocaleAwareString(std::string &&value) :
|
||||
std::string(value)
|
||||
{}
|
||||
|
||||
/*!
|
||||
* \brief Destroys the instance.
|
||||
*/
|
||||
inline LocaleAwareString::~LocaleAwareString()
|
||||
{}
|
||||
|
||||
/*!
|
||||
* \brief Returns associated languages.
|
||||
*/
|
||||
inline const std::vector<std::string> &LocaleAwareString::languages() const
|
||||
{
|
||||
return m_languages;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns associated languages.
|
||||
*/
|
||||
inline std::vector<std::string> &LocaleAwareString::languages()
|
||||
{
|
||||
return m_languages;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns associated countries.
|
||||
*/
|
||||
inline const std::vector<std::string> &LocaleAwareString::countries() const
|
||||
{
|
||||
return m_countries;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns associated countries.
|
||||
*/
|
||||
inline std::vector<std::string> &LocaleAwareString::countries()
|
||||
{
|
||||
return m_countries;
|
||||
|
|
Loading…
Reference in New Issue