Fix for UBSan build
[platform/upstream/doxygen.git] / src / types.h
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2012 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby 
7  * granted. No representations are made about the suitability of this software 
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15
16 #ifndef TYPES_H
17 #define TYPES_H
18
19 #include "qtbc.h"
20
21 /** @file
22  *  @brief This file contains a number of basic enums and types. 
23  */
24
25 enum Protection   { Public, Protected, Private, Package } ;
26 enum Specifier    { Normal, Virtual, Pure } ;
27 enum MethodTypes  { Method, Signal, Slot, DCOP, Property, Event };
28 enum RelatesType  { Simple, Duplicate, MemberOf };
29 enum Relationship { Member, Related, Foreign };
30 enum SrcLangExt
31 {
32   SrcLangExt_Unknown  = 0x00000,
33   SrcLangExt_IDL      = 0x00008,
34   SrcLangExt_Java     = 0x00010,
35   SrcLangExt_CSharp   = 0x00020,
36   SrcLangExt_D        = 0x00040,
37   SrcLangExt_PHP      = 0x00080,
38   SrcLangExt_ObjC     = 0x00100,
39   SrcLangExt_Cpp      = 0x00200,
40   SrcLangExt_JS       = 0x00400,
41   SrcLangExt_Python   = 0x00800,
42   SrcLangExt_Fortran  = 0x01000,
43   SrcLangExt_VHDL     = 0x02000,
44   SrcLangExt_XML      = 0x04000,
45   SrcLangExt_Tcl      = 0x08000,
46   SrcLangExt_Markdown = 0x10000
47 };
48
49 struct Grouping 
50 {
51   enum GroupPri_t 
52   {
53     GROUPING_LOWEST,
54     GROUPING_AUTO_WEAK = GROUPING_LOWEST,     //!< membership in group was defined via \@weakgroup 
55     GROUPING_AUTO_ADD,     //!< membership in group was defined via \@add[to]group 
56     GROUPING_AUTO_DEF,     //!< membership in group was defined via \@defgroup
57     GROUPING_AUTO_HIGHEST = GROUPING_AUTO_DEF,
58     GROUPING_INGROUP,      //!< membership in group was defined by \@ingroup
59     GROUPING_HIGHEST = GROUPING_INGROUP
60   };
61
62   static const char *getGroupPriName( GroupPri_t priority )
63   {
64     switch( priority )
65     {
66       case GROUPING_AUTO_WEAK:
67         return "@weakgroup";
68       case GROUPING_AUTO_ADD:
69         return "@addtogroup";
70       case GROUPING_AUTO_DEF:
71         return "@defgroup";
72       case GROUPING_INGROUP:
73         return "@ingroup";
74     }       
75     return "???";
76   }
77
78   Grouping( const char *gn, GroupPri_t p ) : groupname(gn), pri(p) {}
79   Grouping( const Grouping &g ) : groupname(g.groupname), pri(g.pri) {}
80   QCString groupname;   //!< name of the group
81   GroupPri_t pri;       //!< priority of this definition
82
83 };
84
85 struct ListItemInfo
86 {
87   QCString type;
88   int itemId;
89 };
90
91
92 #endif