GreatWksDBParser Class Reference

the main class to read a GreatWorks database file More...

#include <GreatWksDBParser.hxx>

Inheritance diagram for GreatWksDBParser:
MWAWSpreadsheetParser MWAWParser

List of all members.

Public Member Functions

 GreatWksDBParser (MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
 constructor
virtual ~GreatWksDBParser ()
 destructor
bool checkHeader (MWAWHeader *header, bool strict=false)
 checks if the document header is correct (or not)
void parse (librevenge::RVNGSpreadsheetInterface *documentInterface)
 virtual function used to parse the input

Protected Member Functions

void init ()
 inits all internal variables
void createDocument (librevenge::RVNGSpreadsheetInterface *documentInterface)
 creates the listener which will be associated to the document
bool sendDatabase ()
 try to send the main database
bool sendHF (int id)
 try to send the i^th header/footer
bool createZones ()
 finds the different objects zones
bool readDatabase ()
 read the database block
bool readHeader ()
 try to read the database header: list of zones, ...
bool readFields (MWAWEntry const &zone)
 try to read the fields' zone
bool readField (GreatWksDBParserInternal::Field &field)
 try to read a field
bool readFieldAuxis (MWAWEntry const &zon)
 try to read a field extra v2 zone ( small zone 13)
bool readFieldLinks (GreatWksDBParserInternal::Field &field)
 try to read a zone which links a field to zone record
bool readFieldRecords (GreatWksDBParserInternal::Field &field)
 try to read a list of records corresponding to field
bool readFormLinks (MWAWEntry const &zone)
 try to read the list of form
bool readForm (MWAWEntry const &zone)
 try to read a form zone
bool readRowLinks (GreatWksDBParserInternal::Block &block)
 try to read row record to small zone link (the 1th big zone)
bool readRowRecords (MWAWEntry const &zone)
 try to read a list of records corresponding to a row
bool readRecordList (GreatWksDBParserInternal::Block &block)
 try to read the record list (the 3th big zone)
bool readFreeList (GreatWksDBParserInternal::Block &block)
 try to read the free zone list: 0th big zone
bool readFormula (long endPos, std::vector< MWAWCellContent::FormulaInstruction > &formula)
 try to read a formula result in field definition
bool readFormulaResult (long endPos, GreatWksDBParserInternal::Cell &cell, std::string &extra)
 try to read a formula result in a row content zone
bool readIntList (MWAWEntry const &zone, std::vector< int > &list)
 try to read a int's zone
bool readSmallZone (MWAWEntry const &zone)
 try to read an unknown small zone, ie. a default reader: type, 0, size, N, dSz
bool checkSmallZone (MWAWEntry &zone)
 check if a pointer correspond or not to a small zone entry, if so update the entry
shared_ptr
< GreatWksDBParserInternal::Block
createBlock (GreatWksDBParserInternal::BlockHeader &entry)
 try to create a block corresponding to an entry
bool readBlock (GreatWksDBParserInternal::Block &block, int fieldSize)
 try to read a unknown block, knowing the field size
bool readZone12 (MWAWEntry const &zone)
 try to read the small zone 12(unknown format, maybe some preferences)
bool readBlockHeader2 (GreatWksDBParserInternal::Block &block)
 try to read the 2th big zone (maybe a list of pointers, but I only see a list of 0:recordId )
bool readBlockHeader (GreatWksDBParserInternal::BlockHeader &entry)
 try to read a big block entry

Protected Attributes

shared_ptr
< GreatWksDBParserInternal::State
m_state
 the state
shared_ptr< GreatWksDocumentm_document
 the document

Friends

class GreatWksDBParserInternal::SubDocument

Detailed Description

the main class to read a GreatWorks database file


Constructor & Destructor Documentation

constructor

destructor


Member Function Documentation

bool GreatWksDBParser::checkHeader ( MWAWHeader header,
bool  strict = false 
) [virtual]

checks if the document header is correct (or not)

Implements MWAWParser.

Referenced by parse().

bool GreatWksDBParser::checkSmallZone ( MWAWEntry zone) [protected]

check if a pointer correspond or not to a small zone entry, if so update the entry

Referenced by readFormLinks(), and readHeader().

try to create a block corresponding to an entry

Referenced by createZones(), and readFieldRecords().

void GreatWksDBParser::createDocument ( librevenge::RVNGSpreadsheetInterface *  documentInterface) [protected]

creates the listener which will be associated to the document

Referenced by parse().

bool GreatWksDBParser::createZones ( ) [protected]

finds the different objects zones

Referenced by parse().

void GreatWksDBParser::init ( ) [protected]

inits all internal variables

Referenced by GreatWksDBParser().

void GreatWksDBParser::parse ( librevenge::RVNGSpreadsheetInterface *  documentInterface) [virtual]

virtual function used to parse the input

Implements MWAWSpreadsheetParser.

bool GreatWksDBParser::readBlock ( GreatWksDBParserInternal::Block block,
int  fieldSize 
) [protected]

try to read a unknown block, knowing the field size

try to read a big block entry

Referenced by checkHeader(), readFieldLinks(), and readHeader().

try to read the 2th big zone (maybe a list of pointers, but I only see a list of 0:recordId )

Referenced by createZones().

bool GreatWksDBParser::readDatabase ( ) [protected]

read the database block

Referenced by createZones().

try to read a field

Referenced by readFields().

bool GreatWksDBParser::readFieldAuxis ( MWAWEntry const &  zon) [protected]

try to read a field extra v2 zone ( small zone 13)

Referenced by readDatabase().

try to read a zone which links a field to zone record

Referenced by readDatabase().

try to read a list of records corresponding to field

Referenced by readDatabase().

bool GreatWksDBParser::readFields ( MWAWEntry const &  zone) [protected]

try to read the fields' zone

Referenced by readDatabase().

bool GreatWksDBParser::readForm ( MWAWEntry const &  zone) [protected]

try to read a form zone

Referenced by readFormLinks().

bool GreatWksDBParser::readFormLinks ( MWAWEntry const &  zone) [protected]

try to read the list of form

Referenced by createZones().

bool GreatWksDBParser::readFormula ( long  endPos,
std::vector< MWAWCellContent::FormulaInstruction > &  formula 
) [protected]

try to read a formula result in field definition

Referenced by readFields().

bool GreatWksDBParser::readFormulaResult ( long  endPos,
GreatWksDBParserInternal::Cell cell,
std::string &  extra 
) [protected]

try to read a formula result in a row content zone

Note:
: we fill the cell content, which can overidden later if we find a formula to associate with the cell

Referenced by readRowRecords().

try to read the free zone list: 0th big zone

Referenced by createZones().

bool GreatWksDBParser::readHeader ( ) [protected]

try to read the database header: list of zones, ...

Referenced by createZones().

bool GreatWksDBParser::readIntList ( MWAWEntry const &  zone,
std::vector< int > &  list 
) [protected]

try to read a int's zone

Referenced by createZones().

try to read the record list (the 3th big zone)

Referenced by createZones().

try to read row record to small zone link (the 1th big zone)

Referenced by createZones().

bool GreatWksDBParser::readRowRecords ( MWAWEntry const &  zone) [protected]

try to read a list of records corresponding to a row

Referenced by readDatabase().

bool GreatWksDBParser::readSmallZone ( MWAWEntry const &  zone) [protected]

try to read an unknown small zone, ie. a default reader: type, 0, size, N, dSz

Referenced by createZones(), and readDatabase().

bool GreatWksDBParser::readZone12 ( MWAWEntry const &  zone) [protected]

try to read the small zone 12(unknown format, maybe some preferences)

Referenced by createZones().

bool GreatWksDBParser::sendDatabase ( ) [protected]

try to send the main database

Referenced by parse().

bool GreatWksDBParser::sendHF ( int  id) [protected]

try to send the i^th header/footer

Referenced by GreatWksDBParserInternal::SubDocument::parse().


Friends And Related Function Documentation


Member Data Documentation


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