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

Node representing a program listing. More...

#include <dochandler.h>

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

Public Member Functions

virtual void startProgramListing (const QXmlAttributes &attrib)
 
virtual void endProgramListing ()
 
virtual void startCodeLine (const QXmlAttributes &)
 
virtual void startLineNumber (const QXmlAttributes &)
 
 ProgramListingHandler (IBaseHandler *parent)
 
virtual ~ProgramListingHandler ()
 
virtual Kind kind () const
 
virtual IDocIteratorcodeLines () const
 
- Public Member Functions inherited from BaseHandler< ProgramListingHandler >
 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< ProgramListingHandler >
 ElementMapper ()
 
virtual ~ElementMapper ()
 
void addStartHandler (const char *key)
 
void addStartHandler (const char *key, ProgramListingHandler *obj, void(ProgramListingHandler::*handler)(const QXmlAttributes &))
 
void addEndHandler (const char *key)
 
void addEndHandler (const char *key, ProgramListingHandler *obj, void(ProgramListingHandler::*handler)())
 
- Public Member Functions inherited from IBaseHandler
virtual ~IBaseHandler ()
 

Private Attributes

IBaseHandlerm_parent
 
QList< CodeLineHandlerm_children
 
bool m_hasLineNumber
 

Friends

class ProgramListingIterator
 

Additional Inherited Members

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

Detailed Description

Node representing a program listing.

Definition at line 871 of file dochandler.h.

Constructor & Destructor Documentation

ProgramListingHandler::ProgramListingHandler ( IBaseHandler parent)

Definition at line 1217 of file dochandler.cpp.

1218  : m_parent(parent)
1219 {
1223 
1226 }
virtual void startCodeLine(const QXmlAttributes &)
QList< CodeLineHandler > m_children
Definition: dochandler.h:889
const bool FALSE
Definition: qglobal.h:370
virtual void startLineNumber(const QXmlAttributes &)
virtual void endProgramListing()
IBaseHandler * m_parent
Definition: dochandler.h:888
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
ProgramListingHandler::~ProgramListingHandler ( )
virtual

Definition at line 1228 of file dochandler.cpp.

1229 {
1230 }

Member Function Documentation

IDocIterator * ProgramListingHandler::codeLines ( ) const
virtual

Definition at line 1269 of file dochandler.cpp.

1270 {
1271  return new ProgramListingIterator(*this);
1272 }
friend class ProgramListingIterator
Definition: dochandler.h:873
void ProgramListingHandler::endProgramListing ( )
virtual

Definition at line 1238 of file dochandler.cpp.

1239 {
1240  debug(2,"end programlisting\n");
1241  m_parent->setDelegate(0);
1242 }
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
IBaseHandler * m_parent
Definition: dochandler.h:888
virtual Kind ProgramListingHandler::kind ( ) const
inlinevirtual

Definition at line 884 of file dochandler.h.

void ProgramListingHandler::startCodeLine ( const QXmlAttributes attrib)
virtual

Definition at line 1252 of file dochandler.cpp.

1253 {
1254  CodeLineHandler *clh = 0;
1255  if (!m_hasLineNumber)
1256  {
1257  clh = new CodeLineHandler(this);
1258  m_children.append(clh);
1259  }
1260  else
1261  {
1262  clh = m_children.getLast();
1263  }
1264  ASSERT(clh!=0);
1265  clh->startCodeLine(attrib);
1267 }
void append(const type *d)
Definition: qlist.h:73
QList< CodeLineHandler > m_children
Definition: dochandler.h:889
Node representing a line of code.
Definition: dochandler.h:828
const bool FALSE
Definition: qglobal.h:370
virtual void startCodeLine(const QXmlAttributes &)
type * getLast() const
Definition: qlist.h:96
#define ASSERT(x)
Definition: qglobal.h:590
void ProgramListingHandler::startLineNumber ( const QXmlAttributes attrib)
virtual

Definition at line 1244 of file dochandler.cpp.

1245 {
1246  CodeLineHandler *clh = new CodeLineHandler(this);
1247  m_children.append(clh);
1249  clh->startLineNumber(attrib);
1250 }
void append(const type *d)
Definition: qlist.h:73
QList< CodeLineHandler > m_children
Definition: dochandler.h:889
Node representing a line of code.
Definition: dochandler.h:828
virtual void startLineNumber(const QXmlAttributes &)
const bool TRUE
Definition: qglobal.h:371
void ProgramListingHandler::startProgramListing ( const QXmlAttributes attrib)
virtual

Definition at line 1232 of file dochandler.cpp.

1233 {
1234  m_parent->setDelegate(this);
1235  debug(2,"start programlisting\n");
1236 }
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
IBaseHandler * m_parent
Definition: dochandler.h:888

Friends And Related Function Documentation

friend class ProgramListingIterator
friend

Definition at line 873 of file dochandler.h.

Member Data Documentation

QList<CodeLineHandler> ProgramListingHandler::m_children
private

Definition at line 889 of file dochandler.h.

bool ProgramListingHandler::m_hasLineNumber
private

Definition at line 890 of file dochandler.h.

IBaseHandler* ProgramListingHandler::m_parent
private

Definition at line 888 of file dochandler.h.


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