libpagemaker::PMDCollector Class Reference documentation

Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
libpagemaker::PMDCollector Class Reference

Builder class for PMD Documents. More...

`#include <PMDCollector.h>`

## Public Member Functions
| PMDCollector ()
void | setPageWidth (PMDPageUnit)
void | setPageHeight (PMDPageUnit)
void | setDoubleSided (bool)
void | addShapeToPage (unsigned pageID, const boost::shared_ptr< PMDLineSet > &shape)
void | addColor (const PMDColor &color)
void | addFont (const PMDFont &font)
unsigned | addPage ()
void | draw (librevenge::RVNGDrawingInterface *) const

## Private Types
typedef std::vector< boost::shared_ptr< const OutputShape > > | PageShapes_t
typedef std::vector< PageShapes_t > | PageShapesList_t

## Private Member Functions
void | writePage (const PMDPage &, librevenge::RVNGDrawingInterface *, const std::vector< boost::shared_ptr< const OutputShape > > &) const
void | paintShape (const OutputShape &shape, librevenge::RVNGDrawingInterface *) const
void | fillOutputShapesByPage_OneSided (PageShapesList_t &pageShapes) const
void | fillOutputShapesByPage_TwoSided (PageShapesList_t &pageShapes) const
void | fillOutputShapesByPage (PageShapesList_t &pageShapes) const

## Private Attributes
boost::optional< PMDPageUnit > | m_pageWidth
boost::optional< PMDPageUnit > | m_pageHeight
std::vector< PMDPage > | m_pages
std::vector< PMDColor > | m_color
std::vector< PMDFont > | m_font
bool | m_doubleSided

## Detailed Description

Builder class for PMD Documents.

Methods are called by the PMD parser to build the document. This done, the draw() method may be called to output the document to the supplied drawing interface.

## Member Typedef Documentation

## ◆ PageShapes_t

typedef std::vector<boost::shared_ptr<const OutputShape> > libpagemaker::PMDCollector::PageShapes_t
| private

## ◆ PageShapesList_t

typedef std::vector<PageShapes_t> libpagemaker::PMDCollector::PageShapesList_t
| private

## Constructor & Destructor Documentation

## ◆ PMDCollector()

libpagemaker::PMDCollector::PMDCollector | ( |  | ) |

## Member Function Documentation

## ◆ addColor()

void libpagemaker::PMDCollector::addColor | ( | const PMDColor & | color | ) |

Referenced by libpagemaker::PMDParser::parseColors().

## ◆ addFont()

void libpagemaker::PMDCollector::addFont | ( | const PMDFont & | font | ) |

Referenced by libpagemaker::PMDParser::parseFonts().

## ◆ addPage()

unsigned libpagemaker::PMDCollector::addPage | ( |  | ) |

Referenced by libpagemaker::PMDParser::parsePages().

## ◆ addShapeToPage()

void libpagemaker::PMDCollector::addShapeToPage | ( | unsigned | pageID,
|  | const boost::shared_ptr< PMDLineSet > & | shape
| ) |  |

Referenced by libpagemaker::PMDParser::parseBitmap(), libpagemaker::PMDParser::parseEllipse(), libpagemaker::PMDParser::parseLine(), libpagemaker::PMDParser::parsePolygon(), libpagemaker::PMDParser::parseRectangle(), and libpagemaker::PMDParser::parseTextBox().

## ◆ draw()

void libpagemaker::PMDCollector::draw | ( | librevenge::RVNGDrawingInterface * | painter | ) | const

## ◆ fillOutputShapesByPage()

void libpagemaker::PMDCollector::fillOutputShapesByPage | ( | PageShapesList_t & | pageShapes | ) | const
| private

Referenced by draw().

## ◆ fillOutputShapesByPage_OneSided()

void libpagemaker::PMDCollector::fillOutputShapesByPage_OneSided | ( | PageShapesList_t & | pageShapes | ) | const
| private

Referenced by fillOutputShapesByPage().

## ◆ fillOutputShapesByPage_TwoSided()

void libpagemaker::PMDCollector::fillOutputShapesByPage_TwoSided | ( | PageShapesList_t & | pageShapes | ) | const
| private

Referenced by fillOutputShapesByPage().

## ◆ paintShape()

void libpagemaker::PMDCollector::paintShape | ( | const OutputShape & | shape,
|  | librevenge::RVNGDrawingInterface * | painter
| ) |  | const
| private

Referenced by writePage().

## ◆ setDoubleSided()

void libpagemaker::PMDCollector::setDoubleSided | ( | bool | doubleSided | ) |

Referenced by libpagemaker::PMDParser::parseGlobalInfo().

## ◆ setPageHeight()

void libpagemaker::PMDCollector::setPageHeight | ( | PMDPageUnit | pageHeight | ) |

Referenced by libpagemaker::PMDParser::parseGlobalInfo().

## ◆ setPageWidth()

void libpagemaker::PMDCollector::setPageWidth | ( | PMDPageUnit | pageWidth | ) |

Referenced by libpagemaker::PMDParser::parseGlobalInfo(), and libpagemaker::PMDParser::parsePages().

## ◆ writePage()

void libpagemaker::PMDCollector::writePage | ( | const PMDPage & | ,
|  | librevenge::RVNGDrawingInterface * | painter,
|  | const std::vector< boost::shared_ptr< const OutputShape > > & | outputShapes
| ) |  | const
| private

Referenced by draw().

## Member Data Documentation

## ◆ m_color

std::vector<PMDColor> libpagemaker::PMDCollector::m_color
| private

Referenced by addColor(), and paintShape().

## ◆ m_doubleSided

bool libpagemaker::PMDCollector::m_doubleSided
| private

Referenced by fillOutputShapesByPage(), and setDoubleSided().

## ◆ m_font

std::vector<PMDFont> libpagemaker::PMDCollector::m_font
| private

Referenced by addFont(), and paintShape().

## ◆ m_pageHeight

boost::optional<PMDPageUnit> libpagemaker::PMDCollector::m_pageHeight
| private

Referenced by fillOutputShapesByPage_OneSided(), fillOutputShapesByPage_TwoSided(), setPageHeight(), and writePage().

## ◆ m_pages

std::vector<PMDPage> libpagemaker::PMDCollector::m_pages
| private

Referenced by addPage(), addShapeToPage(), draw(), fillOutputShapesByPage_OneSided(), and fillOutputShapesByPage_TwoSided().

## ◆ m_pageWidth

boost::optional<PMDPageUnit> libpagemaker::PMDCollector::m_pageWidth
| private

Referenced by fillOutputShapesByPage_OneSided(), fillOutputShapesByPage_TwoSided(), setPageWidth(), and writePage().

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

- PMDCollector.h
- PMDCollector.cpp