libqxp::QXPContentCollector Class Reference documentation

libqxp::QXPContentCollector Class Reference

`#include <QXPContentCollector.h>`

Inheritance diagram for libqxp::QXPContentCollector:

## Classes
class | CollectedObjectInterface
class | CollectedObject
struct | CollectedPage

## Public Member Functions
| QXPContentCollector (librevenge::RVNGDrawingInterface *painter)
| ~QXPContentCollector ()
void | startDocument () override
void | endDocument () override
void | startPage (const Page &page) override
void | endPage () override
void | collectDocumentProperties (const QXPDocumentProperties &props) override
void | collectLine (const std::shared_ptr< Line > &line) override
void | collectBox (const std::shared_ptr< Box > &box) override
void | collectTextBox (const std::shared_ptr< TextBox > &box) override
void | collectTextPath (const std::shared_ptr< TextPath > &textPath) override
void | collectGroup (const std::shared_ptr< Group > &group) override
void | collectText (const std::shared_ptr< Text > &text, const unsigned linkId) override
Public Member Functions inherited from libqxp::QXPCollector
| QXPCollector ()=default
virtual | ~QXPCollector ()=default

## Private Types
template<typename T>
using | ObjectHandler = std::function<void(const std::shared_ptr<T> &obj, const CollectedPage &)>
template<typename T, typename TThis>
using | ObjectHandlerMember = std::function<void(TThis *, const std::shared_ptr<T> &obj, const CollectedPage &)>

## Private Member Functions
| QXPContentCollector (const QXPContentCollector &other)=delete
QXPContentCollector & | operator= (const QXPContentCollector &other)=delete
CollectedPage & | getInsertionPage (const std::shared_ptr< Object > &obj)
template<typename T>
std::shared_ptr< CollectedObject< T > > | addObject (const std::shared_ptr< T > &obj, const ObjectHandlerMember< T, QXPContentCollector > &handler)
void | draw (bool force=false)
void | collectTextObject (const std::shared_ptr< TextObject > &textObj, CollectedPage &page)
void | updateLinkedTexts ()
bool | hasUnfinishedLinkedTexts ()
void | drawLine (const std::shared_ptr< Line > &line, const CollectedPage &page)
void | drawBox (const std::shared_ptr< Box > &box, const CollectedPage &page)
void | drawRectangle (const std::shared_ptr< Box > &box, const CollectedPage &page)
void | drawOval (const std::shared_ptr< Box > &oval, const CollectedPage &page)
void | drawPolygon (const std::shared_ptr< Box > &polygon, const CollectedPage &page)
void | drawBezierBox (const std::shared_ptr< Box > &box, const CollectedPage &page)
void | drawTextBox (const std::shared_ptr< TextBox > &textbox, const CollectedPage &page)
void | drawTextPath (const std::shared_ptr< TextPath > &textPath, const CollectedPage &page)
void | drawText (const std::shared_ptr< Text > &text, const LinkedTextSettings &linkSettings)
void | drawGroup (const std::shared_ptr< Group > &group, const CollectedPage &page)
void | writeFill (librevenge::RVNGPropertyList &propList, const boost::optional< Fill > &fill)
void | writeFrame (librevenge::RVNGPropertyList &propList, const Frame &frame, const bool runaround, const bool allowHairline=false)

## Private Attributes
librevenge::RVNGDrawingInterface * | m_painter
bool | m_isDocumentStarted
bool | m_isCollectingFacingPage
unsigned | m_currentObjectIndex
std::vector< CollectedPage > | m_unprocessedPages
std::unordered_map< unsigned, std::shared_ptr< Text > > | m_linkTextMap
std::unordered_map< unsigned, std::unordered_map< unsigned, std::shared_ptr< TextObject > > > | m_linkIndexedTextObjectsMap
QXPDocumentProperties | m_docProps

## Member Typedef Documentation

## ◆ ObjectHandler

template<typename T>

using libqxp::QXPContentCollector::ObjectHandler = std::function<void(const std::shared_ptr<T> &obj, const CollectedPage &)>
| private

## ◆ ObjectHandlerMember

template<typename T, typename TThis>

using libqxp::QXPContentCollector::ObjectHandlerMember = std::function<void(TThis *, const std::shared_ptr<T> &obj, const CollectedPage &)>
| private

## Constructor & Destructor Documentation

## ◆ QXPContentCollector() [1/2]

libqxp::QXPContentCollector::QXPContentCollector | ( | const QXPContentCollector & | other | ) |
| privatedelete

Referenced by operator=(), and QXPContentCollector().

## ◆ QXPContentCollector() [2/2]

libqxp::QXPContentCollector::QXPContentCollector | ( | librevenge::RVNGDrawingInterface * | painter | ) |

## ◆ ~QXPContentCollector()

libqxp::QXPContentCollector::~QXPContentCollector | ( |  | ) |

## Member Function Documentation

## ◆ addObject()

template<typename T>

std::shared_ptr< CollectedObject< T > > libqxp::QXPContentCollector::addObject | ( | const std::shared_ptr< T > & | obj,
|  | const ObjectHandlerMember< T, QXPContentCollector > & | handler )
| inlineprivate

Referenced by collectBox(), collectGroup(), collectLine(), collectTextBox(), and collectTextPath().

## ◆ collectBox()

void libqxp::QXPContentCollector::collectBox | ( | const std::shared_ptr< Box > & | box | ) |
| overridevirtual

Reimplemented from libqxp::QXPCollector.

## ◆ collectDocumentProperties()

void libqxp::QXPContentCollector::collectDocumentProperties | ( | const QXPDocumentProperties & | props | ) |
| overridevirtual

Reimplemented from libqxp::QXPCollector.

## ◆ collectGroup()

void libqxp::QXPContentCollector::collectGroup | ( | const std::shared_ptr< Group > & | group | ) |
| overridevirtual

Reimplemented from libqxp::QXPCollector.

## ◆ collectLine()

void libqxp::QXPContentCollector::collectLine | ( | const std::shared_ptr< Line > & | line | ) |
| overridevirtual

Reimplemented from libqxp::QXPCollector.

## ◆ collectText()

void libqxp::QXPContentCollector::collectText | ( | const std::shared_ptr< Text > & | text,
|  | const unsigned | linkId )
| overridevirtual

Reimplemented from libqxp::QXPCollector.

## ◆ collectTextBox()

void libqxp::QXPContentCollector::collectTextBox | ( | const std::shared_ptr< TextBox > & | box | ) |
| overridevirtual

Reimplemented from libqxp::QXPCollector.

## ◆ collectTextObject()

void libqxp::QXPContentCollector::collectTextObject | ( | const std::shared_ptr< TextObject > & | textObj,
|  | CollectedPage & | page )
| private

Referenced by collectTextBox(), and collectTextPath().

## ◆ collectTextPath()

void libqxp::QXPContentCollector::collectTextPath | ( | const std::shared_ptr< TextPath > & | textPath | ) |
| overridevirtual

Reimplemented from libqxp::QXPCollector.

## ◆ draw()

void libqxp::QXPContentCollector::draw | ( | bool | force = false | ) |
| private

Referenced by endDocument(), and endPage().

## ◆ drawBezierBox()

void libqxp::QXPContentCollector::drawBezierBox | ( | const std::shared_ptr< Box > & | box,
|  | const CollectedPage & | page )
| private

Referenced by drawBox().

## ◆ drawBox()

void libqxp::QXPContentCollector::drawBox | ( | const std::shared_ptr< Box > & | box,
|  | const CollectedPage & | page )
| private

Referenced by collectBox(), and drawTextBox().

## ◆ drawGroup()

void libqxp::QXPContentCollector::drawGroup | ( | const std::shared_ptr< Group > & | group,
|  | const CollectedPage & | page )
| private

Referenced by collectGroup().

## ◆ drawLine()

void libqxp::QXPContentCollector::drawLine | ( | const std::shared_ptr< Line > & | line,
|  | const CollectedPage & | page )
| private

Referenced by collectLine(), and drawTextPath().

## ◆ drawOval()

void libqxp::QXPContentCollector::drawOval | ( | const std::shared_ptr< Box > & | oval,
|  | const CollectedPage & | page )
| private

Referenced by drawBox().

## ◆ drawPolygon()

void libqxp::QXPContentCollector::drawPolygon | ( | const std::shared_ptr< Box > & | polygon,
|  | const CollectedPage & | page )
| private

Referenced by drawBox().

## ◆ drawRectangle()

void libqxp::QXPContentCollector::drawRectangle | ( | const std::shared_ptr< Box > & | box,
|  | const CollectedPage & | page )
| private

Referenced by drawBox().

## ◆ drawText()

void libqxp::QXPContentCollector::drawText | ( | const std::shared_ptr< Text > & | text,
|  | const LinkedTextSettings & | linkSettings )
| private

Referenced by drawTextBox(), and drawTextPath().

## ◆ drawTextBox()

void libqxp::QXPContentCollector::drawTextBox | ( | const std::shared_ptr< TextBox > & | textbox,
|  | const CollectedPage & | page )
| private

Referenced by collectTextBox().

## ◆ drawTextPath()

void libqxp::QXPContentCollector::drawTextPath | ( | const std::shared_ptr< TextPath > & | textPath,
|  | const CollectedPage & | page )
| private

Referenced by collectTextPath().

## ◆ endDocument()

void libqxp::QXPContentCollector::endDocument | ( |  | ) |
| overridevirtual

Reimplemented from libqxp::QXPCollector.

Referenced by libqxp::QXPParser::parse(), and ~QXPContentCollector().

## ◆ endPage()

void libqxp::QXPContentCollector::endPage | ( |  | ) |
| overridevirtual

Reimplemented from libqxp::QXPCollector.

Referenced by endDocument().

## ◆ getInsertionPage()

QXPContentCollector::CollectedPage & libqxp::QXPContentCollector::getInsertionPage | ( | const std::shared_ptr< Object > & | obj | ) |
| private

Referenced by addObject(), collectGroup(), collectTextBox(), and collectTextPath().

## ◆ hasUnfinishedLinkedTexts()

bool libqxp::QXPContentCollector::hasUnfinishedLinkedTexts | ( |  | ) |
| private

Referenced by draw().

## ◆ operator=()

QXPContentCollector & libqxp::QXPContentCollector::operator= | ( | const QXPContentCollector & | other | ) |
| privatedelete

## ◆ startDocument()

void libqxp::QXPContentCollector::startDocument | ( |  | ) |
| overridevirtual

Reimplemented from libqxp::QXPCollector.

Referenced by libqxp::QXPParser::parse().

## ◆ startPage()

void libqxp::QXPContentCollector::startPage | ( | const Page & | page | ) |
| overridevirtual

Reimplemented from libqxp::QXPCollector.

## ◆ updateLinkedTexts()

void libqxp::QXPContentCollector::updateLinkedTexts | ( |  | ) |
| private

Referenced by draw().

## ◆ writeFill()

void libqxp::QXPContentCollector::writeFill | ( | librevenge::RVNGPropertyList & | propList,
|  | const boost::optional< Fill > & | fill )
| private

Referenced by drawBezierBox(), drawOval(), drawPolygon(), and drawRectangle().

## ◆ writeFrame()

void libqxp::QXPContentCollector::writeFrame | ( | librevenge::RVNGPropertyList & | propList,
|  | const Frame & | frame,
|  | const bool | runaround,
|  | const bool | allowHairline = false )
| private

Referenced by drawBezierBox(), drawLine(), drawOval(), drawPolygon(), and drawRectangle().

## Member Data Documentation

## ◆ m_currentObjectIndex

unsigned libqxp::QXPContentCollector::m_currentObjectIndex
| private

Referenced by addObject(), QXPContentCollector(), and startPage().

## ◆ m_docProps

QXPDocumentProperties libqxp::QXPContentCollector::m_docProps
| private

Referenced by collectDocumentProperties(), drawText(), and QXPContentCollector().

## ◆ m_isCollectingFacingPage

bool libqxp::QXPContentCollector::m_isCollectingFacingPage
| private

Referenced by getInsertionPage(), QXPContentCollector(), and startPage().

## ◆ m_isDocumentStarted

bool libqxp::QXPContentCollector::m_isDocumentStarted
| private

Referenced by endDocument(), QXPContentCollector(), startDocument(), and ~QXPContentCollector().

## ◆ m_linkIndexedTextObjectsMap

std::unordered_map<unsigned, std::unordered_map<unsigned, std::shared_ptr<TextObject> > > libqxp::QXPContentCollector::m_linkIndexedTextObjectsMap
| private

Referenced by collectText(), collectTextObject(), QXPContentCollector(), and updateLinkedTexts().

## ◆ m_linkTextMap

std::unordered_map<unsigned, std::shared_ptr<Text> > libqxp::QXPContentCollector::m_linkTextMap
| private

Referenced by collectText(), collectTextObject(), and QXPContentCollector().

## ◆ m_painter

librevenge::RVNGDrawingInterface* libqxp::QXPContentCollector::m_painter
| private

Referenced by draw(), drawBezierBox(), drawGroup(), drawLine(), drawOval(), drawPolygon(), drawRectangle(), drawText(), drawTextBox(), drawTextPath(), endDocument(), QXPContentCollector(), and startDocument().

## ◆ m_unprocessedPages

std::vector<CollectedPage> libqxp::QXPContentCollector::m_unprocessedPages
| private

Referenced by draw(), endDocument(), endPage(), getInsertionPage(), hasUnfinishedLinkedTexts(), QXPContentCollector(), startPage(), and updateLinkedTexts().

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

- QXPContentCollector.h
- QXPContentCollector.cpp