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

#include <linkedtexthandler.h>

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

Public Member Functions

 LinkedTextHandler (IBaseHandler *parent, QList< LinkedTextImpl > &children)
 
virtual ~LinkedTextHandler ()
 
virtual void start (const char *endTag)
 
virtual void end ()
 
virtual void startRef (const QXmlAttributes &attrib)
 
virtual void endRef ()
 
- Public Member Functions inherited from BaseHandler< LinkedTextHandler >
 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< LinkedTextHandler >
 ElementMapper ()
 
virtual ~ElementMapper ()
 
void addStartHandler (const char *key)
 
void addStartHandler (const char *key, LinkedTextHandler *obj, void(LinkedTextHandler::*handler)(const QXmlAttributes &))
 
void addEndHandler (const char *key)
 
void addEndHandler (const char *key, LinkedTextHandler *obj, void(LinkedTextHandler::*handler)())
 
- Public Member Functions inherited from IBaseHandler
virtual ~IBaseHandler ()
 

Static Public Member Functions

static QString toString (const QList< LinkedTextImpl > &list)
 

Private Attributes

IBaseHandlerm_parent
 
QList< LinkedTextImpl > & m_children
 
LT_Refm_ref
 

Additional Inherited Members

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

Detailed Description

Definition at line 28 of file linkedtexthandler.h.

Constructor & Destructor Documentation

LinkedTextHandler::LinkedTextHandler ( IBaseHandler parent,
QList< LinkedTextImpl > &  children 
)

Definition at line 57 of file linkedtexthandler.cpp.

60  : m_parent(parent), m_children(children)
61 {
65  m_ref=0;
66 }
QList< LinkedTextImpl > & m_children
IBaseHandler * m_parent
void addStartHandler(const char *key)
Definition: basehandler.h:91
void setAutoDelete(bool enable)
Definition: qlist.h:99
virtual void startRef(const QXmlAttributes &attrib)
const bool TRUE
Definition: qglobal.h:371
void addEndHandler(const char *key)
Definition: basehandler.h:101
LinkedTextHandler::~LinkedTextHandler ( )
virtual

Definition at line 68 of file linkedtexthandler.cpp.

69 {
70 }

Member Function Documentation

void LinkedTextHandler::end ( )
virtual

Definition at line 79 of file linkedtexthandler.cpp.

80 {
81  if (!m_curString.isEmpty())
82  {
84  debug(2,"LinkedTextHandler: add text `%s'\n",m_curString.data());
85  m_curString="";
86  }
88 }
QList< LinkedTextImpl > & m_children
bool isEmpty() const
Definition: qstring.h:682
IBaseHandler * m_parent
void append(const type *d)
Definition: qlist.h:73
const char * data() const
Definition: qstring.h:542
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
void LinkedTextHandler::endRef ( )
virtual

Definition at line 106 of file linkedtexthandler.cpp.

107 {
110  debug(2,"LinkedTextHandler: add ref `%s'\n",m_ref->text()->latin1());
111  m_ref=0;
112 }
QList< LinkedTextImpl > & m_children
void append(const type *d)
Definition: qlist.h:73
virtual const char * latin1() const =0
void setText(const QString &text)
virtual const IString * text() const
void LinkedTextHandler::start ( const char *  endTag)
virtual

Definition at line 72 of file linkedtexthandler.cpp.

73 {
75  m_parent->setDelegate(this);
76  m_curString="";
77 }
IBaseHandler * m_parent
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
void addEndHandler(const char *key)
Definition: basehandler.h:101
void LinkedTextHandler::startRef ( const QXmlAttributes attrib)
virtual

Definition at line 90 of file linkedtexthandler.cpp.

91 {
92  if (!m_curString.isEmpty())
93  {
95  debug(2,"LinkedTextHandler: add text `%s'\n",m_curString.data());
96  m_curString="";
97  }
98  ASSERT(m_ref==0);
99  m_ref = new LT_Ref;
100  m_ref->setRefId(attrib.value("refid"));
101  m_ref->setExtId(attrib.value("external"));
102  ASSERT(attrib.value("kindref")=="compound" || attrib.value("kindref")=="member");
103  m_ref->setTargetKind(attrib.value("kindref")=="compound" ? ILT_Ref::Compound : ILT_Ref::Member);
104 }
QList< LinkedTextImpl > & m_children
bool isEmpty() const
Definition: qstring.h:682
void append(const type *d)
Definition: qlist.h:73
QString value(int index) const
Definition: qxml.cpp:664
void setTargetKind(TargetKind k)
const char * data() const
Definition: qstring.h:542
void setRefId(const QString &refId)
void setExtId(const QString &extId)
#define ASSERT(x)
Definition: qglobal.h:590
QString LinkedTextHandler::toString ( const QList< LinkedTextImpl > &  list)
static

Definition at line 114 of file linkedtexthandler.cpp.

115 {
117  QString result;
118  LinkedTextImpl *lt;
119  for (li.toFirst();(lt=li.current());++li)
120  {
121  switch(lt->kind())
122  {
124  result+=dynamic_cast<ILT_Text*>(lt)->text()->latin1();
125  break;
127  result+=dynamic_cast<ILT_Ref *>(lt)->text()->latin1();
128  break;
129  }
130  }
131  return result;
132 }
static QCString result
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
Reference to an object.
Definition: doxmlintf.h:84
Plain text fragment.
Definition: doxmlintf.h:75
virtual Kind kind() const =0

Member Data Documentation

QList<LinkedTextImpl>& LinkedTextHandler::m_children
private

Definition at line 43 of file linkedtexthandler.h.

IBaseHandler* LinkedTextHandler::m_parent
private

Definition at line 42 of file linkedtexthandler.h.

LT_Ref* LinkedTextHandler::m_ref
private

Definition at line 44 of file linkedtexthandler.h.


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