Public Member Functions | Private Attributes | List of all members
FormulaHandler Class Reference

Node representing a formula. More...

#include <dochandler.h>

Inheritance diagram for FormulaHandler:
BaseHandler< FormulaHandler > QXmlDefaultHandler ElementMapper< FormulaHandler > LocatorContainer IBaseHandler QXmlContentHandler QXmlErrorHandler QXmlDTDHandler QXmlEntityResolver QXmlLexicalHandler QXmlDeclHandler

Public Member Functions

 FormulaHandler (IBaseHandler *parent)
 
virtual ~FormulaHandler ()
 
void startFormula (const QXmlAttributes &attrib)
 
void endFormula ()
 
virtual Kind kind () const
 
virtual const IStringid () const
 
virtual const IStringtext () const
 
- Public Member Functions inherited from BaseHandler< FormulaHandler >
 BaseHandler ()
 
virtual ~BaseHandler ()
 
virtual bool startDocument ()
 
virtual bool startElement (const QString &namespaceURI, const QString &localName, const QString &name, const QXmlAttributes &attrib)
 
virtual bool endElement (const QString &namespaceURI, const QString &localName, const QString &name)
 
bool skippedEntity (const QString &s)
 
virtual bool characters (const QString &ch)
 
void setDelegate (QXmlDefaultHandler *delegate)
 
QXmlDefaultHandlerdelegate () const
 
void setFallBackHandler (IFallBackHandler *h)
 
IFallBackHandlerfallBackHandler () const
 
void setDocumentLocator (QXmlLocator *locator)
 
- Public Member Functions inherited from QXmlDefaultHandler
 QXmlDefaultHandler ()
 
virtual ~QXmlDefaultHandler ()
 
bool endDocument ()
 
bool startPrefixMapping (const QString &prefix, const QString &uri)
 
bool endPrefixMapping (const QString &prefix)
 
bool ignorableWhitespace (const QString &ch)
 
bool processingInstruction (const QString &target, const QString &data)
 
bool warning (const QXmlParseException &exception)
 
bool error (const QXmlParseException &exception)
 
bool fatalError (const QXmlParseException &exception)
 
bool notationDecl (const QString &name, const QString &publicId, const QString &systemId)
 
bool unparsedEntityDecl (const QString &name, const QString &publicId, const QString &systemId, const QString &notationName)
 
bool resolveEntity (const QString &publicId, const QString &systemId, QXmlInputSource *&ret)
 
bool startDTD (const QString &name, const QString &publicId, const QString &systemId)
 
bool endDTD ()
 
bool startCDATA ()
 
bool endCDATA ()
 
bool comment (const QString &ch)
 
bool attributeDecl (const QString &eName, const QString &aName, const QString &type, const QString &valueDefault, const QString &value)
 
bool internalEntityDecl (const QString &name, const QString &value)
 
bool externalEntityDecl (const QString &name, const QString &publicId, const QString &systemId)
 
QString errorString ()
 
- Public Member Functions inherited from QXmlContentHandler
virtual ~QXmlContentHandler ()
 
- Public Member Functions inherited from QXmlErrorHandler
virtual ~QXmlErrorHandler ()
 
- Public Member Functions inherited from QXmlDTDHandler
virtual ~QXmlDTDHandler ()
 
- Public Member Functions inherited from QXmlEntityResolver
virtual ~QXmlEntityResolver ()
 
- Public Member Functions inherited from QXmlLexicalHandler
virtual ~QXmlLexicalHandler ()
 
- Public Member Functions inherited from QXmlDeclHandler
virtual ~QXmlDeclHandler ()
 
- Public Member Functions inherited from ElementMapper< FormulaHandler >
 ElementMapper ()
 
virtual ~ElementMapper ()
 
void addStartHandler (const char *key)
 
void addStartHandler (const char *key, FormulaHandler *obj, void(FormulaHandler::*handler)(const QXmlAttributes &))
 
void addEndHandler (const char *key)
 
void addEndHandler (const char *key, FormulaHandler *obj, void(FormulaHandler::*handler)())
 
- Public Member Functions inherited from IBaseHandler
virtual ~IBaseHandler ()
 

Private Attributes

IBaseHandlerm_parent
 
StringImpl m_id
 
StringImpl m_text
 

Additional Inherited Members

- Public Types inherited from BaseHandler< FormulaHandler >
typedef ElementMapper< FormulaHandler >::StartElementHandlerT StartElementHandlerT
 
typedef ElementMapper< FormulaHandler >::EndElementHandlerT EndElementHandlerT
 
- Public Types inherited from ElementMapper< FormulaHandler >
typedef StartElementHandler StartElementHandlerT
 
typedef EndElementHandler EndElementHandlerT
 
- Static Public Attributes inherited from LocatorContainer
static QXmlLocators_theLocator =0
 
- Protected Attributes inherited from BaseHandler< FormulaHandler >
QString m_curString
 
QString m_skipUntil
 
int m_skipCount
 
QXmlDefaultHandlerm_delegateHandler
 
IFallBackHandlerm_fallBackHandler
 
- Protected Attributes inherited from ElementMapper< FormulaHandler >
QDict< StartElementHandlerTm_startHandlers
 
QDict< EndElementHandlerTm_endHandlers
 

Detailed Description

Node representing a formula.

Definition at line 908 of file dochandler.h.

Constructor & Destructor Documentation

FormulaHandler::FormulaHandler ( IBaseHandler parent)

Definition at line 1280 of file dochandler.cpp.

1281  : m_parent(parent)
1282 {
1283  addEndHandler("formula",this,&FormulaHandler::endFormula);
1284 }
IBaseHandler * m_parent
Definition: dochandler.h:922
void addEndHandler(const char *key)
Definition: basehandler.h:101
FormulaHandler::~FormulaHandler ( )
virtual

Definition at line 1286 of file dochandler.cpp.

1287 {
1288 }

Member Function Documentation

void FormulaHandler::endFormula ( )

Definition at line 1297 of file dochandler.cpp.

1298 {
1299  m_text = m_curString;
1300  debug(2,"formula id=`%s' text=`%s'\n",m_id.data(),m_text.data());
1301  m_parent->setDelegate(0);
1302 }
StringImpl m_text
Definition: dochandler.h:924
const char * data() const
Definition: qstring.h:542
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
IBaseHandler * m_parent
Definition: dochandler.h:922
StringImpl m_id
Definition: dochandler.h:923
virtual const IString* FormulaHandler::id ( ) const
inlinevirtual

Definition at line 918 of file dochandler.h.

918 { return &m_id; }
StringImpl m_id
Definition: dochandler.h:923
virtual Kind FormulaHandler::kind ( ) const
inlinevirtual

Definition at line 917 of file dochandler.h.

917 { return DocImpl::Formula; }
void FormulaHandler::startFormula ( const QXmlAttributes attrib)

Definition at line 1290 of file dochandler.cpp.

1291 {
1292  m_id = attrib.value("id");
1293  m_curString="";
1294  m_parent->setDelegate(this);
1295 }
QString value(int index) const
Definition: qxml.cpp:664
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
IBaseHandler * m_parent
Definition: dochandler.h:922
StringImpl m_id
Definition: dochandler.h:923
virtual const IString* FormulaHandler::text ( ) const
inlinevirtual

Definition at line 919 of file dochandler.h.

919 { return &m_text; }
StringImpl m_text
Definition: dochandler.h:924

Member Data Documentation

StringImpl FormulaHandler::m_id
private

Definition at line 923 of file dochandler.h.

IBaseHandler* FormulaHandler::m_parent
private

Definition at line 922 of file dochandler.h.

StringImpl FormulaHandler::m_text
private

Definition at line 924 of file dochandler.h.


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