21 : m_ascii(
std::move(ascii)), m_utf8(
std::move(unicode)), m_latex(
std::move(latex)) {}
28 std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
44 return (this->
ascii() == rhs.
ascii() && this->utf8() ==
rhs.utf8());
120UnitLabel::operator std::string()
const {
return this->ascii(); }
const std::vector< double > & rhs
A base-class for the a class that is able to return unit labels in different representations.
std::wstring m_utf8
Value of utf-8 encoded string.
std::string AsciiString
Type that contains a plain-text string.
std::string m_ascii
Value of plain-text label.
const AsciiString & ascii() const
Return an ascii label for unit.
bool operator==(const UnitLabel &rhs) const
Equality operator with other label.
std::string m_latex
Value of latex label.
std::wstring Utf8String
Type that can hold a unicode string.
bool operator!=(const UnitLabel &rhs) const
Inqquality operator with other label.
const Utf8String & utf8() const
Return a utf-8 encoded label for unit.
const AsciiString & latex() const
Return an ascii latex compatible label for unit.