libdcp
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
dcp::LanguageTag Class Reference

Classes

class  ExtlangSubtag
 
class  LanguageSubtag
 
class  RegionSubtag
 
class  ScriptSubtag
 
class  Subtag
 
struct  SubtagData
 
class  VariantSubtag
 

Public Types

enum class  SubtagType {
  LANGUAGE , SCRIPT , REGION , VARIANT ,
  EXTLANG
}
 

Public Member Functions

std::string to_string () const
 
std::string description () const
 
 LanguageTag (std::string tag)
 
boost::optional< LanguageSubtaglanguage () const
 
void set_language (LanguageSubtag language)
 
boost::optional< ScriptSubtagscript () const
 
void set_script (ScriptSubtag script)
 
boost::optional< RegionSubtagregion () const
 
void set_region (RegionSubtag region)
 
std::vector< VariantSubtagvariants () const
 
void set_variants (std::vector< VariantSubtag > variants)
 
void add_variant (VariantSubtag variant)
 
std::vector< ExtlangSubtagextlangs () const
 
void set_extlangs (std::vector< ExtlangSubtag > extlangs)
 
void add_extlang (ExtlangSubtag extlang)
 
std::vector< std::pair< SubtagType, SubtagData > > subtags () const
 

Static Public Member Functions

static std::vector< SubtagData > const & get_all (SubtagType type)
 
static std::string subtag_type_name (SubtagType type)
 
static boost::optional< std::string > get_subtag_description (SubtagType, std::string subtag)
 
static boost::optional< SubtagDataget_subtag_data (SubtagType, std::string subtag)
 
template<class T >
static boost::optional< std::string > get_subtag_description (T s)
 
template<class T >
static boost::optional< SubtagDataget_subtag_data (T s)
 

Private Attributes

boost::optional< LanguageSubtag_language
 
boost::optional< ScriptSubtag_script
 
boost::optional< RegionSubtag_region
 
std::vector< VariantSubtag_variants
 
std::vector< ExtlangSubtag_extlangs
 

Detailed Description

Definition at line 53 of file language_tag.h.


The documentation for this class was generated from the following files: