Fix for UBSan build
[platform/upstream/doxygen.git] / src / section.h
1 /******************************************************************************
2  *
3  * $Id: section.h,v 1.7 2001/03/19 19:27:41 root Exp $
4  *
5  *
6  * Copyright (C) 1997-2012 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 /** Class representing a section in a page */
30 struct SectionInfo
31 {
32   enum SectionType { Page          = 0, 
33                      Section       = 1, 
34                      Subsection    = 2, 
35                      Subsubsection = 3, 
36                      Paragraph     = 4, 
37                      Anchor        = 5 
38                    };
39   SectionInfo(const char *f,const char *l,const char *t,
40               SectionType st,int lev,const char *r=0) :
41     label(l), title(t), type(st), ref(r), definition(0), 
42     fileName(f), generated(FALSE), level(lev)
43   { 
44   }
45   SectionInfo(const SectionInfo &s)
46   {
47     label=s.label.copy(); title=s.title.copy(); ref=s.ref.copy();
48     type =s.type; definition=s.definition;
49     fileName=s.fileName.copy(); generated=s.generated;
50   }
51  ~SectionInfo() {}
52   QCString label; 
53   QCString title;
54   SectionType type;
55   QCString ref;
56   Definition *definition;
57   QCString fileName;
58   bool generated;
59   int level;
60 };
61
62 /** Unsorted dictionary of SectionInfo objects. */
63 class SectionDict : public SDict<SectionInfo>
64 {
65   public:
66     SectionDict(int size) : SDict<SectionInfo>(size) {}
67    ~SectionDict() {}
68 };
69
70 #endif