StudentWritingCParser Class Referencefinal

the main class to read a Student Writing Center file More...

`#include <StudentWritingCParser.hxx>`

Inheritance diagram for StudentWritingCParser:

## Public Member Functions
| StudentWritingCParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
| constructor
| ~StudentWritingCParser () final
| destructor
bool | checkHeader (MWAWHeader *header, bool strict=false) final
| checks if the document header is correct (or not)
void | parse (librevenge::RVNGTextInterface *documentInterface) final
| virtual function used to parse the input
Public Member Functions inherited from MWAWTextParser
| ~MWAWTextParser () override
| destructor
Public Member Functions inherited from MWAWParser
virtual | ~MWAWParser ()
| virtual destructor
int | version () const
| returns the works version
MWAWParserStatePtr | getParserState ()
| returns the parser state
MWAWHeader * | getHeader ()
| returns the header
MWAWInputStreamPtr & | getInput ()
| returns the actual input
MWAWListenerPtr | getMainListener ()
| returns the main listener
MWAWGraphicListenerPtr & | getGraphicListener ()
| returns the graphic listener
MWAWPresentationListenerPtr & | getPresentationListener ()
| returns the presentation listener
MWAWSpreadsheetListenerPtr & | getSpreadsheetListener ()
| returns the spreadsheet listener
MWAWTextListenerPtr & | getTextListener ()
| returns the text listener
MWAWFontConverterPtr & | getFontConverter ()
| returns the font converter
MWAWFontManagerPtr & | getFontManager ()
| returns the font manager
MWAWPageSpan const & | getPageSpan () const
| returns the actual page dimension
MWAWPageSpan & | getPageSpan ()
| returns the actual page dimension
double | getFormLength () const
| returns the form length
double | getFormWidth () const
| returns the form width
double | getPageLength () const
| returns the page length (form length without margin )
double | getPageWidth () const
| returns the page width (form width without margin )
MWAWRSRCParserPtr & | getRSRCParser ()
| returns the rsrc parser
libmwaw::DebugFile & | ascii ()
| a DebugFile used to write what we recognize when we parse the document

## Protected Member Functions
void | createDocument (librevenge::RVNGTextInterface *documentInterface)
| creates the listener which will be associated to the document
bool | createZones ()
| finds the different objects zones
bool | readTextZone (StudentWritingCParserInternal::Zone const &zone)
| try to read a text zone with type=1
bool | readFrame (StudentWritingCParserInternal::Zone &zone)
| try to read a frame zone with type=3
bool | readParagraph (StudentWritingCParserInternal::Zone &zone)
| try to read the paragraph zone with type=4
bool | readPicture (StudentWritingCParserInternal::Zone &zone)
| try to read a picture zone with type=6
bool | readFontsList (MWAWEntry const &entry)
| try to read the font list: the first entry of a zone with type=7
bool | readPrintInfo ()
| try to read the printer information
bool | sendZone (int id)
| try to send a zone knowing its id
bool | sendText (StudentWritingCParserInternal::Zone const &zone, StudentWritingCParserInternal::Zone const &parent, bool isMain=false)
| try to send the text(s) corresponding to a zone of type 5
bool | sendPicture (MWAWPosition const &pos, int id)
| try to send a picture: type 6
MWAWInputStreamPtr | decode ()
| low level: try to uncompress the different compressed zone
Protected Member Functions inherited from MWAWTextParser
| MWAWTextParser (MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
| constructor (protected)
| MWAWTextParser (MWAWParserStatePtr const &state)
| constructor using a state
Protected Member Functions inherited from MWAWParser
| MWAWParser (MWAWParserState::Type type, MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
| constructor (protected)
| MWAWParser (MWAWParserStatePtr const &state)
| constructor using a state
void | setVersion (int vers)
| sets the document's version
void | setGraphicListener (MWAWGraphicListenerPtr &listener)
| sets the graphic listener
void | resetGraphicListener ()
| resets the listener
void | setPresentationListener (MWAWPresentationListenerPtr &listener)
| sets the presentation listener
void | resetPresentationListener ()
| resets the listener
void | setSpreadsheetListener (MWAWSpreadsheetListenerPtr &listener)
| sets the spreadsheet listener
void | resetSpreadsheetListener ()
| resets the listener
void | setTextListener (MWAWTextListenerPtr &listener)
| sets the text listener
void | resetTextListener ()
| resets the listener
void | setAsciiName (char const *name)
| Debugging: change the default ascii file.
std::string const & | asciiName () const
| return the ascii file name

## Protected Attributes
std::shared_ptr< StudentWritingCParserInternal::State > | m_state
| the state

## Friends
class | StudentWritingCParserInternal::SubDocument

## Detailed Description

the main class to read a Student Writing Center file

## Constructor & Destructor Documentation

## ◆ StudentWritingCParser()

StudentWritingCParser::StudentWritingCParser | ( | MWAWInputStreamPtr const & | input,
|  | MWAWRSRCParserPtr const & | rsrcParser,
|  | MWAWHeader * | header )

constructor

## ◆ ~StudentWritingCParser()

StudentWritingCParser::~StudentWritingCParser | ( |  | ) |
| final

destructor

## Member Function Documentation

## ◆ checkHeader()

bool StudentWritingCParser::checkHeader | ( | MWAWHeader * | header,
|  | bool | strict = false )
| final virtual

checks if the document header is correct (or not)

Implements MWAWParser.

Referenced by parse(), and StudentWritingCParserInternal::SubDocument.

## ◆ createDocument()

void StudentWritingCParser::createDocument | ( | librevenge::RVNGTextInterface * | documentInterface | ) |
| protected

creates the listener which will be associated to the document

Referenced by parse(), and StudentWritingCParserInternal::SubDocument.

## ◆ createZones()

bool StudentWritingCParser::createZones | ( |  | ) |
| protected

finds the different objects zones

Referenced by parse(), and StudentWritingCParserInternal::SubDocument.

## ◆ decode()

MWAWInputStreamPtr StudentWritingCParser::decode | ( |  | ) |
| protected

low level: try to uncompress the different compressed zone

Referenced by parse(), and StudentWritingCParserInternal::SubDocument.

## ◆ parse()

void StudentWritingCParser::parse | ( | librevenge::RVNGTextInterface * | documentInterface | ) |
| final virtual

virtual function used to parse the input

Implements MWAWTextParser.

Referenced by StudentWritingCParserInternal::SubDocument.

## ◆ readFontsList()

bool StudentWritingCParser::readFontsList | ( | MWAWEntry const & | entry | ) |
| protected

try to read the font list: the first entry of a zone with type=7

Referenced by createZones(), and StudentWritingCParserInternal::SubDocument.

## ◆ readFrame()

bool StudentWritingCParser::readFrame | ( | StudentWritingCParserInternal::Zone & | zone | ) |
| protected

try to read a frame zone with type=3

Referenced by createZones(), and StudentWritingCParserInternal::SubDocument.

## ◆ readParagraph()

bool StudentWritingCParser::readParagraph | ( | StudentWritingCParserInternal::Zone & | zone | ) |
| protected

try to read the paragraph zone with type=4

Referenced by createZones(), and StudentWritingCParserInternal::SubDocument.

## ◆ readPicture()

bool StudentWritingCParser::readPicture | ( | StudentWritingCParserInternal::Zone & | zone | ) |
| protected

try to read a picture zone with type=6

Referenced by createZones(), and StudentWritingCParserInternal::SubDocument.

## ◆ readPrintInfo()

bool StudentWritingCParser::readPrintInfo | ( |  | ) |
| protected

try to read the printer information

Referenced by createZones(), and StudentWritingCParserInternal::SubDocument.

## ◆ readTextZone()

bool StudentWritingCParser::readTextZone | ( | StudentWritingCParserInternal::Zone const & | zone | ) |
| protected

try to read a text zone with type=1

Referenced by createZones(), and StudentWritingCParserInternal::SubDocument.

## ◆ sendPicture()

bool StudentWritingCParser::sendPicture | ( | MWAWPosition const & | pos,
|  | int | id )
| protected

try to send a picture: type 6

Referenced by sendZone(), and StudentWritingCParserInternal::SubDocument.

## ◆ sendText()

bool StudentWritingCParser::sendText | ( | StudentWritingCParserInternal::Zone const & | zone,
|  | StudentWritingCParserInternal::Zone const & | parent,
|  | bool | isMain = false )
| protected

try to send the text(s) corresponding to a zone of type 5

Referenced by sendZone(), and StudentWritingCParserInternal::SubDocument.

## ◆ sendZone()

bool StudentWritingCParser::sendZone | ( | int | id | ) |
| protected

try to send a zone knowing its id

Referenced by parse(), and StudentWritingCParserInternal::SubDocument.

## Friends And Related Symbol Documentation

## ◆ StudentWritingCParserInternal::SubDocument

friend class StudentWritingCParserInternal::SubDocument
| friend

## Member Data Documentation

## ◆ m_state

std::shared_ptr<StudentWritingCParserInternal::State> StudentWritingCParser::m_state
| protected

the state

Referenced by checkHeader(), createDocument(), createZones(), decode(), parse(), readFontsList(), readFrame(), readTextZone(), sendPicture(), sendText(), sendZone(), and StudentWritingCParser().

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

- StudentWritingCParser.hxx
- StudentWritingCParser.cxx