|
1 /****************************************************************************** |
|
2 * |
|
3 * |
|
4 * |
|
5 * |
|
6 * Copyright (C) 1997-2008 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 * Documents produced by Doxygen are derivative works derived from the |
|
15 * input used in their production; they are not affected by this license. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef SECTION_H |
|
20 #define SECTION_H |
|
21 |
|
22 #include "qtbc.h" |
|
23 #include <qlist.h> |
|
24 #include <qdict.h> |
|
25 #include "sortdict.h" |
|
26 |
|
27 class Definition; |
|
28 |
|
29 struct SectionInfo |
|
30 { |
|
31 enum SectionType { Page, Section, Subsection, |
|
32 Subsubsection, Paragraph, Anchor |
|
33 }; |
|
34 SectionInfo(const char *f,const char *l,const char *t, |
|
35 SectionType st,const char *r=0) : |
|
36 label(l), title(t), type(st), ref(r), definition(0), |
|
37 fileName(f), generated(FALSE) |
|
38 { |
|
39 } |
|
40 SectionInfo(const SectionInfo &s) |
|
41 { |
|
42 label=s.label.copy(); title=s.title.copy(); ref=s.ref.copy(); |
|
43 type =s.type; definition=s.definition; |
|
44 fileName=s.fileName.copy(); generated=s.generated; |
|
45 } |
|
46 ~SectionInfo() {} |
|
47 QCString label; |
|
48 QCString title; |
|
49 SectionType type; |
|
50 QCString ref; |
|
51 Definition *definition; |
|
52 QCString fileName; |
|
53 bool generated; |
|
54 }; |
|
55 |
|
56 class SectionDict : public QDict<SectionInfo> |
|
57 { |
|
58 public: |
|
59 SectionDict(int size) : QDict<SectionInfo>(size) {} |
|
60 ~SectionDict() {} |
|
61 }; |
|
62 |
|
63 #endif |