1 // Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to deal
5 // in the Software without restriction, including without limitation the rights
6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 // copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 // THE SOFTWARE.
20 
21 #pragma once
22 
23 #include <cstdlib>
24 #include <cstddef>
25 
26 #ifdef CPLUSPLUS_WITHOUT_QT
27 #  ifndef CPLUSPLUS_UNLIKELY
28 #    ifdef __GNUC__
29 #      define CPLUSPLUS_UNLIKELY(expr) __builtin_expect(!!(expr), false)
30 #    else
31 #      define CPLUSPLUS_UNLIKELY(expr) (expr)
32 #    endif
33 #  endif
34 #  define CPLUSPLUS_EXPORT
35 #else
36 #  include <qglobal.h>
37 #  ifndef CPLUSPLUS_UNLIKELY
38 #    ifdef Q_UNLIKELY
39 #      define CPLUSPLUS_UNLIKELY(expr) Q_UNLIKELY(expr)
40 #    else // pre 4.8.something
41 #      ifdef __GCC__
42 #        define CPLUSPLUS_UNLIKELY(expr) __builtin_expect(!!(expr), false)
43 #      else
44 #        define CPLUSPLUS_UNLIKELY(expr) (expr)
45 #      endif
46 #    endif
47 #  endif
48 #  if defined(CPLUSPLUS_BUILD_LIB)
49 #    define CPLUSPLUS_EXPORT Q_DECL_EXPORT
50 #  elif defined(CPLUSPLUS_BUILD_STATIC_LIB)
51 #    define CPLUSPLUS_EXPORT
52 #  else
53 #    define CPLUSPLUS_EXPORT Q_DECL_IMPORT
54 #  endif
55 #endif
56 
57 namespace CPlusPlus {
58 
59 class TranslationUnit;
60 class Control;
61 class MemoryPool;
62 class DiagnosticClient;
63 
64 class Identifier;
65 class Literal;
66 class StringLiteral;
67 class NumericLiteral;
68 
69 class SymbolTable;
70 
71 // names
72 class NameVisitor;
73 class Name;
74 class Identifier;
75 class AnonymousNameId;
76 class TemplateNameId;
77 class DestructorNameId;
78 class OperatorNameId;
79 class ConversionNameId;
80 class QualifiedNameId;
81 class SelectorNameId;
82 
83 // types
84 class Matcher;
85 class FullySpecifiedType;
86 class TypeVisitor;
87 class Type;
88 class UndefinedType;
89 class VoidType;
90 class IntegerType;
91 class FloatType;
92 class PointerToMemberType;
93 class PointerType;
94 class ReferenceType;
95 class ArrayType;
96 class NamedType;
97 
98 // symbols
99 class Clone;
100 class Subst;
101 
102 class SymbolVisitor;
103 class Symbol;
104 class Scope;
105 class UsingNamespaceDirective;
106 class UsingDeclaration;
107 class Declaration;
108 class Argument;
109 class TypenameArgument;
110 class Function;
111 class Namespace;
112 class NamespaceAlias;
113 class Template;
114 class BaseClass;
115 class Block;
116 class Class;
117 class Enum;
118 class EnumeratorDeclaration;
119 class ForwardClassDeclaration;
120 
121 class Token;
122 
123 // Qt symbols
124 class QtPropertyDeclaration;
125 class QtEnum;
126 
127 // Objective-C symbols
128 class ObjCBaseClass;
129 class ObjCBaseProtocol;
130 class ObjCClass;
131 class ObjCForwardClassDeclaration;
132 class ObjCProtocol;
133 class ObjCForwardProtocolDeclaration;
134 class ObjCMethod;
135 class ObjCPropertyDeclaration;
136 
137 } // namespace CPlusPlus
138