Root/
Source at commit 1322 created 12 years 8 months ago. By meklort, Add doxygen to utils folder | |
---|---|
1 | /******************************************************************************␊ |
2 | *␊ |
3 | * $Id: define.h,v 1.21 2001/03/19 19:27:40 root Exp $␊ |
4 | *␊ |
5 | * Copyright (C) 1997-2011 by Dimitri van Heesch.␊ |
6 | *␊ |
7 | * Permission to use, copy, modify, and distribute this software and its␊ |
8 | * documentation under the terms of the GNU General Public License is hereby ␊ |
9 | * granted. No representations are made about the suitability of this software ␊ |
10 | * for any purpose. It is provided "as is" without express or implied warranty.␊ |
11 | * See the GNU General Public License for more details.␊ |
12 | *␊ |
13 | * Documents produced by Doxygen are derivative works derived from the␊ |
14 | * input used in their production; they are not affected by this license.␊ |
15 | *␊ |
16 | */␊ |
17 | ␊ |
18 | #ifndef DEFINE_H␊ |
19 | #define DEFINE_H␊ |
20 | ␊ |
21 | #include "qtbc.h"␊ |
22 | #include <qdict.h>␊ |
23 | #include <qlist.h>␊ |
24 | ␊ |
25 | class FileDef;␊ |
26 | ␊ |
27 | class Define␊ |
28 | {␊ |
29 | public:␊ |
30 | Define();␊ |
31 | Define(const Define &d);␊ |
32 | ~Define();␊ |
33 | bool hasDocumentation();␊ |
34 | QCString name;␊ |
35 | QCString definition;␊ |
36 | QCString fileName;␊ |
37 | QCString doc;␊ |
38 | QCString brief;␊ |
39 | QCString args;␊ |
40 | QCString anchor;␊ |
41 | FileDef *fileDef;␊ |
42 | int lineNr;␊ |
43 | int nargs;␊ |
44 | bool undef;␊ |
45 | bool varArgs;␊ |
46 | bool isPredefined;␊ |
47 | bool nonRecursive;␊ |
48 | };␊ |
49 | ␊ |
50 | class DefineList : public QList<Define>␊ |
51 | {␊ |
52 | public:␊ |
53 | DefineList() : QList<Define>() {}␊ |
54 | ~DefineList() {}␊ |
55 | int compareItems(GCI i1,GCI i2) ␊ |
56 | {␊ |
57 | return stricmp(((Define *)i1)->name,((Define *)i2)->name); ␊ |
58 | }␊ |
59 | };␊ |
60 | ␊ |
61 | class DefineName : public QList<Define>␊ |
62 | {␊ |
63 | public:␊ |
64 | DefineName(const char *n) : QList<Define>() { name=n; }␊ |
65 | ~DefineName() {}␊ |
66 | const char *nameString() const { return name; }␊ |
67 | int compareItems(GCI i1,GCI i2) ␊ |
68 | {␊ |
69 | return stricmp(((Define *)i1)->name,((Define *)i2)->name); ␊ |
70 | }␊ |
71 | ␊ |
72 | private:␊ |
73 | QCString name;␊ |
74 | };␊ |
75 | ␊ |
76 | class DefineNameList : public QList<DefineName>␊ |
77 | {␊ |
78 | public:␊ |
79 | DefineNameList() : QList<DefineName>() {}␊ |
80 | ~DefineNameList() {}␊ |
81 | int compareItems(GCI i1,GCI i2)␊ |
82 | {␊ |
83 | return stricmp(((DefineName *)i1)->nameString(),␊ |
84 | ((DefineName *)i2)->nameString());␊ |
85 | }␊ |
86 | };␊ |
87 | ␊ |
88 | typedef QDict<Define> DefineDict;␊ |
89 | typedef QDict<DefineName> DefineNameDict;␊ |
90 | ␊ |
91 | #endif␊ |
92 |