Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
libebook::PeanutPressParser Class Reference

`#include <PeanutPressParser.h>`

Inheritance diagram for libebook::PeanutPressParser:

## Public Types
typedef std::unordered_map< std::string, std::vector< unsigned char > > | ImageMap_t

## Public Member Functions
| PeanutPressParser (librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *document=nullptr)
| ~PeanutPressParser () override
void | readAppInfoRecord (librevenge::RVNGInputStream *record) override
void | readSortInfoRecord (librevenge::RVNGInputStream *record) override
void | readIndexRecord (librevenge::RVNGInputStream *record) override
void | readDataRecord (librevenge::RVNGInputStream *record, bool last=false) override
void | readDataRecords () override
Public Member Functions inherited from libebook::PDBParser
virtual | ~PDBParser ()=0
bool | parse ()
| Parse input and produce output to document.

## Static Public Member Functions
static bool | checkType (unsigned type, unsigned creator)

## Private Member Functions
void | readText ()
void | readImages ()
void | readImage (librevenge::RVNGInputStream *record, bool verified=false)
void | openDocument ()
void | closeDocument ()

## Private Attributes
std::unique_ptr< PeanutPressHeader > | m_header
ImageMap_t | m_imageMap

## Additional Inherited Members
Protected Member Functions inherited from libebook::PDBParser
| PDBParser (librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *document, unsigned type, unsigned creator)
| Instantiate a parser for a document in Palm Database Format.
librevenge::RVNGTextInterface * | getDocument () const
| Get the document generator used for this parsing run.
const char * | getName () const
librevenge::RVNGInputStream * | getAppInfoRecord () const
| Return a stream for the format's appInfo record, if it is present.
librevenge::RVNGInputStream * | getIndexRecord () const
| Return a stream for the format's index record.
unsigned | getDataRecordCount () const
| Return the number of data records in the document.
librevenge::RVNGInputStream * | getDataRecord (unsigned n) const
| Return a stream for the n-th data record.
librevenge::RVNGInputStream * | getDataRecords () const
| Return a stream for all data records.
librevenge::RVNGInputStream * | getDataRecords (unsigned first, unsigned last) const
| Return a stream for data records in a given range.

## Member Typedef Documentation

## ◆ ImageMap_t

typedef std::unordered_map<std::string, std::vector<unsigned char> > libebook::PeanutPressParser::ImageMap_t

## Constructor & Destructor Documentation

## ◆ PeanutPressParser()

libebook::PeanutPressParser::PeanutPressParser | ( | librevenge::RVNGInputStream * | input,
|  | librevenge::RVNGTextInterface * | document = `nullptr`
| ) |  |
| explicit

## ◆ ~PeanutPressParser()

libebook::PeanutPressParser::~PeanutPressParser | ( |  | ) |
| override

## Member Function Documentation

## ◆ checkType()

bool libebook::PeanutPressParser::checkType | ( | unsigned | type,
|  | unsigned | creator
| ) |  |
| static

## ◆ closeDocument()

void libebook::PeanutPressParser::closeDocument | ( |  | ) |
| private

Referenced by readText().

## ◆ openDocument()

void libebook::PeanutPressParser::openDocument | ( |  | ) |
| private

Referenced by readText().

## ◆ readAppInfoRecord()

void libebook::PeanutPressParser::readAppInfoRecord | ( | librevenge::RVNGInputStream * | record | ) |
| override virtual

Implements libebook::PDBParser.

## ◆ readDataRecord()

void libebook::PeanutPressParser::readDataRecord | ( | librevenge::RVNGInputStream * | record,
|  | bool | last = `false`
| ) |  |
| override virtual

Implements libebook::PDBParser.

## ◆ readDataRecords()

void libebook::PeanutPressParser::readDataRecords | ( |  | ) |
| override virtual

Reimplemented from libebook::PDBParser.

## ◆ readImage()

void libebook::PeanutPressParser::readImage | ( | librevenge::RVNGInputStream * | record,
|  | bool | verified = `false`
| ) |  |
| private

Referenced by readImages().

## ◆ readImages()

void libebook::PeanutPressParser::readImages | ( |  | ) |
| private

Referenced by readDataRecords().

## ◆ readIndexRecord()

void libebook::PeanutPressParser::readIndexRecord | ( | librevenge::RVNGInputStream * | record | ) |
| override virtual

Implements libebook::PDBParser.

## ◆ readSortInfoRecord()

void libebook::PeanutPressParser::readSortInfoRecord | ( | librevenge::RVNGInputStream * | record | ) |
| override virtual

Implements libebook::PDBParser.

## ◆ readText()

void libebook::PeanutPressParser::readText | ( |  | ) |
| private

Referenced by readDataRecords().

## Member Data Documentation

## ◆ m_header

std::unique_ptr<PeanutPressHeader> libebook::PeanutPressParser::m_header
| private

Referenced by readImages(), readIndexRecord(), and readText().

## ◆ m_imageMap

ImageMap_t libebook::PeanutPressParser::m_imageMap
| private

Referenced by readImage(), and readText().

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

- PeanutPressParser.h
- PeanutPressParser.cpp