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

`#include <BBeBParser.h>`

## Classes
struct | BBeBIndexEntry

## Public Member Functions
| BBeBParser (librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *document)
| ~BBeBParser ()
bool | parse ()

## Static Public Member Functions
static bool | isSupported (librevenge::RVNGInputStream *input)

## Private Types
enum | ObjectType { OBJECT_TYPE_UNSPECIFIED = 0x0 , OBJECT_TYPE_PAGE_TREE = 0x1 , OBJECT_TYPE_PAGE = 0x2 , OBJECT_TYPE_HEADER = 0x3 , OBJECT_TYPE_FOOTER = 0x4 , OBJECT_TYPE_PAGE_ATR = 0x5 , OBJECT_TYPE_BLOCK = 0x6 , OBJECT_TYPE_BLOCK_ATR = 0x7 , OBJECT_TYPE_MINI_PAGE = 0x8 , OBJECT_TYPE_BLOCK_LIST = 0x9 , OBJECT_TYPE_TEXT = 0xa , OBJECT_TYPE_TEXT_ATR = 0xb , OBJECT_TYPE_IMAGE = 0xc , OBJECT_TYPE_CANVAS = 0xd , OBJECT_TYPE_PARAGRAPH_ATR = 0xe , OBJECT_TYPE_IMAGE_STREAM = 0x11 , OBJECT_TYPE_SoftBookORT = 0x12 , OBJECT_TYPE_BUTTON = 0x13 , OBJECT_TYPE_WINDOW = 0x14 , OBJECT_TYPE_POP_UP_WIN = 0x15 , OBJECT_TYPE_SOUND = 0x16 , OBJECT_TYPE_PLANE_STREAM = 0x17 , OBJECT_TYPE_FONT = 0x19 , OBJECT_TYPE_OBJECT_INFO = 0x1a , OBJECT_TYPE_BOOK_ATR = 0x1c , OBJECT_TYPE_SSoftBookLE_TEXT = 0x1d , OBJECT_TYPE_TOC = 0x1e }
typedef std::map< unsigned, BBeBIndexEntry > | ObjectIndex_t
typedef std::vector< unsigned > | ToC_t

## Private Member Functions
| BBeBParser (const BBeBParser &other)
BBeBParser & | operator= (const BBeBParser &other)
void | readHeader ()
void | readMetadata ()
void | readThumbnail ()
void | readObjectIndex ()
void | readObject (unsigned id, unsigned type=OBJECT_TYPE_UNSPECIFIED)
void | readPageTreeObject (librevenge::RVNGInputStream *object)
void | readPageObject (librevenge::RVNGInputStream *object)
void | readFooterObject (librevenge::RVNGInputStream *object)
void | readHeaderObject (librevenge::RVNGInputStream *object)
void | readPageAtrObject (librevenge::RVNGInputStream *object, unsigned id)
void | readBlockObject (librevenge::RVNGInputStream *object, unsigned id)
void | readBlockAtrObject (librevenge::RVNGInputStream *object, unsigned id)
void | readMiniPageObject (librevenge::RVNGInputStream *object)
void | readBlockListObject (librevenge::RVNGInputStream *object)
void | readTextObject (librevenge::RVNGInputStream *object)
void | readTextAtrObject (librevenge::RVNGInputStream *object, unsigned id)
void | readImageObject (librevenge::RVNGInputStream *object, unsigned id)
void | readCanvasObject (librevenge::RVNGInputStream *object)
void | readParagraphAtrObject (librevenge::RVNGInputStream *object, unsigned id)
void | readImageStreamObject (librevenge::RVNGInputStream *object, unsigned id)
void | readImportObject (librevenge::RVNGInputStream *object)
void | readButtonObject (librevenge::RVNGInputStream *object)
void | readWindowObject (librevenge::RVNGInputStream *object)
void | readPopUpWinObject (librevenge::RVNGInputStream *object)
void | readSoundObject (librevenge::RVNGInputStream *object)
void | readPlaneStreamObject (librevenge::RVNGInputStream *object)
void | readFontObject (librevenge::RVNGInputStream *object)
void | readObjectInfoObject (librevenge::RVNGInputStream *object)
void | readBookAtrObject (librevenge::RVNGInputStream *object)
void | readSimpleTextObject (librevenge::RVNGInputStream *object)
void | readTOCObject (librevenge::RVNGInputStream *object)
void | readToCStream (librevenge::RVNGInputStream *input)
bool | readAttribute (unsigned tag, librevenge::RVNGInputStream *input, BBeBAttributes &attributes)
void | skipUnhandledTag (unsigned tag, librevenge::RVNGInputStream *input, const char *objectType)
bool | isObjectRead (unsigned id) const
double | toInches (unsigned px) const

## Private Attributes
BBeBCollector | m_collector
librevenge::RVNGInputStream * | m_input
std::unique_ptr< BBeBHeader > | m_header
ObjectIndex_t | m_objectIndex
unsigned | m_pageTree
ToC_t | m_toc

## Member Typedef Documentation

## ◆ ObjectIndex_t

typedef std::map<unsigned, BBeBIndexEntry> libebook::BBeBParser::ObjectIndex_t
| private

## ◆ ToC_t

typedef std::vector<unsigned> libebook::BBeBParser::ToC_t
| private

## Member Enumeration Documentation

## ◆ ObjectType

enum libebook::BBeBParser::ObjectType
| private

Enumerator
OBJECT_TYPE_UNSPECIFIED |
OBJECT_TYPE_PAGE_TREE |
OBJECT_TYPE_PAGE |
OBJECT_TYPE_HEADER |
OBJECT_TYPE_FOOTER |
OBJECT_TYPE_PAGE_ATR |
OBJECT_TYPE_BLOCK |
OBJECT_TYPE_BLOCK_ATR |
OBJECT_TYPE_MINI_PAGE |
OBJECT_TYPE_BLOCK_LIST |
OBJECT_TYPE_TEXT |
OBJECT_TYPE_TEXT_ATR |
OBJECT_TYPE_IMAGE |
OBJECT_TYPE_CANVAS |
OBJECT_TYPE_PARAGRAPH_ATR |
OBJECT_TYPE_IMAGE_STREAM |
OBJECT_TYPE_SoftBookORT |
OBJECT_TYPE_BUTTON |
OBJECT_TYPE_WINDOW |
OBJECT_TYPE_POP_UP_WIN |
OBJECT_TYPE_SOUND |
OBJECT_TYPE_PLANE_STREAM |
OBJECT_TYPE_FONT |
OBJECT_TYPE_OBJECT_INFO |
OBJECT_TYPE_BOOK_ATR |
OBJECT_TYPE_SSoftBookLE_TEXT |
OBJECT_TYPE_TOC |

## Constructor & Destructor Documentation

## ◆ BBeBParser() [1/2]

libebook::BBeBParser::BBeBParser | ( | const BBeBParser & | other | ) |
| private

## ◆ BBeBParser() [2/2]

libebook::BBeBParser::BBeBParser | ( | librevenge::RVNGInputStream * | input,
|  | librevenge::RVNGTextInterface * | document )

## ◆ ~BBeBParser()

libebook::BBeBParser::~BBeBParser | ( |  | ) |

## Member Function Documentation

## ◆ isObjectRead()

bool libebook::BBeBParser::isObjectRead | ( | unsigned | id | ) | const
| private

Referenced by readBlockObject(), readImageObject(), readPageObject(), and readTextObject().

## ◆ isSupported()

bool libebook::BBeBParser::isSupported | ( | librevenge::RVNGInputStream * | input | ) |
| static

## ◆ operator=()

BBeBParser & libebook::BBeBParser::operator= | ( | const BBeBParser & | other | ) |
| private

## ◆ parse()

bool libebook::BBeBParser::parse | ( |  | ) |

## ◆ readAttribute()

bool libebook::BBeBParser::readAttribute | ( | unsigned | tag,
|  | librevenge::RVNGInputStream * | input,
|  | BBeBAttributes & | attributes )
| private

Referenced by readBlockAtrObject(), readBlockObject(), readBookAtrObject(), readPageAtrObject(), readPageObject(), readParagraphAtrObject(), readTextAtrObject(), and readTextObject().

## ◆ readBlockAtrObject()

void libebook::BBeBParser::readBlockAtrObject | ( | librevenge::RVNGInputStream * | object,
|  | unsigned | id )
| private

Referenced by readObject().

## ◆ readBlockListObject()

void libebook::BBeBParser::readBlockListObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readBlockObject()

void libebook::BBeBParser::readBlockObject | ( | librevenge::RVNGInputStream * | object,
|  | unsigned | id )
| private

Referenced by readObject().

## ◆ readBookAtrObject()

void libebook::BBeBParser::readBookAtrObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readButtonObject()

void libebook::BBeBParser::readButtonObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readCanvasObject()

void libebook::BBeBParser::readCanvasObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readFontObject()

void libebook::BBeBParser::readFontObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readFooterObject()

void libebook::BBeBParser::readFooterObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readHeader()

void libebook::BBeBParser::readHeader | ( |  | ) |
| private

Referenced by parse().

## ◆ readHeaderObject()

void libebook::BBeBParser::readHeaderObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readImageObject()

void libebook::BBeBParser::readImageObject | ( | librevenge::RVNGInputStream * | object,
|  | unsigned | id )
| private

Referenced by readObject().

## ◆ readImageStreamObject()

void libebook::BBeBParser::readImageStreamObject | ( | librevenge::RVNGInputStream * | object,
|  | unsigned | id )
| private

Referenced by readObject().

## ◆ readImportObject()

void libebook::BBeBParser::readImportObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readMetadata()

void libebook::BBeBParser::readMetadata | ( |  | ) |
| private

Referenced by parse().

## ◆ readMiniPageObject()

void libebook::BBeBParser::readMiniPageObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readObject()

void libebook::BBeBParser::readObject | ( | unsigned | id,
|  | unsigned | type = OBJECT_TYPE_UNSPECIFIED )
| private

Referenced by parse(), readBlockObject(), readBookAtrObject(), readImageObject(), readPageObject(), readPageTreeObject(), and readTextObject().

## ◆ readObjectIndex()

void libebook::BBeBParser::readObjectIndex | ( |  | ) |
| private

Referenced by parse().

## ◆ readObjectInfoObject()

void libebook::BBeBParser::readObjectInfoObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readPageAtrObject()

void libebook::BBeBParser::readPageAtrObject | ( | librevenge::RVNGInputStream * | object,
|  | unsigned | id )
| private

Referenced by readObject().

## ◆ readPageObject()

void libebook::BBeBParser::readPageObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readPageTreeObject()

void libebook::BBeBParser::readPageTreeObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readParagraphAtrObject()

void libebook::BBeBParser::readParagraphAtrObject | ( | librevenge::RVNGInputStream * | object,
|  | unsigned | id )
| private

Referenced by readObject().

## ◆ readPlaneStreamObject()

void libebook::BBeBParser::readPlaneStreamObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readPopUpWinObject()

void libebook::BBeBParser::readPopUpWinObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readSimpleTextObject()

void libebook::BBeBParser::readSimpleTextObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readSoundObject()

void libebook::BBeBParser::readSoundObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readTextAtrObject()

void libebook::BBeBParser::readTextAtrObject | ( | librevenge::RVNGInputStream * | object,
|  | unsigned | id )
| private

Referenced by readObject().

## ◆ readTextObject()

void libebook::BBeBParser::readTextObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readThumbnail()

void libebook::BBeBParser::readThumbnail | ( |  | ) |
| private

Referenced by parse().

## ◆ readTOCObject()

void libebook::BBeBParser::readTOCObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ readToCStream()

void libebook::BBeBParser::readToCStream | ( | librevenge::RVNGInputStream * | input | ) |
| private

Referenced by readTOCObject().

## ◆ readWindowObject()

void libebook::BBeBParser::readWindowObject | ( | librevenge::RVNGInputStream * | object | ) |
| private

Referenced by readObject().

## ◆ skipUnhandledTag()

void libebook::BBeBParser::skipUnhandledTag | ( | unsigned | tag,
|  | librevenge::RVNGInputStream * | input,
|  | const char * | objectType )
| private

Referenced by readBlockAtrObject(), readBlockObject(), readBookAtrObject(), readImageObject(), readImageStreamObject(), readPageAtrObject(), readPageObject(), readParagraphAtrObject(), readTextAtrObject(), readTextObject(), and readTOCObject().

## ◆ toInches()

double libebook::BBeBParser::toInches | ( | unsigned | px | ) | const
| private

## Member Data Documentation

## ◆ m_collector

BBeBCollector libebook::BBeBParser::m_collector
| private

Referenced by parse(), readBlockAtrObject(), readBlockObject(), readBookAtrObject(), readImageObject(), readImageStreamObject(), readMetadata(), readPageAtrObject(), readPageObject(), readParagraphAtrObject(), readTextAtrObject(), and readTextObject().

## ◆ m_header

std::unique_ptr<BBeBHeader> libebook::BBeBParser::m_header
| private

Referenced by parse(), readHeader(), readMetadata(), and readObjectIndex().

## ◆ m_input

librevenge::RVNGInputStream* libebook::BBeBParser::m_input
| private

Referenced by readHeader(), readMetadata(), readObject(), and readObjectIndex().

## ◆ m_objectIndex

ObjectIndex_t libebook::BBeBParser::m_objectIndex
| private

Referenced by isObjectRead(), readObject(), readObjectIndex(), and readToCStream().

## ◆ m_pageTree

unsigned libebook::BBeBParser::m_pageTree
| private

Referenced by readObject(), and readPageObject().

## ◆ m_toc

ToC_t libebook::BBeBParser::m_toc
| private

Referenced by readBlockObject(), and readToCStream().

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

- BBeBParser.h
- BBeBParser.cpp