PoDoFo 1.0.0-dev
|
A helper class for PdfDifferenceEncoding that can be used to create a differences array. More...
#include <PdfDifferenceEncoding.h>
Public Member Functions | |
PdfDifferenceList () | |
Create a PdfEncodingDifference object. | |
PdfDifferenceList (const PdfDifferenceList &rhs)=default | |
PdfDifferenceList & | operator= (const PdfDifferenceList &rhs)=default |
void | AddDifference (unsigned char code, char32_t codePoint) |
Add a difference to the object. | |
void | AddDifference (unsigned char code, const PdfName &name, bool explicitNames=false) |
Add a difference to the object. | |
bool | TryGetMappedName (unsigned char code, const PdfName *&name) const |
Get the mapped code point from a char code. | |
bool | TryGetMappedName (unsigned char code, const PdfName *&name, char32_t &codePoint) const |
void | ToArray (PdfArray &arr) const |
Convert the PdfEncodingDifference to an array. | |
size_t | GetCount () const |
Get the number of differences in this object. | |
const_iterator | begin () const |
const_iterator | end () const |
A helper class for PdfDifferenceEncoding that can be used to create a differences array.
Add a difference to the object.
nCode | unicode code point of the difference (0 to 255 are legal values) |
unicodeValue | actual unicode value for nCode; can be 0 |
void PdfDifferenceList::AddDifference | ( | unsigned char | code, |
const PdfName & | name, | ||
bool | explicitNames = false |
||
) |
Add a difference to the object.
name | unicode code point of the difference (0 to 255 are legal values) |
name | name of the different code point or .notdef if none |
explicitNames | if true, the unicode value is set to nCode as name is meaningless (Type3 fonts) |
size_t PdfDifferenceList::GetCount | ( | ) | const |
Get the number of differences in this object.
If the user added .notdef as a difference it is counted, even it is no real difference in the final encoding.
Convert the PdfEncodingDifference to an array.
arr | write to this array |
Get the mapped code point from a char code.
code | test if the given code is part of the differences |
codePoint | write the associated unicode value of the name to this value |