paramhandler.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * $Id$
4  *
5  *
6  * Copyright (C) 1997-2015 by Dimitri van Heesch.
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation under the terms of the GNU General Public License is hereby
10  * granted. No representations are made about the suitability of this software
11  * for any purpose. It is provided "as is" without express or implied warranty.
12  * See the GNU General Public License for more details.
13  *
14  */
15 
16 #include "paramhandler.h"
17 #include "memberhandler.h"
18 #include "linkedtexthandler.h"
19 #include "debug.h"
20 #include "dochandler.h"
21 
23 {
25 
27 }
28 
30 {
31  ParamHandler *ph = new ParamHandler(this);
32  ph->startParam(attrib);
34 }
35 
37 {
38 }
39 
41 {
42  m_parent->setDelegate(this);
43  debug(2,"templateparamlist\n");
44 }
45 
47 {
49 }
50 
51 ///////////////////////////////////////////////////////////////////////////////////////////////////////
52 
54 {
56 
58 
59  addStartHandler("declname");
60  addEndHandler("declname",this,&ParamHandler::endDeclName);
61 
62  addStartHandler("defname");
63  addEndHandler("defname",this,&ParamHandler::endDefName);
64 
65  addStartHandler("array");
67 
68  addStartHandler("attribute");
69  addEndHandler("attribute",this,&ParamHandler::endAttrib);
70 
71  addStartHandler("briefdescription",this,&ParamHandler::startBriefDesc);
72 
74 
76 }
77 
79 {
80  delete m_brief;
81  delete m_linkedTextHandler;
82 }
83 
85 {
86  m_parent->setDelegate(this);
87  debug(2,"param\n");
88 }
89 
91 {
93 }
94 
95 void ParamHandler::startType(const QXmlAttributes& /*attrib*/)
96 {
97  delete m_linkedTextHandler;
99  m_linkedTextHandler->start("type");
100  debug(2,"param type\n");
101 }
102 
104 {
106  debug(2,"member declName=`%s'\n",m_declName.data());
107 }
108 
110 {
112  debug(2,"member defName=`%s'\n",m_defName.data());
113 }
114 
116 {
118  debug(2,"member attrib=`%s'\n",m_attrib.data());
119 }
120 
122 {
124  debug(2,"member array=`%s'\n",m_array.data());
125 }
126 
128 {
129  delete m_linkedTextHandler;
131  m_linkedTextHandler->start("defval");
132  debug(2,"member defVal\n");
133 }
134 
136 {
137  DocHandler *docHandler = new DocHandler(this);
138  docHandler->startDoc(attrib);
139  m_brief = docHandler;
140 }
141 
143 {
144  return new LinkedTextIterator(m_type);
145 }
146 
148 {
149  return new LinkedTextIterator(m_defVal);
150 }
151 
153 {
154  return m_brief;
155 }
156 
157 
158 
virtual ILinkedTextIterator * defaultValue() const
virtual void endArray()
virtual void startTemplateParamList(const QXmlAttributes &attrib)
void append(const type *d)
Definition: qlist.h:73
LinkedTextHandler * m_linkedTextHandler
Definition: paramhandler.h:72
virtual void endDeclName()
virtual ~ParamHandler()
IBaseHandler * m_parent
Definition: paramhandler.h:71
virtual void endParam()
TemplateParamListHandler(IBaseHandler *parent)
virtual void startParam(const QXmlAttributes &attrib)
virtual void endTemplateParamList()
IBaseHandler * m_parent
Definition: paramhandler.h:98
StringImpl m_attrib
Definition: paramhandler.h:69
virtual void start(const char *endTag)
DocHandler * m_brief
Definition: paramhandler.h:67
const char * data() const
Definition: qstring.h:542
virtual void endDefName()
virtual ILinkedTextIterator * type() const
virtual void startDoc(const QXmlAttributes &attrib)
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
Node representing a documentation block.
Definition: dochandler.h:1315
virtual IDocRoot * briefDescription() const
StringImpl m_defName
Definition: paramhandler.h:64
virtual void startDefVal(const QXmlAttributes &attrib)
virtual void startBriefDesc(const QXmlAttributes &attrib)
QString stripWhiteSpace() const
Definition: qstring.cpp:13438
Iterates over a list of ILinkedText fragments.
Definition: doxmlintf.h:97
StringImpl m_declName
Definition: paramhandler.h:63
virtual void startParam(const QXmlAttributes &attrib)
QList< LinkedTextImpl > m_type
Definition: paramhandler.h:62
virtual void endAttrib()
virtual void startType(const QXmlAttributes &attrib)
QList< LinkedTextImpl > m_defVal
Definition: paramhandler.h:66
QList< ParamHandler > m_templateParams
Definition: paramhandler.h:99
ParamHandler(IBaseHandler *parent)
The QXmlAttributes class provides XML attributes.
Definition: qxml.h:128
virtual const IString * attrib() const
Definition: paramhandler.h:53
StringImpl m_array
Definition: paramhandler.h:65
def parent(G, child, parent_type)
Definition: graph.py:67