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

#include <sectionhandler.h>

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

Public Member Functions

virtual void startMember (const QXmlAttributes &attrib)
 
virtual void startHeader (const QXmlAttributes &attrib)
 
virtual void startSection (const QXmlAttributes &attrib)
 
virtual void startDescription (const QXmlAttributes &attrib)
 
virtual void endSection ()
 
virtual void endHeader ()
 
 SectionHandler (IBaseHandler *parent)
 
virtual ~SectionHandler ()
 
virtual const IStringkindString () const
 
virtual SectionKind kind () const
 
IDocRootdescription () const
 
virtual IMemberIteratormembers () const
 
virtual bool isStatic () const
 
virtual bool isPublic () const
 
virtual bool isProtected () const
 
virtual bool isPrivate () const
 
void initialize (CompoundHandler *c)
 
virtual const IStringheader () const
 
- Public Member Functions inherited from BaseHandler< SectionHandler >
 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< SectionHandler >
 ElementMapper ()
 
virtual ~ElementMapper ()
 
void addStartHandler (const char *key)
 
void addStartHandler (const char *key, SectionHandler *obj, void(SectionHandler::*handler)(const QXmlAttributes &))
 
void addEndHandler (const char *key)
 
void addEndHandler (const char *key, SectionHandler *obj, void(SectionHandler::*handler)())
 
- Public Member Functions inherited from IBaseHandler
virtual ~IBaseHandler ()
 

Private Attributes

IBaseHandlerm_parent
 
StringImpl m_header
 
DocHandlerm_description
 
QList< MemberHandlerm_members
 
SectionKind m_kind
 
StringImpl m_kindString
 

Additional Inherited Members

- Public Types inherited from ISection
enum  SectionKind {
  Invalid =0, UserDefined, PubTypes, PubFuncs,
  PubAttribs, PubSlots, Signals, DCOPFuncs,
  Properties, Events, PubStatFuncs, PubStatAttribs,
  ProTypes, ProFuncs, ProAttribs, ProSlots,
  ProStatFuncs, ProStatAttribs, PacTypes, PacFuncs,
  PacAttribs, PacStatFuncs, PacStatAttribs, PriTypes,
  PriFuncs, PriAttribs, PriSlots, PriStatFuncs,
  PriStatAttribs, Friend, Related, Defines,
  Prototypes, Typedefs, Enums, Functions,
  Variables, Invalid =0, UserDefined, PubTypes,
  PubFuncs, PubAttribs, PubSlots, Signals,
  DCOPFuncs, Properties, Events, PubStatFuncs,
  PubStatAttribs, ProTypes, ProFuncs, ProAttribs,
  ProSlots, ProStatFuncs, ProStatAttribs, PacTypes,
  PacFuncs, PacAttribs, PacStatFuncs, PacStatAttribs,
  PriTypes, PriFuncs, PriAttribs, PriSlots,
  PriStatFuncs, PriStatAttribs, Friend, Related,
  Defines, Prototypes, Typedefs, Enums,
  Functions, Variables
}
 
enum  SectionKind {
  Invalid =0, UserDefined, PubTypes, PubFuncs,
  PubAttribs, PubSlots, Signals, DCOPFuncs,
  Properties, Events, PubStatFuncs, PubStatAttribs,
  ProTypes, ProFuncs, ProAttribs, ProSlots,
  ProStatFuncs, ProStatAttribs, PacTypes, PacFuncs,
  PacAttribs, PacStatFuncs, PacStatAttribs, PriTypes,
  PriFuncs, PriAttribs, PriSlots, PriStatFuncs,
  PriStatAttribs, Friend, Related, Defines,
  Prototypes, Typedefs, Enums, Functions,
  Variables, Invalid =0, UserDefined, PubTypes,
  PubFuncs, PubAttribs, PubSlots, Signals,
  DCOPFuncs, Properties, Events, PubStatFuncs,
  PubStatAttribs, ProTypes, ProFuncs, ProAttribs,
  ProSlots, ProStatFuncs, ProStatAttribs, PacTypes,
  PacFuncs, PacAttribs, PacStatFuncs, PacStatAttribs,
  PriTypes, PriFuncs, PriAttribs, PriSlots,
  PriStatFuncs, PriStatAttribs, Friend, Related,
  Defines, Prototypes, Typedefs, Enums,
  Functions, Variables
}
 
- Public Types inherited from BaseHandler< SectionHandler >
typedef ElementMapper< SectionHandler >::StartElementHandlerT StartElementHandlerT
 
typedef ElementMapper< SectionHandler >::EndElementHandlerT EndElementHandlerT
 
- Public Types inherited from ElementMapper< SectionHandler >
typedef StartElementHandler StartElementHandlerT
 
typedef EndElementHandler EndElementHandlerT
 
- Static Public Attributes inherited from LocatorContainer
static QXmlLocators_theLocator =0
 
- Protected Attributes inherited from BaseHandler< SectionHandler >
QString m_curString
 
QString m_skipUntil
 
int m_skipCount
 
QXmlDefaultHandlerm_delegateHandler
 
IFallBackHandlerm_fallBackHandler
 
- Protected Attributes inherited from ElementMapper< SectionHandler >
QDict< StartElementHandlerTm_startHandlers
 
QDict< EndElementHandlerTm_endHandlers
 

Detailed Description

Definition at line 35 of file sectionhandler.h.

Constructor & Destructor Documentation

SectionHandler::SectionHandler ( IBaseHandler parent)

Definition at line 92 of file sectionhandler.cpp.

92  : m_parent(parent)
93 {
94  //printf("SectionHandler::SectionHandler()\n");
96  addEndHandler("sectiondef",this,&SectionHandler::endSection);
101 }
virtual void endSection()
virtual void endHeader()
virtual void startMember(const QXmlAttributes &attrib)
QList< MemberHandler > m_members
virtual void startHeader(const QXmlAttributes &attrib)
virtual void startDescription(const QXmlAttributes &attrib)
IBaseHandler * m_parent
void addStartHandler(const char *key)
Definition: basehandler.h:91
void setAutoDelete(bool enable)
Definition: qlist.h:99
const bool TRUE
Definition: qglobal.h:371
void addEndHandler(const char *key)
Definition: basehandler.h:101
SectionHandler::~SectionHandler ( )
virtual

Definition at line 103 of file sectionhandler.cpp.

104 {
105  debug(2,"SectionHandler::~SectionHandler()\n");
106 }

Member Function Documentation

IDocRoot * SectionHandler::description ( ) const
virtual

Returns the description attached to this section (for user defined sections, also known as member groups).

Implements ISection.

Definition at line 159 of file sectionhandler.cpp.

160 {
161  return m_description;
162 }
DocHandler * m_description
void SectionHandler::endHeader ( )
virtual

Definition at line 141 of file sectionhandler.cpp.

142 {
144  debug(2,"member header=`%s'\n",m_header.data());
145 }
const char * data() const
Definition: qstring.h:542
QString stripWhiteSpace() const
Definition: qstring.cpp:13438
StringImpl m_header
void SectionHandler::endSection ( )
virtual

Definition at line 123 of file sectionhandler.cpp.

124 {
125  m_parent->setDelegate(0);
126 }
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
IBaseHandler * m_parent
virtual const IString* SectionHandler::header ( ) const
inlinevirtual

Implements IUserDefined.

Definition at line 79 of file sectionhandler.h.

80  {
81  return &m_header;
82  }
StringImpl m_header
void SectionHandler::initialize ( CompoundHandler c)

Definition at line 147 of file sectionhandler.cpp.

148 {
150  MemberHandler *mh;
151  for (;(mh=mli.current());++mli)
152  {
153  mh->setCompoundHandler(ch);
154  ch->insertMember(mh);
155  mh->setSectionHandler(this);
156  }
157 }
QList< MemberHandler > m_members
void setSectionHandler(SectionHandler *s)
void setCompoundHandler(CompoundHandler *c)
virtual bool SectionHandler::isPrivate ( ) const
inlinevirtual

Returns true if this section belongs to a private section of a class

Implements ISection.

Definition at line 70 of file sectionhandler.h.

71  {
72  return m_kind==PriTypes || m_kind==PriFuncs || m_kind==PriAttribs ||
74  }
Private member typedefs.
Definition: doxmlintf.h:776
Private Qt slots.
Definition: doxmlintf.h:779
SectionKind m_kind
Private static member functions.
Definition: doxmlintf.h:780
Private member attributes.
Definition: doxmlintf.h:778
Private member functions.
Definition: doxmlintf.h:777
Private static member attributes.
Definition: doxmlintf.h:781
virtual bool SectionHandler::isProtected ( ) const
inlinevirtual

Returns true if this section belongs to a protected section of a class

Implements ISection.

Definition at line 65 of file sectionhandler.h.

66  {
67  return m_kind==ProTypes || m_kind==ProFuncs || m_kind==ProAttribs ||
69  }
Protected static member functions.
Definition: doxmlintf.h:769
SectionKind m_kind
Protected static member attributes.
Definition: doxmlintf.h:770
Protected slots.
Definition: doxmlintf.h:768
Protected member typedefs.
Definition: doxmlintf.h:765
Protected member attributes.
Definition: doxmlintf.h:767
Protected member functions.
Definition: doxmlintf.h:766
virtual bool SectionHandler::isPublic ( ) const
inlinevirtual

Returns true if this section belongs to a public section of a class

Implements ISection.

Definition at line 61 of file sectionhandler.h.

62  {
63  return !isProtected() && !isPrivate();
64  }
virtual bool isProtected() const
virtual bool isPrivate() const
virtual bool SectionHandler::isStatic ( ) const
inlinevirtual

Returns true if this section contains statics

Implements ISection.

Definition at line 55 of file sectionhandler.h.

56  {
60  }
Protected static member functions.
Definition: doxmlintf.h:769
Public static member functions.
Definition: doxmlintf.h:763
SectionKind m_kind
Private static member functions.
Definition: doxmlintf.h:780
Protected static member attributes.
Definition: doxmlintf.h:770
Private static member attributes.
Definition: doxmlintf.h:781
Public static attributes.
Definition: doxmlintf.h:764
virtual SectionKind SectionHandler::kind ( ) const
inlinevirtual

Returns what kind of section this is

Implements ISection.

Definition at line 51 of file sectionhandler.h.

52  { return m_kind; }
SectionKind m_kind
virtual const IString* SectionHandler::kindString ( ) const
inlinevirtual

Returns a string representation of the value returned by kind()

Implements ISection.

Definition at line 49 of file sectionhandler.h.

50  { return &m_kindString; }
StringImpl m_kindString
IMemberIterator * SectionHandler::members ( ) const
virtual

Returns an iterator for the members of this section

Implements ISection.

Definition at line 164 of file sectionhandler.cpp.

165 {
166  return new MemberIterator(m_members);
167 }
QList< MemberHandler > m_members
void SectionHandler::startDescription ( const QXmlAttributes attrib)
virtual

Definition at line 116 of file sectionhandler.cpp.

117 {
118  DocHandler *docHandler = new DocHandler(this);
119  docHandler->startDoc(attrib);
120  m_description = docHandler;
121 }
virtual void startDoc(const QXmlAttributes &attrib)
Node representing a documentation block.
Definition: dochandler.h:1315
DocHandler * m_description
void SectionHandler::startHeader ( const QXmlAttributes attrib)
virtual

Definition at line 135 of file sectionhandler.cpp.

136 {
137  m_header="";
138  m_curString="";
139 }
StringImpl m_header
void SectionHandler::startMember ( const QXmlAttributes attrib)
virtual

Definition at line 128 of file sectionhandler.cpp.

129 {
130  MemberHandler *memHandler = new MemberHandler(this);
131  memHandler->startMember(attrib);
132  m_members.append(memHandler);
133 }
void append(const type *d)
Definition: qlist.h:73
virtual void startMember(const QXmlAttributes &attrib)
QList< MemberHandler > m_members
void SectionHandler::startSection ( const QXmlAttributes attrib)
virtual

Definition at line 108 of file sectionhandler.cpp.

109 {
110  m_parent->setDelegate(this);
111  m_kindString = attrib.value("kind");
113  debug(2,"section kind=`%s'\n",m_kindString.data());
114 }
StringImpl m_kindString
QString value(int index) const
Definition: qxml.cpp:664
static SectionTypeMap * s_typeMap
const char * data() const
Definition: qstring.h:542
SectionKind m_kind
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
ISection::SectionKind map(const QString &s)
IBaseHandler * m_parent

Member Data Documentation

DocHandler* SectionHandler::m_description
private

Definition at line 90 of file sectionhandler.h.

StringImpl SectionHandler::m_header
private

Definition at line 89 of file sectionhandler.h.

SectionKind SectionHandler::m_kind
private

Definition at line 95 of file sectionhandler.h.

StringImpl SectionHandler::m_kindString
private

Definition at line 96 of file sectionhandler.h.

QList<MemberHandler> SectionHandler::m_members
private

Definition at line 91 of file sectionhandler.h.

IBaseHandler* SectionHandler::m_parent
private

Definition at line 85 of file sectionhandler.h.


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