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

Node representing a section. More...

#include <dochandler.h>

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

Public Member Functions

 DocSectionHandler (IBaseHandler *parent, int level)
 
virtual ~DocSectionHandler ()
 
virtual void startDocSection (const QXmlAttributes &attrib)
 
virtual void endDocSection ()
 
virtual void startTitle (const QXmlAttributes &attrib)
 
virtual void startSubSection (const QXmlAttributes &attrib)
 
virtual void startParagraph (const QXmlAttributes &attrib)
 
virtual void startInternal (const QXmlAttributes &attrib)
 
virtual Kind kind () const
 
virtual const IStringid () const
 
virtual int level () const
 
virtual IDocTitletitle () const
 
virtual IDocIteratorparagraphs () const
 
virtual IDocIteratorsubSections () const
 
virtual IDocInternalinternal () const
 
- Public Member Functions inherited from BaseHandler< DocSectionHandler >
 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< DocSectionHandler >
 ElementMapper ()
 
virtual ~ElementMapper ()
 
void addStartHandler (const char *key)
 
void addStartHandler (const char *key, DocSectionHandler *obj, void(DocSectionHandler::*handler)(const QXmlAttributes &))
 
void addEndHandler (const char *key)
 
void addEndHandler (const char *key, DocSectionHandler *obj, void(DocSectionHandler::*handler)())
 
- Public Member Functions inherited from IBaseHandler
virtual ~IBaseHandler ()
 

Private Attributes

IBaseHandlerm_parent
 
QList< DocImplm_paragraphs
 
QList< DocImplm_subsections
 
DocInternalHandlerm_internal
 
StringImpl m_id
 
int m_level
 
TitleHandlerm_title
 

Friends

class DocSectionParaIterator
 
class DocSectionSubIterator
 

Additional Inherited Members

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

Detailed Description

Node representing a section.

Definition at line 1221 of file dochandler.h.

Constructor & Destructor Documentation

DocSectionHandler::DocSectionHandler ( IBaseHandler parent,
int  level 
)

Definition at line 2035 of file dochandler.cpp.

2036  : m_parent(parent), m_internal(0), m_level(level), m_title(0)
2037 {
2038  QString sectionKey;
2043  if (level<6)
2044  {
2045  sectionKey.sprintf("sect%d",level+1);
2047  }
2049  sectionKey.sprintf("sect%d",level);
2051 }
QString & sprintf(const char *format,...)
Definition: qstring.cpp:12719
virtual void startSubSection(const QXmlAttributes &attrib)
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
QList< DocImpl > m_paragraphs
Definition: dochandler.h:1246
QList< DocImpl > m_subsections
Definition: dochandler.h:1247
virtual void startParagraph(const QXmlAttributes &attrib)
virtual int level() const
Definition: dochandler.h:1238
DocInternalHandler * m_internal
Definition: dochandler.h:1248
TitleHandler * m_title
Definition: dochandler.h:1251
virtual void startTitle(const QXmlAttributes &attrib)
void addStartHandler(const char *key)
Definition: basehandler.h:91
QCString utf8() const
Definition: qstring.cpp:14507
virtual void startInternal(const QXmlAttributes &attrib)
void setAutoDelete(bool enable)
Definition: qlist.h:99
IBaseHandler * m_parent
Definition: dochandler.h:1245
const bool TRUE
Definition: qglobal.h:371
virtual void endDocSection()
void addEndHandler(const char *key)
Definition: basehandler.h:101
DocSectionHandler::~DocSectionHandler ( )
virtual

Definition at line 2053 of file dochandler.cpp.

2054 {
2055 }

Member Function Documentation

void DocSectionHandler::endDocSection ( )
virtual

Definition at line 2064 of file dochandler.cpp.

2065 {
2066  m_parent->setDelegate(0);
2067  debug(2,"End docsection\n");
2068 }
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
IBaseHandler * m_parent
Definition: dochandler.h:1245
virtual const IString* DocSectionHandler::id ( ) const
inlinevirtual

Definition at line 1237 of file dochandler.h.

1237 { return &m_id; }
StringImpl m_id
Definition: dochandler.h:1249
IDocInternal * DocSectionHandler::internal ( ) const
virtual

Definition at line 2106 of file dochandler.cpp.

2107 {
2108  return m_internal;
2109 }
DocInternalHandler * m_internal
Definition: dochandler.h:1248
virtual Kind DocSectionHandler::kind ( ) const
inlinevirtual

Definition at line 1236 of file dochandler.h.

1236 { return DocImpl::Section; }
virtual int DocSectionHandler::level ( ) const
inlinevirtual

Definition at line 1238 of file dochandler.h.

1238 { return m_level; }
IDocIterator * DocSectionHandler::paragraphs ( ) const
virtual

Definition at line 2096 of file dochandler.cpp.

2097 {
2098  return new DocSectionParaIterator(*this);
2099 }
friend class DocSectionParaIterator
Definition: dochandler.h:1223
void DocSectionHandler::startDocSection ( const QXmlAttributes attrib)
virtual

Definition at line 2057 of file dochandler.cpp.

2058 {
2059  m_parent->setDelegate(this);
2060  debug(2,"Start docsection\n");
2061  m_id = attrib.value("id");
2062 }
QString value(int index) const
Definition: qxml.cpp:664
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
StringImpl m_id
Definition: dochandler.h:1249
IBaseHandler * m_parent
Definition: dochandler.h:1245
void DocSectionHandler::startInternal ( const QXmlAttributes attrib)
virtual

Definition at line 2084 of file dochandler.cpp.

2085 {
2087  m_internal->startInternal(attrib);
2088 }
DocInternalHandler * m_internal
Definition: dochandler.h:1248
virtual void startInternal(const QXmlAttributes &attrib)
void DocSectionHandler::startParagraph ( const QXmlAttributes attrib)
virtual

Definition at line 2077 of file dochandler.cpp.

2078 {
2079  ParagraphHandler *parHandler = new ParagraphHandler(this);
2080  parHandler->startParagraph(attrib);
2081  m_paragraphs.append(parHandler);
2082 }
void append(const type *d)
Definition: qlist.h:73
Node representing a paragraph of text and commands.
Definition: dochandler.h:196
QList< DocImpl > m_paragraphs
Definition: dochandler.h:1246
virtual void startParagraph(const QXmlAttributes &attrib)
void DocSectionHandler::startSubSection ( const QXmlAttributes attrib)
virtual

Definition at line 2070 of file dochandler.cpp.

2071 {
2072  DocSectionHandler *secHandler = new DocSectionHandler(this,m_level+1);
2073  secHandler->startDocSection(attrib);
2074  m_subsections.append(secHandler);
2075 }
void append(const type *d)
Definition: qlist.h:73
QList< DocImpl > m_subsections
Definition: dochandler.h:1247
virtual void startDocSection(const QXmlAttributes &attrib)
DocSectionHandler(IBaseHandler *parent, int level)
Node representing a section.
Definition: dochandler.h:1221
void DocSectionHandler::startTitle ( const QXmlAttributes attrib)
virtual

Definition at line 2090 of file dochandler.cpp.

2091 {
2092  m_title = new TitleHandler(this);
2093  m_title->startTitle(attrib);
2094 }
virtual void startTitle(const QXmlAttributes &attrib)
Definition: dochandler.cpp:868
TitleHandler * m_title
Definition: dochandler.h:1251
IDocIterator * DocSectionHandler::subSections ( ) const
virtual

Definition at line 2101 of file dochandler.cpp.

2102 {
2103  return new DocSectionSubIterator(*this);
2104 }
friend class DocSectionSubIterator
Definition: dochandler.h:1224
virtual IDocTitle* DocSectionHandler::title ( ) const
inlinevirtual

Definition at line 1239 of file dochandler.h.

1239 { return m_title; }
TitleHandler * m_title
Definition: dochandler.h:1251

Friends And Related Function Documentation

friend class DocSectionParaIterator
friend

Definition at line 1223 of file dochandler.h.

friend class DocSectionSubIterator
friend

Definition at line 1224 of file dochandler.h.

Member Data Documentation

StringImpl DocSectionHandler::m_id
private

Definition at line 1249 of file dochandler.h.

DocInternalHandler* DocSectionHandler::m_internal
private

Definition at line 1248 of file dochandler.h.

int DocSectionHandler::m_level
private

Definition at line 1250 of file dochandler.h.

QList<DocImpl> DocSectionHandler::m_paragraphs
private

Definition at line 1246 of file dochandler.h.

IBaseHandler* DocSectionHandler::m_parent
private

Definition at line 1245 of file dochandler.h.

QList<DocImpl> DocSectionHandler::m_subsections
private

Definition at line 1247 of file dochandler.h.

TitleHandler* DocSectionHandler::m_title
private

Definition at line 1251 of file dochandler.h.


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