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

#include <dochandler.h>

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

Public Member Functions

 TitleHandler (IBaseHandler *parent)
 
virtual ~TitleHandler ()
 
virtual void startTitle (const QXmlAttributes &attrib)
 
virtual void endTitle ()
 
virtual void startRef (const QXmlAttributes &attrib)
 
void addTextNode ()
 
virtual Kind kind () const
 
virtual IDocIteratortitle () const
 
- Public Member Functions inherited from BaseHandler< TitleHandler >
 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< TitleHandler >
 ElementMapper ()
 
virtual ~ElementMapper ()
 
void addStartHandler (const char *key)
 
void addStartHandler (const char *key, TitleHandler *obj, void(TitleHandler::*handler)(const QXmlAttributes &))
 
void addEndHandler (const char *key)
 
void addEndHandler (const char *key, TitleHandler *obj, void(TitleHandler::*handler)())
 
- Public Member Functions inherited from IBaseHandler
virtual ~IBaseHandler ()
 

Private Attributes

IBaseHandlerm_parent
 
QList< DocImplm_children
 
MarkupHandlerm_markupHandler
 

Friends

class TitleIterator
 

Additional Inherited Members

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

Detailed Description

Definition at line 655 of file dochandler.h.

Constructor & Destructor Documentation

TitleHandler::TitleHandler ( IBaseHandler parent)

Definition at line 853 of file dochandler.cpp.

854  : m_parent(parent)
855 {
860  addEndHandler("title",this,&TitleHandler::endTitle);
861 }
virtual void endTitle()
Definition: dochandler.cpp:875
Handles markup commands in the XML input.
Definition: dochandler.h:135
QList< DocImpl > m_children
Definition: dochandler.h:672
IBaseHandler * m_parent
Definition: dochandler.h:671
void setFallBackHandler(IFallBackHandler *h)
Definition: basehandler.h:261
virtual void startRef(const QXmlAttributes &attrib)
Definition: dochandler.cpp:899
void addStartHandler(const char *key)
Definition: basehandler.h:91
void setAutoDelete(bool enable)
Definition: qlist.h:99
MarkupHandler * m_markupHandler
Definition: dochandler.h:673
const bool TRUE
Definition: qglobal.h:371
void addEndHandler(const char *key)
Definition: basehandler.h:101
TitleHandler::~TitleHandler ( )
virtual

Definition at line 863 of file dochandler.cpp.

864 {
865  delete m_markupHandler;
866 }
MarkupHandler * m_markupHandler
Definition: dochandler.h:673

Member Function Documentation

void TitleHandler::addTextNode ( )

Definition at line 882 of file dochandler.cpp.

883 {
884  if (!m_curString.isEmpty())
885  {
887  new TextNode(
888  m_curString,
891  )
892  );
893  debug(2,"addTextNode() text=\"%s\" markup=%x headingLevel=%d\n",
895  m_curString="";
896  }
897 }
bool isEmpty() const
Definition: qstring.h:682
void append(const type *d)
Definition: qlist.h:73
QList< DocImpl > m_children
Definition: dochandler.h:672
int headingLevel() const
Definition: dochandler.h:141
const char * data() const
Definition: qstring.h:542
Node representing a piece of text.
Definition: dochandler.h:86
int markup() const
Definition: dochandler.h:140
MarkupHandler * m_markupHandler
Definition: dochandler.h:673
void TitleHandler::endTitle ( )
virtual

Definition at line 875 of file dochandler.cpp.

876 {
877  addTextNode();
878  m_parent->setDelegate(0);
879  debug(2,"End title\n");
880 }
IBaseHandler * m_parent
Definition: dochandler.h:671
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
void addTextNode()
Definition: dochandler.cpp:882
virtual Kind TitleHandler::kind ( ) const
inlinevirtual

Definition at line 667 of file dochandler.h.

667 { return DocImpl::Title; }
void TitleHandler::startRef ( const QXmlAttributes attrib)
virtual

Definition at line 899 of file dochandler.cpp.

900 {
901  RefHandler *ref = new RefHandler(this);
902  ref->startRef(attrib);
903  m_children.append(ref);
904 }
void append(const type *d)
Definition: qlist.h:73
QList< DocImpl > m_children
Definition: dochandler.h:672
void startRef(const QXmlAttributes &attrib)
Definition: dochandler.cpp:829
void TitleHandler::startTitle ( const QXmlAttributes attrib)
virtual

Definition at line 868 of file dochandler.cpp.

869 {
870  m_parent->setDelegate(this);
871  debug(2,"Start title\n");
872  m_curString="";
873 }
IBaseHandler * m_parent
Definition: dochandler.h:671
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
IDocIterator * TitleHandler::title ( ) const
virtual

Definition at line 906 of file dochandler.cpp.

907 {
908  return new TitleIterator(*this);
909 }
friend class TitleIterator
Definition: dochandler.h:657

Friends And Related Function Documentation

friend class TitleIterator
friend

Definition at line 657 of file dochandler.h.

Member Data Documentation

QList<DocImpl> TitleHandler::m_children
private

Definition at line 672 of file dochandler.h.

MarkupHandler* TitleHandler::m_markupHandler
private

Definition at line 673 of file dochandler.h.

IBaseHandler* TitleHandler::m_parent
private

Definition at line 671 of file dochandler.h.


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