pdfobjects::TextSimpleOperator Class Reference

#include <pdfoperators.h>

Inheritance diagram for pdfobjects::TextSimpleOperator:
pdfobjects::SimpleGenericOperator pdfobjects::PdfOperator ListItem< PdfOperator >

List of all members.

Classes

class  FontData

Public Member Functions

 TextSimpleOperator (const char *opTxt, const size_t numOper, Operands &opers)
 TextSimpleOperator (const std::string &opTxt, Operands &opers)
virtual ~TextSimpleOperator ()
virtual void getRawText (std::string &str) const
void setRawText (std::string &str)
virtual void getFontText (std::string &str) const
void setFontData (GfxFont *gfxFont)
const char * getFontName () const

Protected Member Functions

GfxFont * getCurrentFont () const

Private Attributes

FontDatafontData

Detailed Description

Text dedicated operator class. This class represents those text operators which contains text to be displayed. This is necessary, because text string stored in operator's operands is not the same as the displayed one in general and may be affected by font encoding.
Use getFontText method to retreive text from text operator filtered through its font code maps.


Constructor & Destructor Documentation

pdfobjects::TextSimpleOperator::TextSimpleOperator ( const char *  opTxt,
const size_t  numOper,
Operands opers 
) [inline]
pdfobjects::TextSimpleOperator::TextSimpleOperator ( const std::string &  opTxt,
Operands opers 
) [inline]
pdfobjects::TextSimpleOperator::~TextSimpleOperator (  )  [virtual]

References fontData.


Member Function Documentation

GfxFont * pdfobjects::TextSimpleOperator::getCurrentFont (  )  const [protected]

Finds current font for operator from fontName. Uses resources from content stream to retriev font by name. Returned instance must not be deallocated by caller.

Returns:
Font instance for this operator.

References debug::DBG_ERR, fontData, pdfobjects::PdfOperator::getContentStream(), pdfobjects::TextSimpleOperator::FontData::getFontName(), pdfobjects::TextSimpleOperator::FontData::getFontTag(), and utilsPrintDbg.

Referenced by getFontText().

const char * pdfobjects::TextSimpleOperator::getFontName (  )  const

Returns font name for this operator. May return null if setFontData hasn't been called yet.

Returns:
Font name or NULL if not initialized yet.

References fontData, and pdfobjects::TextSimpleOperator::FontData::getFontName().

void pdfobjects::TextSimpleOperator::getFontText ( std::string &  str  )  const [virtual]

Returns string represented by this text operator converted according the font encoding.

Parameters:
str String to be set.

References debug::DBG_INFO, fontData, getCurrentFont(), pdfobjects::TextSimpleOperator::FontData::getFontName(), getRawText(), and utilsPrintDbg.

Referenced by gui::QSPdfOperator::getEncodedText().

void pdfobjects::TextSimpleOperator::getRawText ( std::string &  str  )  const [virtual]

Returns string represented by this text operator in raw format. Raw format doesn't take care about font used for this operator.

Parameters:
str String to be set.

References debug::DBG_DBG, debug::DBG_WARN, pdfobjects::SimpleGenericOperator::getOperatorName(), pdfobjects::SimpleGenericOperator::getParameters(), pdfobjects::utils::getStringFromIProperty(), pdfobjects::isArray(), pdfobjects::isString(), and utilsPrintDbg.

Referenced by getFontText().

void pdfobjects::TextSimpleOperator::setFontData ( GfxFont *  gfxFont  ) 

Sets font specific stuff. This method should be called from StateUpdater when we do know the current font for this operator.
This method doesn't influence operator itself (or its operands).

Parameters:
gfxFont Xpdf GfxFont instance.

References debug::DBG_ERR, fontData, and utilsPrintDbg.

void pdfobjects::TextSimpleOperator::setRawText ( std::string &  str  ) 

Member Data Documentation

Font data for later identification of associated font

Referenced by getCurrentFont(), getFontName(), getFontText(), setFontData(), and ~TextSimpleOperator().


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