Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
doxygen-1.8.11
addon
doxmlparser
src
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
22
TemplateParamListHandler::TemplateParamListHandler
(
IBaseHandler
*
parent
) : m_parent(parent)
23
{
24
addStartHandler
(
"param"
,
this
,&
TemplateParamListHandler::startParam
);
25
26
addEndHandler
(
"templateparamlist"
,
this
,&
TemplateParamListHandler::endTemplateParamList
);
27
}
28
29
void
TemplateParamListHandler::startParam
(
const
QXmlAttributes
& attrib)
30
{
31
ParamHandler
*ph =
new
ParamHandler
(
this
);
32
ph->
startParam
(attrib);
33
m_templateParams
.
append
(ph);
34
}
35
36
void
TemplateParamListHandler::endParam
()
37
{
38
}
39
40
void
TemplateParamListHandler::startTemplateParamList
(
const
QXmlAttributes
&
/*attrib*/
)
41
{
42
m_parent
->
setDelegate
(
this
);
43
debug
(2,
"templateparamlist\n"
);
44
}
45
46
void
TemplateParamListHandler::endTemplateParamList
()
47
{
48
m_parent
->
setDelegate
(0);
49
}
50
51
///////////////////////////////////////////////////////////////////////////////////////////////////////
52
53
ParamHandler::ParamHandler
(
IBaseHandler
*
parent
) : m_brief(0),
m_parent
(parent)
54
{
55
addEndHandler
(
"param"
,
this
,&
ParamHandler::endParam
);
56
57
addStartHandler
(
"type"
,
this
,&
ParamHandler::startType
);
58
59
addStartHandler
(
"declname"
);
60
addEndHandler
(
"declname"
,
this
,&
ParamHandler::endDeclName
);
61
62
addStartHandler
(
"defname"
);
63
addEndHandler
(
"defname"
,
this
,&
ParamHandler::endDefName
);
64
65
addStartHandler
(
"array"
);
66
addEndHandler
(
"array"
,
this
,&
ParamHandler::endArray
);
67
68
addStartHandler
(
"attribute"
);
69
addEndHandler
(
"attribute"
,
this
,&
ParamHandler::endAttrib
);
70
71
addStartHandler
(
"briefdescription"
,
this
,&
ParamHandler::startBriefDesc
);
72
73
addStartHandler
(
"defval"
,
this
,&
ParamHandler::startDefVal
);
74
75
m_linkedTextHandler
= 0;
76
}
77
78
ParamHandler::~ParamHandler
()
79
{
80
delete
m_brief
;
81
delete
m_linkedTextHandler
;
82
}
83
84
void
ParamHandler::startParam
(
const
QXmlAttributes
&
/*attrib*/
)
85
{
86
m_parent
->
setDelegate
(
this
);
87
debug
(2,
"param\n"
);
88
}
89
90
void
ParamHandler::endParam
()
91
{
92
m_parent
->
setDelegate
(0);
93
}
94
95
void
ParamHandler::startType
(
const
QXmlAttributes
&
/*attrib*/
)
96
{
97
delete
m_linkedTextHandler
;
98
m_linkedTextHandler
=
new
LinkedTextHandler
(
this
,
m_type
);
99
m_linkedTextHandler
->
start
(
"type"
);
100
debug
(2,
"param type\n"
);
101
}
102
103
void
ParamHandler::endDeclName
()
104
{
105
m_declName
=
m_curString
.
stripWhiteSpace
();
106
debug
(2,
"member declName=`%s'\n"
,
m_declName
.
data
());
107
}
108
109
void
ParamHandler::endDefName
()
110
{
111
m_defName
=
m_curString
.
stripWhiteSpace
();
112
debug
(2,
"member defName=`%s'\n"
,
m_defName
.
data
());
113
}
114
115
void
ParamHandler::endAttrib
()
116
{
117
m_attrib
=
m_curString
.
stripWhiteSpace
();
118
debug
(2,
"member attrib=`%s'\n"
,
m_attrib
.
data
());
119
}
120
121
void
ParamHandler::endArray
()
122
{
123
m_array
=
m_curString
.
stripWhiteSpace
();
124
debug
(2,
"member array=`%s'\n"
,
m_array
.
data
());
125
}
126
127
void
ParamHandler::startDefVal
(
const
QXmlAttributes
&
/*attrib*/
)
128
{
129
delete
m_linkedTextHandler
;
130
m_linkedTextHandler
=
new
LinkedTextHandler
(
this
,
m_defVal
);
131
m_linkedTextHandler
->
start
(
"defval"
);
132
debug
(2,
"member defVal\n"
);
133
}
134
135
void
ParamHandler::startBriefDesc
(
const
QXmlAttributes
&
attrib
)
136
{
137
DocHandler
*docHandler =
new
DocHandler
(
this
);
138
docHandler->
startDoc
(attrib);
139
m_brief
= docHandler;
140
}
141
142
ILinkedTextIterator
*
ParamHandler::type
()
const
143
{
144
return
new
LinkedTextIterator
(
m_type
);
145
}
146
147
ILinkedTextIterator
*
ParamHandler::defaultValue
()
const
148
{
149
return
new
LinkedTextIterator
(
m_defVal
);
150
}
151
152
IDocRoot
*
ParamHandler::briefDescription
()
const
153
{
154
return
m_brief
;
155
}
156
157
158
ParamHandler::defaultValue
virtual ILinkedTextIterator * defaultValue() const
Definition:
paramhandler.cpp:147
debug.h
ParamHandler::endArray
virtual void endArray()
Definition:
paramhandler.cpp:121
TemplateParamListHandler::startTemplateParamList
virtual void startTemplateParamList(const QXmlAttributes &attrib)
Definition:
paramhandler.cpp:40
QList::append
void append(const type *d)
Definition:
qlist.h:73
ParamHandler::m_linkedTextHandler
LinkedTextHandler * m_linkedTextHandler
Definition:
paramhandler.h:72
ParamHandler::endDeclName
virtual void endDeclName()
Definition:
paramhandler.cpp:103
ParamHandler::~ParamHandler
virtual ~ParamHandler()
Definition:
paramhandler.cpp:78
ParamHandler::m_parent
IBaseHandler * m_parent
Definition:
paramhandler.h:71
ParamHandler::endParam
virtual void endParam()
Definition:
paramhandler.cpp:90
TemplateParamListHandler::TemplateParamListHandler
TemplateParamListHandler(IBaseHandler *parent)
Definition:
paramhandler.cpp:22
paramhandler.h
TemplateParamListHandler::startParam
virtual void startParam(const QXmlAttributes &attrib)
Definition:
paramhandler.cpp:29
TemplateParamListHandler::endTemplateParamList
virtual void endTemplateParamList()
Definition:
paramhandler.cpp:46
TemplateParamListHandler::m_parent
IBaseHandler * m_parent
Definition:
paramhandler.h:98
ParamHandler::m_attrib
StringImpl m_attrib
Definition:
paramhandler.h:69
LinkedTextHandler::start
virtual void start(const char *endTag)
Definition:
linkedtexthandler.cpp:72
dochandler.h
IBaseHandler
Definition:
basehandler.h:27
ParamHandler::m_brief
DocHandler * m_brief
Definition:
paramhandler.h:67
QString::data
const char * data() const
Definition:
qstring.h:542
ParamHandler::endDefName
virtual void endDefName()
Definition:
paramhandler.cpp:109
ParamHandler::type
virtual ILinkedTextIterator * type() const
Definition:
paramhandler.cpp:142
ParamHandler
Definition:
paramhandler.h:33
LinkedTextIterator
Definition:
linkedtexthandler.h:47
DocHandler::startDoc
virtual void startDoc(const QXmlAttributes &attrib)
Definition:
dochandler.cpp:2192
IBaseHandler::setDelegate
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
DocHandler
Node representing a documentation block.
Definition:
dochandler.h:1315
python.larbatch_posix.debug
string debug
Definition:
larbatch_posix.py:142
ParamHandler::briefDescription
virtual IDocRoot * briefDescription() const
Definition:
paramhandler.cpp:152
ParamHandler::m_defName
StringImpl m_defName
Definition:
paramhandler.h:64
LinkedTextHandler
Definition:
linkedtexthandler.h:28
ParamHandler::startDefVal
virtual void startDefVal(const QXmlAttributes &attrib)
Definition:
paramhandler.cpp:127
ParamHandler::startBriefDesc
virtual void startBriefDesc(const QXmlAttributes &attrib)
Definition:
paramhandler.cpp:135
QString::stripWhiteSpace
QString stripWhiteSpace() const
Definition:
qstring.cpp:13438
ILinkedTextIterator
Iterates over a list of ILinkedText fragments.
Definition:
doxmlintf.h:97
ParamHandler::m_declName
StringImpl m_declName
Definition:
paramhandler.h:63
IDocRoot
Definition:
doxmlintf.h:499
ParamHandler::startParam
virtual void startParam(const QXmlAttributes &attrib)
Definition:
paramhandler.cpp:84
ParamHandler::m_type
QList< LinkedTextImpl > m_type
Definition:
paramhandler.h:62
memberhandler.h
BaseHandler< ParamHandler >::m_curString
QString m_curString
Definition:
basehandler.h:278
ParamHandler::endAttrib
virtual void endAttrib()
Definition:
paramhandler.cpp:115
ParamHandler::startType
virtual void startType(const QXmlAttributes &attrib)
Definition:
paramhandler.cpp:95
ParamHandler::m_defVal
QList< LinkedTextImpl > m_defVal
Definition:
paramhandler.h:66
TemplateParamListHandler::m_templateParams
QList< ParamHandler > m_templateParams
Definition:
paramhandler.h:99
ParamHandler::ParamHandler
ParamHandler(IBaseHandler *parent)
Definition:
paramhandler.cpp:53
QXmlAttributes
The QXmlAttributes class provides XML attributes.
Definition:
qxml.h:128
TemplateParamListHandler::endParam
virtual void endParam()
Definition:
paramhandler.cpp:36
ParamHandler::attrib
virtual const IString * attrib() const
Definition:
paramhandler.h:53
ElementMapper< TemplateParamListHandler >::addStartHandler
void addStartHandler(const char *key)
Definition:
basehandler.h:91
ParamHandler::m_array
StringImpl m_array
Definition:
paramhandler.h:65
wirecell.util.wires.graph.parent
def parent(G, child, parent_type)
Definition:
graph.py:67
linkedtexthandler.h
ElementMapper< TemplateParamListHandler >::addEndHandler
void addEndHandler(const char *key)
Definition:
basehandler.h:101
Generated by
1.8.11