PoDoFo  0.9.1
Public Member Functions | List of all members
PoDoFo::PdfEncodingDifference Class Reference

#include <PdfDifferenceEncoding.h>

Public Member Functions

 PdfEncodingDifference ()
 
 PdfEncodingDifference (const PdfEncodingDifference &rhs)
 
const PdfEncodingDifferenceoperator= (const PdfEncodingDifference &rhs)
 
void AddDifference (int nCode)
 
void AddDifference (int nCode, const PdfName &rName)
 
bool Contains (int nCode, PdfName &rName, pdf_utf16be &rValue) const
 
void ToArray (PdfArray &rArray)
 
size_t GetCount () const
 

Detailed Description

A helper class for PdfDifferenceEncoding that can be used to create a differences array.

Constructor & Destructor Documentation

§ PdfEncodingDifference() [1/2]

PoDoFo::PdfEncodingDifference::PdfEncodingDifference ( )

Create a PdfEncodingDifference object.

§ PdfEncodingDifference() [2/2]

PoDoFo::PdfEncodingDifference::PdfEncodingDifference ( const PdfEncodingDifference rhs)

Copy a PdfEncodingDifference object.

Member Function Documentation

§ AddDifference() [1/2]

void PoDoFo::PdfEncodingDifference::AddDifference ( int  nCode)

Add a difference to the object.

Parameters
nCodeunicode code point of the difference (0 to 255 are legal values)
See also
AddDifference if you know the name of the code point use the overload below which is faster

§ AddDifference() [2/2]

void PoDoFo::PdfEncodingDifference::AddDifference ( int  nCode,
const PdfName rName 
)

Add a difference to the object.

Parameters
nCodeunicode code point of the difference (0 to 255 are legal values)
rNamename of the different code point or .notdef if none

§ Contains()

bool PoDoFo::PdfEncodingDifference::Contains ( int  nCode,
PdfName rName,
pdf_utf16be &  rValue 
) const

Tests if the specified code is part of the differences.

Parameters
nCodetest if the given code is part of the differences
rNamewrite the associated name into this object if the code is part of the difference
rValuewrite the associated unicode value of the name to this value
Returns
true if the code is part of the difference

§ GetCount()

size_t PoDoFo::PdfEncodingDifference::GetCount ( ) const
inline

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.

Returns
the number of differences in this object

§ operator=()

const PdfEncodingDifference & PoDoFo::PdfEncodingDifference::operator= ( const PdfEncodingDifference rhs)

Copy a PdfEncodingDifference object.

§ ToArray()

void PoDoFo::PdfEncodingDifference::ToArray ( PdfArray &  rArray)

Convert the PdfEncodingDifference to an array

Parameters
rArraywrite to this array