#include <ie_exp_Psion.h>
Public Member Functions | |
IE_Exp_Psion (PD_Document *pDocument) | |
virtual | ~IE_Exp_Psion (void) |
Protected Member Functions | |
virtual UT_Error | _writeDocument (void) |
virtual PL_Psion_Listener * | _constructListener (void)=0 |
Abstract base class for Psion exporters
The actual Word and TextEd exporters are derived from this class. Exporter classes are used to write an AbiWord file to disk. This specific implementation is meant for Psion files. It extends its base class with the _constructListener method, that should return a corresponding listener (a Psion Word listener for Psion Word exporters, and a Psion TextEd listener for Psion TextEd exporters). It also redefines the _writeDocument method, which you do not need to override in the derived classes.
IE_Exp_Psion::IE_Exp_Psion | ( | PD_Document * | pDocument | ) | [inline] |
virtual IE_Exp_Psion::~IE_Exp_Psion | ( | void | ) | [inline, virtual] |
virtual PL_Psion_Listener* IE_Exp_Psion::_constructListener | ( | void | ) | [protected, pure virtual] |
Implemented in IE_Exp_Psion_TextEd, and IE_Exp_Psion_Word.
Referenced by _writeDocument().
UT_Error IE_Exp_Psion::_writeDocument | ( | void | ) | [protected, virtual] |
Write a Psion document to file.
This function writes a document to file. To do this, we must first construct a psiconv_file (a sort of abstract syntax tree of the document) then translate it to a psiconv_buffer (the file in Psion format), and finally write the contents of this buffer to a file. As most of the work is the same for any type of Psion file, we define this method here in the base exporter class. The only thing that is really different between TextEd and Word files is the psiconv_file; so we construct it through the virtual method _createPsionFile.
Implements IE_Exp.
References _constructListener(), PL_Psion_Listener::createPsionFile(), PL_Psion_Listener::finishDocument(), IE_Exp::getDoc(), IE_Exp::m_error, PL_Psion_Listener::startDocument(), PD_Document::tellListener(), UT_ASSERT, UT_SHOULD_NOT_HAPPEN, and IE_Exp::write().