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

`#include <PalmDocParser.h>`

Inheritance diagram for libebook::PalmDocParser:

## Public Member Functions
| PalmDocParser (librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *document=nullptr)
| ~PalmDocParser () 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
| PalmDocParser (const PalmDocParser &)
PalmDocParser & | operator= (const PalmDocParser &)
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) override
void | createConverter (const std::vector< char > &text)
void | openDocument ()
void | closeDocument ()
void | handleText (const std::vector< char > &text)
void | openParagraph ()
void | closeParagraph (bool continuing=false)
void | handleCharacters (const char *text)

## Private Attributes
bool | m_compressed
unsigned | m_textLength
unsigned | m_recordCount
unsigned | m_recordSize
unsigned | m_read
bool | m_openedParagraph
| Signalize that a paragraph is split at record break.
bool | m_openedDocument
std::unique_ptr< EBOOKCharsetConverter > | m_converter

## 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.

## Constructor & Destructor Documentation

## ◆ PalmDocParser() [1/2]

libebook::PalmDocParser::PalmDocParser | ( | const PalmDocParser & |  | ) |
| private

## ◆ PalmDocParser() [2/2]

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

## ◆ ~PalmDocParser()

libebook::PalmDocParser::~PalmDocParser | ( |  | ) |
| override

## Member Function Documentation

## ◆ checkType()

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

## ◆ closeDocument()

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

Referenced by readDataRecord().

## ◆ closeParagraph()

void libebook::PalmDocParser::closeParagraph | ( | bool | continuing = `false` | ) |
| private

Referenced by closeDocument(), and handleText().

## ◆ createConverter()

void libebook::PalmDocParser::createConverter | ( | const std::vector< char > & | text | ) |
| private

Referenced by readDataRecord().

## ◆ handleCharacters()

void libebook::PalmDocParser::handleCharacters | ( | const char * | text | ) |
| private

Referenced by handleText().

## ◆ handleText()

void libebook::PalmDocParser::handleText | ( | const std::vector< char > & | text | ) |
| private

Referenced by readDataRecord().

## ◆ openDocument()

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

Referenced by readDataRecord().

## ◆ openParagraph()

void libebook::PalmDocParser::openParagraph | ( |  | ) |
| private

Referenced by handleText().

## ◆ operator=()

PalmDocParser & libebook::PalmDocParser::operator= | ( | const PalmDocParser & |  | ) |
| private

## ◆ readAppInfoRecord()

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

Implements libebook::PDBParser.

## ◆ readDataRecord()

void libebook::PalmDocParser::readDataRecord | ( | librevenge::RVNGInputStream * | record,
|  | bool | last
| ) |  |
| override private virtual

Implements libebook::PDBParser.

## ◆ readIndexRecord()

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

Implements libebook::PDBParser.

## ◆ readSortInfoRecord()

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

Implements libebook::PDBParser.

## Member Data Documentation

## ◆ m_compressed

bool libebook::PalmDocParser::m_compressed
| private

Referenced by readDataRecord(), and readIndexRecord().

## ◆ m_converter

std::unique_ptr<EBOOKCharsetConverter> libebook::PalmDocParser::m_converter
| private

Referenced by createConverter(), handleText(), and openDocument().

## ◆ m_openedDocument

bool libebook::PalmDocParser::m_openedDocument
| private

Referenced by closeDocument(), openDocument(), and readDataRecord().

## ◆ m_openedParagraph

bool libebook::PalmDocParser::m_openedParagraph
| private

Signalize that a paragraph is split at record break.

We do not want to open a new paragraph in this case.

NOTE: I do not know if this is actually done. It is quite possible that a record always ends at a paragraph break. But AFAICS there is no prescribed special handling for '
', so this is at least possible.

Referenced by closeDocument(), closeParagraph(), and openParagraph().

## ◆ m_read

unsigned libebook::PalmDocParser::m_read
| private

Referenced by readDataRecord().

## ◆ m_recordCount

unsigned libebook::PalmDocParser::m_recordCount
| private

Referenced by readIndexRecord().

## ◆ m_recordSize

unsigned libebook::PalmDocParser::m_recordSize
| private

Referenced by readDataRecord(), and readIndexRecord().

## ◆ m_textLength

unsigned libebook::PalmDocParser::m_textLength
| private

Referenced by readIndexRecord().

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

- PalmDocParser.h
- PalmDocParser.cpp