STOFFParser Class Referenceabstract

virtual class which defines the ancestor of all main zone parser More...

`#include <STOFFParser.hxx>`

Inheritance diagram for STOFFParser:

## Public Member Functions

virtual | ~STOFFParser ()
| virtual destructor
virtual bool | checkHeader (STOFFHeader *header, bool strict=false)=0
| virtual function used to check if the document header is correct (or not)
int | version () const
| returns the works version
STOFFParserStatePtr | getParserState ()
| returns the parser state
STOFFHeader * | getHeader ()
| returns the header
STOFFInputStreamPtr & | getInput ()
| returns the actual input
STOFFPageSpan const & | getPageSpan () const
| returns the actual page dimension
STOFFPageSpan & | getPageSpan ()
| returns the actual page dimension
STOFFGraphicListenerPtr & | getGraphicListener ()
| returns the graphic listener
STOFFSpreadsheetListenerPtr & | getSpreadsheetListener ()
| returns the spreadsheet listener
STOFFTextListenerPtr & | getTextListener ()
| returns the text listener
libstoff::DebugFile & | ascii ()
| a DebugFile used to write what we recognize when we parse the document

## Protected Member Functions

| STOFFParser (STOFFParserState::Type type, STOFFInputStreamPtr input, STOFFHeader *header)
| constructor (protected)
| STOFFParser (STOFFParserStatePtr &state)
| constructor using a state
void | setVersion (int vers)
| sets the document's version
void | setGraphicListener (STOFFGraphicListenerPtr &listener)
| sets the graphic listener
void | resetGraphicListener ()
| resets the graphic listener
void | setSpreadsheetListener (STOFFSpreadsheetListenerPtr &listener)
| sets the spreadsheet listener
void | resetSpreadsheetListener ()
| resets the spreadsheet listener
void | setTextListener (STOFFTextListenerPtr &listener)
| sets the text listener
void | resetTextListener ()
| resets the text listener
void | setAsciiName (char const *name)
| Debugging: change the default ascii file.
std::string const & | asciiName () const
| return the ascii file name

## Private Member Functions

| STOFFParser (const STOFFParser &)
| private copy constructor: forbidden
STOFFParser & | operator= (const STOFFParser &)
| private operator=: forbidden

## Private Attributes

STOFFParserStatePtr | m_parserState
| the parser state
std::string | m_asciiName
| the debug file name

## Detailed Description

virtual class which defines the ancestor of all main zone parser

## Constructor & Destructor Documentation

## ~STOFFParser()

STOFFParser::~STOFFParser | ( |  | ) |

virtual

virtual destructor

## STOFFParser() [1/3]

STOFFParser::STOFFParser | ( | STOFFParserState::Type | type,
|  | STOFFInputStreamPtr | input,
|  | STOFFHeader * | header )

protected

constructor (protected)

Referenced by operator=(), STOFFGraphicParser::STOFFGraphicParser(), STOFFGraphicParser::STOFFGraphicParser(), STOFFParser(), STOFFSpreadsheetParser::STOFFSpreadsheetParser(), STOFFSpreadsheetParser::STOFFSpreadsheetParser(), STOFFTextParser::STOFFTextParser(), and STOFFTextParser::STOFFTextParser().

## STOFFParser() [2/3]

STOFFParser::STOFFParser | ( | STOFFParserStatePtr & | state | ) |

inline explicit protected

constructor using a state

## STOFFParser() [3/3]

STOFFParser::STOFFParser | ( | const STOFFParser & |  | ) |

private

private copy constructor: forbidden

## Member Function Documentation

## ascii()

libstoff::DebugFile & STOFFParser::ascii | ( |  | ) |

inline

a DebugFile used to write what we recognize when we parse the document

Referenced by SDAParser::parse(), SDAParser::parse(), SDCParser::parse(), SDGParser::parse(), SDWParser::parse(), and SDXParser::parse().

## asciiName()

std::string const & STOFFParser::asciiName | ( |  | ) | const

inline protected

return the ascii file name

## checkHeader()

virtual bool STOFFParser::checkHeader | ( | STOFFHeader * | header,
|  | bool | strict = false )

pure virtual

virtual function used to check if the document header is correct (or not)

Implemented in SDAParser, SDCParser, SDGParser, SDWParser, and SDXParser.

## getGraphicListener()

STOFFGraphicListenerPtr & STOFFParser::getGraphicListener | ( |  | ) |

inline

returns the graphic listener

Referenced by SDAParser::parse(), SDAParser::parse(), SDGParser::parse(), and resetGraphicListener().

## getHeader()

STOFFHeader * STOFFParser::getHeader | ( |  | ) |

inline

returns the header

## getInput()

STOFFInputStreamPtr & STOFFParser::getInput | ( |  | ) |

inline

returns the actual input

Referenced by SDAParser::checkHeader(), SDCParser::checkHeader(), SDGParser::checkHeader(), SDWParser::checkHeader(), SDXParser::checkHeader(), SDAParser::createZones(), SDCParser::createZones(), SDGParser::createZones(), SDWParser::createZones(), SDXParser::createZones(), SDAParser::parse(), SDAParser::parse(), SDCParser::parse(), SDGParser::parse(), SDWParser::parse(), and SDXParser::parse().

## getPageSpan() [1/2]

STOFFPageSpan & STOFFParser::getPageSpan | ( |  | ) |

inline

returns the actual page dimension

## getPageSpan() [2/2]

STOFFPageSpan const & STOFFParser::getPageSpan | ( |  | ) | const

inline

returns the actual page dimension

Referenced by SDAParser::createDocument(), SDAParser::createDocument(), SDCParser::createDocument(), SDGParser::createDocument(), and SDWParser::createDocument().

## getParserState()

STOFFParserStatePtr STOFFParser::getParserState | ( |  | ) |

inline

returns the parser state

Referenced by SDAParser::createDocument(), SDAParser::createDocument(), SDCParser::createDocument(), SDGParser::createDocument(), and SDWParser::createDocument().

## getSpreadsheetListener()

STOFFSpreadsheetListenerPtr & STOFFParser::getSpreadsheetListener | ( |  | ) |

inline

returns the spreadsheet listener

Referenced by resetSpreadsheetListener(), and SDCParser::sendSpreadsheet().

## getTextListener()

STOFFTextListenerPtr & STOFFParser::getTextListener | ( |  | ) |

inline

returns the text listener

Referenced by SDWParser::parse(), and resetTextListener().

## operator=()

STOFFParser & STOFFParser::operator= | ( | const STOFFParser & |  | ) |

private

private operator=: forbidden

## resetGraphicListener()

void STOFFParser::resetGraphicListener | ( |  | ) |

protected

resets the graphic listener

Referenced by SDAParser::parse(), SDAParser::parse(), and SDGParser::parse().

## resetSpreadsheetListener()

void STOFFParser::resetSpreadsheetListener | ( |  | ) |

protected

resets the spreadsheet listener

Referenced by SDCParser::parse().

## resetTextListener()

void STOFFParser::resetTextListener | ( |  | ) |

protected

resets the text listener

Referenced by SDWParser::parse().

## setAsciiName()

void STOFFParser::setAsciiName | ( | char const * | name | ) |

inline protected

Debugging: change the default ascii file.

Referenced by SDXParser::init().

## setGraphicListener()

void STOFFParser::setGraphicListener | ( | STOFFGraphicListenerPtr & | listener | ) |

protected

sets the graphic listener

Referenced by SDAParser::createDocument(), SDAParser::createDocument(), and SDGParser::createDocument().

## setSpreadsheetListener()

void STOFFParser::setSpreadsheetListener | ( | STOFFSpreadsheetListenerPtr & | listener | ) |

protected

sets the spreadsheet listener

Referenced by SDCParser::createDocument().

## setTextListener()

void STOFFParser::setTextListener | ( | STOFFTextListenerPtr & | listener | ) |

protected

sets the text listener

Referenced by SDWParser::createDocument().

## setVersion()

void STOFFParser::setVersion | ( | int | vers | ) |

inline protected

sets the document's version

## version()

int STOFFParser::version | ( |  | ) | const

inline

returns the works version

## Member Data Documentation

## m_asciiName

std::string STOFFParser::m_asciiName

private

the debug file name

Referenced by asciiName(), setAsciiName(), STOFFParser(), and STOFFParser().

## m_parserState

STOFFParserStatePtr STOFFParser::m_parserState

private

the parser state

Referenced by ascii(), getGraphicListener(), getHeader(), getInput(), getPageSpan(), getPageSpan(), getParserState(), getSpreadsheetListener(), getTextListener(), resetGraphicListener(), resetSpreadsheetListener(), resetTextListener(), setGraphicListener(), setSpreadsheetListener(), setTextListener(), setVersion(), STOFFParser(), STOFFParser(), and version().

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

- STOFFParser.hxx
- STOFFParser.cxx