DUDS
Distributed Update of Data from Something
duds::general::LanguageTaggedString Struct Reference

Holds a string and its associated language. More...

#include <LanguageTaggedString.hpp>

Collaboration diagram for duds::general::LanguageTaggedString:

Public Member Functions

bool operator< (const LanguageTaggedString &lts) const
 Compares two for sorting. More...
 

Public Attributes

std::string string
 A string encoded in UTF-8. More...
 
std::string tag
 The IETF language tag, RFC 5646, maybe. More...
 

Private Member Functions

template<class A >
void serialize (A &a, const unsigned int)
 

Friends

class boost::serialization::access
 

Detailed Description

Holds a string and its associated language.

Author
Jeff Jackowski

Definition at line 23 of file LanguageTaggedString.hpp.

Member Function Documentation

◆ operator<()

bool duds::general::LanguageTaggedString::operator< ( const LanguageTaggedString lts) const
inline

Compares two for sorting.

Todo:
Should this use both strings? How will that work with std::multiset?

Definition at line 41 of file LanguageTaggedString.hpp.

◆ serialize()

template<class A >
void duds::general::LanguageTaggedString::serialize ( A &  a,
const unsigned  int 
)
inlineprivate

Definition at line 52 of file LanguageTaggedString.hpp.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 49 of file LanguageTaggedString.hpp.

Member Data Documentation

◆ string

std::string duds::general::LanguageTaggedString::string

A string encoded in UTF-8.

Definition at line 36 of file LanguageTaggedString.hpp.

Referenced by duds::data::GenericValueStringVisitor::operator()(), and operator<().

◆ tag

std::string duds::general::LanguageTaggedString::tag

The IETF language tag, RFC 5646, maybe.

When strings are searched by a langauge tag, an exact match is preferred, while something close should be attempted next. Such a process may be complex, may need a set of pre-made language tags to search for in priority order, or may need something other than IETF tags to make it easier to find non-exact close matches.

Definition at line 32 of file LanguageTaggedString.hpp.

Referenced by operator<().


The documentation for this struct was generated from the following file: