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

#include <graphhandler.h>

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

Public Member Functions

 ChildNodeHandler (IBaseHandler *parent, GraphHandler *gh)
 
virtual ~ChildNodeHandler ()
 
void startChildNode (const QXmlAttributes &attrib)
 
void endChildNode ()
 
void startEdgeLabel (const QXmlAttributes &attrib)
 
virtual INodenode () const
 
virtual NodeRelation relation () const
 
virtual const IStringrelationString () const
 
virtual IEdgeLabelIteratoredgeLabels () const
 
- Public Member Functions inherited from BaseHandler< ChildNodeHandler >
 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< ChildNodeHandler >
 ElementMapper ()
 
virtual ~ElementMapper ()
 
void addStartHandler (const char *key)
 
void addStartHandler (const char *key, ChildNodeHandler *obj, void(ChildNodeHandler::*handler)(const QXmlAttributes &))
 
void addEndHandler (const char *key)
 
void addEndHandler (const char *key, ChildNodeHandler *obj, void(ChildNodeHandler::*handler)())
 
- Public Member Functions inherited from IBaseHandler
virtual ~IBaseHandler ()
 

Private Attributes

IBaseHandlerm_parent
 
QString m_id
 
NodeRelation m_relation
 
StringImpl m_relationString
 
QList< EdgeLabelHandlerm_edgeLabels
 
GraphHandlerm_graph
 

Friends

class EdgeLabelIterator
 

Additional Inherited Members

- Public Types inherited from IChildNode
enum  NodeRelation {
  PublicInheritance, ProtectedInheritance, PrivateInheritance, Usage,
  TemplateInstance, PublicInheritance, ProtectedInheritance, PrivateInheritance,
  Usage, TemplateInstance
}
 
enum  NodeRelation {
  PublicInheritance, ProtectedInheritance, PrivateInheritance, Usage,
  TemplateInstance, PublicInheritance, ProtectedInheritance, PrivateInheritance,
  Usage, TemplateInstance
}
 
- Public Types inherited from BaseHandler< ChildNodeHandler >
typedef ElementMapper< ChildNodeHandler >::StartElementHandlerT StartElementHandlerT
 
typedef ElementMapper< ChildNodeHandler >::EndElementHandlerT EndElementHandlerT
 
- Public Types inherited from ElementMapper< ChildNodeHandler >
typedef StartElementHandler StartElementHandlerT
 
typedef EndElementHandler EndElementHandlerT
 
- Static Public Attributes inherited from LocatorContainer
static QXmlLocators_theLocator =0
 
- Protected Attributes inherited from BaseHandler< ChildNodeHandler >
QString m_curString
 
QString m_skipUntil
 
int m_skipCount
 
QXmlDefaultHandlerm_delegateHandler
 
IFallBackHandlerm_fallBackHandler
 
- Protected Attributes inherited from ElementMapper< ChildNodeHandler >
QDict< StartElementHandlerTm_startHandlers
 
QDict< EndElementHandlerTm_endHandlers
 

Detailed Description

Definition at line 90 of file graphhandler.h.

Constructor & Destructor Documentation

ChildNodeHandler::ChildNodeHandler ( IBaseHandler parent,
GraphHandler gh 
)

Definition at line 144 of file graphhandler.cpp.

145  : m_parent(parent), m_graph(gh)
146 {
150 }
GraphHandler * m_graph
Definition: graphhandler.h:113
QList< EdgeLabelHandler > m_edgeLabels
Definition: graphhandler.h:112
void startEdgeLabel(const QXmlAttributes &attrib)
IBaseHandler * m_parent
Definition: graphhandler.h:108
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
ChildNodeHandler::~ChildNodeHandler ( )
virtual

Definition at line 152 of file graphhandler.cpp.

153 {
154 }

Member Function Documentation

IEdgeLabelIterator * ChildNodeHandler::edgeLabels ( ) const
virtual

Implements IChildNode.

Definition at line 179 of file graphhandler.cpp.

180 {
181  return new EdgeLabelIterator(*this);
182 }
friend class EdgeLabelIterator
Definition: graphhandler.h:92
void ChildNodeHandler::endChildNode ( )

Definition at line 165 of file graphhandler.cpp.

166 {
167  debug(2,"endChildNode\n");
168  m_parent->setDelegate(0);
169 }
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
IBaseHandler * m_parent
Definition: graphhandler.h:108
INode * ChildNodeHandler::node ( ) const
virtual

Implements IChildNode.

Definition at line 184 of file graphhandler.cpp.

185 {
186  return m_graph->getNodeById(m_id);
187 }
NodeHandler * getNodeById(const QString &id) const
GraphHandler * m_graph
Definition: graphhandler.h:113
virtual NodeRelation ChildNodeHandler::relation ( ) const
inlinevirtual

Implements IChildNode.

Definition at line 103 of file graphhandler.h.

103 { return m_relation; }
NodeRelation m_relation
Definition: graphhandler.h:110
virtual const IString* ChildNodeHandler::relationString ( ) const
inlinevirtual

Implements IChildNode.

Definition at line 104 of file graphhandler.h.

104 { return &m_relationString; }
StringImpl m_relationString
Definition: graphhandler.h:111
void ChildNodeHandler::startChildNode ( const QXmlAttributes attrib)

Definition at line 156 of file graphhandler.cpp.

157 {
158  debug(2,"startChildNode\n");
159  m_id = attrib.value("refid");
160  m_relationString = attrib.value("relation");
162  m_parent->setDelegate(this);
163 }
IChildNode::NodeRelation stringToNodeRelation(const QString &nrStr)
QString value(int index) const
Definition: qxml.cpp:664
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
NodeRelation m_relation
Definition: graphhandler.h:110
IBaseHandler * m_parent
Definition: graphhandler.h:108
StringImpl m_relationString
Definition: graphhandler.h:111
static EdgeRelationMapper * s_edgeRelationMapper
void ChildNodeHandler::startEdgeLabel ( const QXmlAttributes attrib)

Definition at line 172 of file graphhandler.cpp.

173 {
174  EdgeLabelHandler *elh = new EdgeLabelHandler(this);
175  elh->startEdgeLabel(attrib);
176  m_edgeLabels.append(elh);
177 }
void append(const type *d)
Definition: qlist.h:73
QList< EdgeLabelHandler > m_edgeLabels
Definition: graphhandler.h:112
void startEdgeLabel(const QXmlAttributes &attrib)

Friends And Related Function Documentation

friend class EdgeLabelIterator
friend

Definition at line 92 of file graphhandler.h.

Member Data Documentation

QList<EdgeLabelHandler> ChildNodeHandler::m_edgeLabels
private

Definition at line 112 of file graphhandler.h.

GraphHandler* ChildNodeHandler::m_graph
private

Definition at line 113 of file graphhandler.h.

QString ChildNodeHandler::m_id
private

Definition at line 109 of file graphhandler.h.

IBaseHandler* ChildNodeHandler::m_parent
private

Definition at line 108 of file graphhandler.h.

NodeRelation ChildNodeHandler::m_relation
private

Definition at line 110 of file graphhandler.h.

StringImpl ChildNodeHandler::m_relationString
private

Definition at line 111 of file graphhandler.h.


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