Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/addon/doxmlparser/src/paramhandler.h

Source at commit 1322 created 12 years 8 months ago.
By meklort, Add doxygen to utils folder
1/******************************************************************************
2 *
3 * $Id:$
4 *
5 *
6 * Copyright (C) 1997-2006 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#ifndef _PARAMHANDLER_H
17#define _PARAMHANDLER_H
18
19#include <qstring.h>
20#include <qlist.h>
21#include <qxml.h>
22#include <doxmlintf.h>
23
24#include "stringimpl.h"
25#include "basehandler.h"
26#include "baseiterator.h"
27
28class LinkedTextImpl;
29class LinkedTextHandler;
30class DocHandler;
31
32
33class ParamHandler : public IParam, public BaseHandler<ParamHandler>
34{
35 public:
36 virtual void startParam(const QXmlAttributes& attrib);
37 virtual void endParam();
38 virtual void startType(const QXmlAttributes& attrib);
39 virtual void endDeclName();
40 virtual void endDefName();
41 virtual void endAttrib();
42 virtual void endArray();
43 virtual void startDefVal(const QXmlAttributes& attrib);
44 virtual void startBriefDesc(const QXmlAttributes& attrib);
45
46 ParamHandler(IBaseHandler *parent);
47 virtual ~ParamHandler();
48
49 // IParam
50 virtual ILinkedTextIterator *type() const;
51 virtual const IString * declarationName() const { return &m_declName; }
52 virtual const IString * definitionName() const { return &m_defName; }
53 virtual const IString * attrib() const { return &m_attrib; }
54 virtual const IString * arraySpecifier() const { return &m_array; }
55 virtual ILinkedTextIterator *defaultValue() const;
56 virtual IDocRoot *briefDescription() const;
57
58 private:
59
60 // XML elements:
61 // -------------
62 QList<LinkedTextImpl> m_type; // type
63 StringImpl m_declName; // declname
64 StringImpl m_defName; // defname
65 StringImpl m_array; // array
66 QList<LinkedTextImpl> m_defVal; // defval
67 DocHandler *m_brief; // briefdescription
68
69 StringImpl m_attrib; // TODO: not yet in XML output
70
71 IBaseHandler *m_parent;
72 LinkedTextHandler *m_linkedTextHandler;
73};
74
75class ParamIterator : public BaseIterator<IParamIterator,IParam,ParamHandler>
76{
77 public:
78 ParamIterator(const QList<ParamHandler> &list) :
79 BaseIterator<IParamIterator,IParam,ParamHandler>(list) {}
80};
81
82class TemplateParamListHandler : public BaseHandler<TemplateParamListHandler>
83{
84 public:
85
86 virtual void startParam(const QXmlAttributes& attrib);
87 virtual void endParam();
88
89 virtual void startTemplateParamList(const QXmlAttributes& attrib);
90 virtual void endTemplateParamList();
91
92 TemplateParamListHandler(IBaseHandler *parent);
93virtual ~TemplateParamListHandler() {}
94
95ParamIterator* templateParams() { return new ParamIterator(m_templateParams); }
96
97 protected:
98 IBaseHandler *m_parent;
99 QList<ParamHandler> m_templateParams;
100};
101
102
103#endif
104

Archive Download this file

Revision: 1322