cheshirekow
v0.1.0
|
An CharSet is an abstract type that holds the set of encoded Unicode chars in a font. Operations to build and compare these sets are provided. More...
#include <cpp_fontconfig/CharSet.h>
Public Member Functions | |
bool | addChar (Char32_t ucs4) |
Add a character to a charset. More... | |
Char32_t | count () const |
Count entries in a charset. More... | |
RefPtr< CharSet > | createUnion (const RefPtr< CharSet > &other) |
Add charsets. More... | |
bool | delChar (Char32_t ucs4) |
Remove a character from a charset. More... | |
bool | equal (const RefPtr< CharSet > &other) const |
Compare two charsets. More... | |
Char32_t | firstPage (Char32_t map[MAP_SIZE], Char32_t *next) |
Start enumerating charset contents. More... | |
bool | hasChar (Char32_t ucs4) const |
Check a charset for a char. More... | |
RefPtr< CharSet > | intersect (const RefPtr< CharSet > &other) |
Intersect charsets. More... | |
Char32_t | intersectCount (const RefPtr< CharSet > &other) |
Intersect and count charsets. More... | |
bool | isSubset (const RefPtr< CharSet > &other) const |
Test for charset inclusion. More... | |
bool | merge (const RefPtr< CharSet > &other, bool &changed) |
Merge charsets. More... | |
bool | merge (const RefPtr< CharSet > &other) |
Char32_t | nextPage (Char32_t map[MAP_SIZE], Char32_t *next) |
Continue enumerating charset contents. More... | |
CharSetDelegate * | operator-> () |
const CharSetDelegate * | operator-> () const |
RefPtr< CharSet > | subtract (const RefPtr< CharSet > &other) |
Subtract charsets. More... | |
Char32_t | subtractCount (const RefPtr< CharSet > &other) |
Subtract and count charsets. More... | |
Static Public Attributes | |
static const unsigned int | MAP_SIZE = 256/32 |
Private Member Functions | |
CharSetDelegate (FcCharSet *ptr) | |
wrap constructor More... | |
CharSetDelegate (const CharSetDelegate &other) | |
not copy-constructable More... | |
CharSetDelegate & | operator= (const CharSetDelegate &other) |
not assignable More... | |
Private Attributes | |
FcCharSet * | m_ptr |
Friends | |
class | RefPtr< CharSet > |
An CharSet is an abstract type that holds the set of encoded Unicode chars in a font. Operations to build and compare these sets are provided.
The underlying FcCharSet object is reference counted, so this CharSet wrapper provides a copy constructor which increments the reference count, and a destructor which decrements the reference count
|
inlineexplicitprivate |
|
private |
not copy-constructable
bool fontconfig::CharSetDelegate::addChar | ( | Char32_t | ucs4 | ) |
Add a character to a charset.
FcCharSetAddChar adds a single Unicode char to the set, returning FcFalse on failure, either as a result of a constant set or from running out of memory.
Char32_t fontconfig::CharSetDelegate::count | ( | ) | const |
Count entries in a charset.
Returns the total number of Unicode chars in a.
Add charsets.
Returns a set including only those chars found in either a or b.
bool fontconfig::CharSetDelegate::delChar | ( | Char32_t | ucs4 | ) |
Remove a character from a charset.
FcCharSetDelChar deletes a single Unicode char from the set, returning FcFalse on failure, either as a result of a constant set or from running out of memory.
Compare two charsets.
Returns whether a and b contain the same set of Unicode chars.
Start enumerating charset contents.
Builds an array of bits marking the first page of Unicode coverage of a. Returns the base of the array. next contains the next page in the font.
bool fontconfig::CharSetDelegate::hasChar | ( | Char32_t | ucs4 | ) | const |
Check a charset for a char.
Returns whether fcs contains the char ucs4.
Intersect charsets.
Returns a set including only those chars found in both a and b.
Intersect and count charsets.
Returns the number of chars that are in both a and b.
Test for charset inclusion.
Returns whether a is a subset of b.
Merge charsets.
Adds all chars in b to a. In other words, this is an in-place version of FcCharSetUnion. If changed is not NULL, then it returns whether any new chars from b were added to a. Returns FcFalse on failure, either when a is a constant set or from running out of memory.
Continue enumerating charset contents.
Builds an array of bits marking the Unicode coverage of a for page *next. Returns the base of the array. next contains the next page in the font.
|
inline |
|
inline |
|
private |
not assignable
Subtract charsets.
Returns a set including only those chars found in a but not b.
Subtract and count charsets.
Returns the number of chars that are in a but not in b.
|
static |