cheshirekow  v0.1.0
fontconfig::LangSetDelegate Class Reference

An LangSet is an abstract type that holds the set of languages supported by a font. More...

#include <cpp_fontconfig/LangSet.h>

Public Member Functions

bool add (const Char8_t *lang)
 add a language to a langset More...
 
LangResult_t compare (const RefPtr< LangSet > lsb)
 compare language sets More...
 
bool contains (const RefPtr< LangSet > lsb)
 check langset subset relation More...
 
RefPtr< LangSetcopy ()
 copy a langset object More...
 
RefPtr< LangSetcreatUnion (const RefPtr< LangSet > b)
 Add langsets. More...
 
bool del (const Char8_t *lang)
 delete a language from a langset More...
 
void destroy ()
 destroy a langset object More...
 
bool equal (const RefPtr< LangSet > lsb)
 test for matching langsets More...
 
RefPtr< StrSetgetLangs ()
 Get list of languages. More...
 
Char32_t hash ()
 return a hash value for a langset More...
 
LangResult_t hasLang (const Char8_t *lang)
 test langset for language support More...
 
LangSetDelegateoperator-> ()
 
const LangSetDelegateoperator-> () const
 
RefPtr< LangSetsubtract (const RefPtr< LangSet > b)
 Subtract langsets. More...
 

Private Member Functions

 LangSetDelegate (FcLangSet *ptr)
 wrap constructor More...
 
 LangSetDelegate (const LangSetDelegate &other)
 not copy-constructable More...
 
LangSetDelegateoperator= (const LangSetDelegate &other)
 not assignable More...
 

Private Attributes

FcLangSet * m_ptr
 

Friends

class RefPtr< LangSet >
 

Detailed Description

An LangSet is an abstract type that holds the set of languages supported by a font.

Operations to build and compare these sets are provided. These are computed for a font based on orthographic information built into the fontconfig library. Fontconfig has orthographies for all of the ISO 639-1 languages except for MS, NA, PA, PS, QU, RN, RW, SD, SG, SN, SU and ZA. If you have orthographic information for any of these languages, please submit them.

Definition at line 49 of file LangSet.h.

Constructor & Destructor Documentation

fontconfig::LangSetDelegate::LangSetDelegate ( FcLangSet *  ptr)
inlineexplicitprivate

wrap constructor

wraps the pointer with this interface, does nothing else, only called by RefPtr<Atomic>

Definition at line 59 of file LangSet.h.

fontconfig::LangSetDelegate::LangSetDelegate ( const LangSetDelegate other)
private

not copy-constructable

Member Function Documentation

bool fontconfig::LangSetDelegate::add ( const Char8_t lang)

add a language to a langset

lang is added to ls. lang should be of the form Ll-Tt where Ll is a two or three letter language from ISO 639 and Tt is a territory from ISO 3166.

LangResult_t fontconfig::LangSetDelegate::compare ( const RefPtr< LangSet lsb)

compare language sets

FcLangSetCompare compares language coverage for ls_a and ls_b. If they share any language and territory pair, this function returns FcLangEqual. If they share a language but differ in which territory that language is for, this function returns FcLangDifferentTerritory. If they share no languages in common, this function returns FcLangDifferentLang.

bool fontconfig::LangSetDelegate::contains ( const RefPtr< LangSet lsb)

check langset subset relation

FcLangSetContains returns FcTrue if ls_a contains every language in ls_b. ls_a will 'contain' a language from ls_b if ls_a has exactly the language, or either the language or ls_a has no territory.

RefPtr<LangSet> fontconfig::LangSetDelegate::copy ( )

copy a langset object

FcLangSetCopy creates a new FcLangSet object and populates it with the contents of ls.

RefPtr<LangSet> fontconfig::LangSetDelegate::creatUnion ( const RefPtr< LangSet b)

Add langsets.

Returns a set including only those languages found in either ls_a or ls_b.

bool fontconfig::LangSetDelegate::del ( const Char8_t lang)

delete a language from a langset

lang is removed from ls. lang should be of the form Ll-Tt where Ll is a two or three letter language from ISO 639 and Tt is a territory from ISO 3166.

void fontconfig::LangSetDelegate::destroy ( )

destroy a langset object

FcLangSetDestroy destroys a FcLangSet object, freeing all memory associated with it.

bool fontconfig::LangSetDelegate::equal ( const RefPtr< LangSet lsb)

test for matching langsets

Returns FcTrue if and only if ls_a supports precisely the same language and territory combinations as ls_b.

RefPtr<StrSet> fontconfig::LangSetDelegate::getLangs ( )

Get list of languages.

Char32_t fontconfig::LangSetDelegate::hash ( )

return a hash value for a langset

This function returns a value which depends solely on the languages supported by ls. Any language which equals ls will have the same result from FcLangSetHash. However, two langsets with the same hash value may not be equal.

LangResult_t fontconfig::LangSetDelegate::hasLang ( const Char8_t lang)

test langset for language support

FcLangSetHasLang checks whether ls supports lang. If ls has a matching language and territory pair, this function returns FcLangEqual. If ls has a matching language but differs in which territory that language is for, this function returns FcLangDifferentTerritory. If ls has no matching language, this function returns FcLangDifferentLang.

LangSetDelegate* fontconfig::LangSetDelegate::operator-> ( )
inline

Definition at line 72 of file LangSet.h.

const LangSetDelegate* fontconfig::LangSetDelegate::operator-> ( ) const
inline

Definition at line 73 of file LangSet.h.

LangSetDelegate& fontconfig::LangSetDelegate::operator= ( const LangSetDelegate other)
private

not assignable

RefPtr<LangSet> fontconfig::LangSetDelegate::subtract ( const RefPtr< LangSet b)

Subtract langsets.

Returns a set including only those languages found in ls_a but not in ls_b.

Friends And Related Function Documentation

friend class RefPtr< LangSet >
friend

Definition at line 70 of file LangSet.h.

Member Data Documentation

FcLangSet* fontconfig::LangSetDelegate::m_ptr
private

Definition at line 52 of file LangSet.h.


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