libebook::PDBParser Class Reference

#include <PDBParser.h>

Inheritance diagram for libebook::PDBParser:
libebook::PDXParser

Public Member Functions

 PDBParser (librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *document=0)
 
virtual ~PDBParser ()
 
- Public Member Functions inherited from libebook::PDXParser
virtual ~PDXParser ()=0
 
bool parse ()
 Parse input and produce output to document. More...
 

Static Public Member Functions

static bool checkType (unsigned type, unsigned creator)
 

Private Member Functions

 PDBParser (const PDBParser &)
 
PDBParseroperator= (const PDBParser &)
 
virtual void readAppInfoRecord (librevenge::RVNGInputStream *record)
 
virtual void readSortInfoRecord (librevenge::RVNGInputStream *record)
 
virtual void readIndexRecord (librevenge::RVNGInputStream *record)
 
virtual void readDataRecord (librevenge::RVNGInputStream *record, bool last)
 
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. More...
 
bool m_openedDocument
 
EBOOKCharsetConverterm_converter
 

Additional Inherited Members

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

Constructor & Destructor Documentation

libebook::PDBParser::PDBParser ( const PDBParser )
private
libebook::PDBParser::PDBParser ( librevenge::RVNGInputStream *  input,
librevenge::RVNGTextInterface *  document = 0 
)
explicit
libebook::PDBParser::~PDBParser ( )
virtual

Member Function Documentation

bool libebook::PDBParser::checkType ( unsigned  type,
unsigned  creator 
)
static
void libebook::PDBParser::closeDocument ( )
private

Referenced by readDataRecord().

void libebook::PDBParser::closeParagraph ( bool  continuing = false)
private

Referenced by closeDocument(), and handleText().

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

Referenced by readDataRecord().

void libebook::PDBParser::handleCharacters ( const char *  text)
private

Referenced by handleText().

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

Referenced by readDataRecord().

void libebook::PDBParser::openDocument ( )
private

Referenced by readDataRecord().

void libebook::PDBParser::openParagraph ( )
private

Referenced by handleText().

PDBParser& libebook::PDBParser::operator= ( const PDBParser )
private
void libebook::PDBParser::readAppInfoRecord ( librevenge::RVNGInputStream *  record)
privatevirtual

Implements libebook::PDXParser.

void libebook::PDBParser::readDataRecord ( librevenge::RVNGInputStream *  record,
bool  last 
)
privatevirtual

Implements libebook::PDXParser.

void libebook::PDBParser::readIndexRecord ( librevenge::RVNGInputStream *  record)
privatevirtual

Implements libebook::PDXParser.

void libebook::PDBParser::readSortInfoRecord ( librevenge::RVNGInputStream *  record)
privatevirtual

Implements libebook::PDXParser.

Member Data Documentation

bool libebook::PDBParser::m_compressed
private

Referenced by readDataRecord(), and readIndexRecord().

EBOOKCharsetConverter* libebook::PDBParser::m_converter
private
bool libebook::PDBParser::m_openedDocument
private
bool libebook::PDBParser::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().

unsigned libebook::PDBParser::m_read
private

Referenced by readDataRecord().

unsigned libebook::PDBParser::m_recordCount
private

Referenced by readIndexRecord().

unsigned libebook::PDBParser::m_recordSize
private

Referenced by readDataRecord(), and readIndexRecord().

unsigned libebook::PDBParser::m_textLength
private

Referenced by readIndexRecord().


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

Generated for libe-book by doxygen 1.8.8