WPSTextParser Class Reference

class used to defined the ancestor of parser which manages the text data More...

#include <WPSTextParser.h>

Inheritance diagram for WPSTextParser:
WPS4Text WPS8Text

List of all members.

Classes

struct  DataFOD
 structure which retrieves data information which correspond to a text position More...

Public Member Functions

virtual ~WPSTextParser ()
 virtual destructor
int version () const
 returns the file version
RVNGInputStreamPtrgetInput ()
 returns the actual input

Protected Types

typedef bool(WPSTextParser::* FDPParser )(long endPos, int &id, std::string &mess)
 callback when a new attribute is found in an FDPP/FDPC entry

Protected Member Functions

 WPSTextParser (WPSParser &parser, RVNGInputStreamPtr &input)
 constructor
std::multimap< std::string,
WPSEntry > & 
getNameEntryMap ()
 returns the map type->entry
std::multimap< std::string,
WPSEntry > const & 
getNameEntryMap () const
 returns the map type->entry
std::vector< DataFODmergeSortedFODLists (std::vector< DataFOD > const &lst1, std::vector< DataFOD > const &lst2) const
 function which takes two sorted list of attribute (by text position).
bool readFDP (WPSEntry const &entry, std::vector< DataFOD > &fods, FDPParser parser)
 parses a FDPP or a FDPC entry (which contains a list of ATTR_TEXT/ATTR_PARAG with their definition ) and adds found data in listFODs
libwps::DebugFileascii ()
 a DebugFile used to write what we recognize when we parse the document

Protected Attributes

int m_version
 the file version
RVNGInputStreamPtr m_input
 the main input
WPSParserm_mainParser
 pointer to the main zone parser;
WPSEntry m_textPositions
 an entry which corresponds to the complete text zone
std::vector< DataFODm_FODList
 the list of a FOD
libwps::DebugFilem_asciiFile
 the ascii file

Private Member Functions

 WPSTextParser (WPSTextParser const &parser)
 private copy constructor: forbidden
WPSTextParseroperator= (WPSTextParser const &parser)
 private copy operator: forbidden

Detailed Description

class used to defined the ancestor of parser which manages the text data


Member Typedef Documentation

typedef bool(WPSTextParser::* WPSTextParser::FDPParser)(long endPos, int &id, std::string &mess) [protected]

callback when a new attribute is found in an FDPP/FDPC entry

Parameters:
endPosdefine the end of the data's zone
messcan be used to add a message in debugFile
Returns:
true and filled id if this attribute can be parsed

Constructor & Destructor Documentation

virtual destructor

WPSTextParser::WPSTextParser ( WPSParser parser,
RVNGInputStreamPtr input 
) [protected]

constructor

WPSTextParser::WPSTextParser ( WPSTextParser const &  parser) [private]

private copy constructor: forbidden


Member Function Documentation

returns the map type->entry

std::vector< WPSTextParser::DataFOD > WPSTextParser::mergeSortedFODLists ( std::vector< DataFOD > const &  lst1,
std::vector< DataFOD > const &  lst2 
) const [protected]

function which takes two sorted list of attribute (by text position).

Returns:
a list of attribute

Referenced by WPS8Text::bmktEndDataParser(), WPS8TextStyle::readStructures(), WPS4Text::readStructures(), and WPS8Text::tokenEndDataParser().

WPSTextParser& WPSTextParser::operator= ( WPSTextParser const &  parser) [private]

private copy operator: forbidden

bool WPSTextParser::readFDP ( WPSEntry const &  entry,
std::vector< DataFOD > &  fods,
WPSTextParser::FDPParser  parser 
) [protected]

parses a FDPP or a FDPC entry (which contains a list of ATTR_TEXT/ATTR_PARAG with their definition ) and adds found data in listFODs

Referenced by WPS8TextStyle::readStructures(), and WPS4Text::readStructures().


Member Data Documentation

the ascii file

Referenced by ascii().

pointer to the main zone parser;

Referenced by getNameEntryMap(), WPS4Text::mainParser(), WPS8Text::mainParser(), and version().

int WPSTextParser::m_version [mutable, protected]

the file version

Referenced by version().


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