1 /*
2  * Copyright 2006-2008 The FLWOR Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef ZORBA_SHARED_TYPES_H
17 #define ZORBA_SHARED_TYPES_H
18 
19 #include "zorbamisc/config/platform.h"
20 
21 #include "zorbatypes/rchandle.h"
22 
23 #include "store/api/shared_types.h"
24 
25 namespace zorba
26 {
27 
28 class XQueryDiagnostics;
29 
30 namespace types
31 {
32   class TypeIdentifier;
33 };
34 
35 
36 class TypeManager;
37 class XQType;
38 class NodeNameTest;
39 typedef const_rchandle<XQType> xqtref_t;
40 typedef rchandle<NodeNameTest> NodeNameTest_t;
41 
42 class XQPCollator;
43 
44 class QueryLoc;
45 
46 class function;
47 typedef rchandle<function> function_t;
48 
49 class user_function;
50 typedef rchandle<user_function> user_function_t;
51 
52 class ItemIterator;
53 
54 class CompilerCB;
55 class XQueryCompiler;
56 class XQueryCompilerSubsystem;
57 class Rewriter;
58 class RewriterContext;
59 
60 class context;
61 class static_context;
62 class dynamic_context;
63 class namespace_context;
64 typedef rchandle<static_context> static_context_t;
65 
66 /* runtime */
67 class RuntimeCB;
68 class PlanWrapper;
69 class PlanIterator;
70 class PlanState;
71 class ForVarIterator;
72 class LetVarIterator;
73 
74 typedef rchandle<PlanIterator> PlanIter_t;
75 typedef rchandle<PlanWrapper> PlanWrapper_t;
76 typedef rchandle<ItemIterator> ItemIterator_t;
77 typedef rchandle<ForVarIterator> ForVarIter_t;
78 typedef rchandle<LetVarIterator> LetVarIter_t;
79 
80 class ValueIndexInsertSession;
81 typedef rchandle<ValueIndexInsertSession> ValueIndexInsertSession_t;
82 
83 
84 // Parsenodes
85 class parsenode;
86 class exprnode;
87 typedef rchandle<parsenode> parsenode_t;
88 
89 // Annotations
90 class AnnotationList;
91 typedef rchandle<AnnotationList> AnnotationList_t;
92 
93 // Expression nodes
94 class expr;
95 class fo_expr;
96 class var_expr;
97 class flwor_clause;
98 class forletwin_clause;
99 class for_clause;
100 class let_clause;
101 
102 class ItemVariableIterator;
103 typedef rchandle<ItemVariableIterator> ItemVariableIterator_t;
104 
105 typedef rchandle<namespace_context> NamespaceContext_t;
106 
107 typedef rchandle<CompilerCB> CompilerCB_t;
108 
109 
110 /* datetime stuff */
111 class DateTime;
112 class Date;
113 class Decimal;
114 class Duration;
115 class Time;
116 class TimeZone;
117 class GYearMonth;
118 class GYear;
119 class GMonthDay;
120 class GDay;
121 class GMonth;
122 class xqpString;
123 class xqpStringStore;
124 typedef rchandle<xqpStringStore> xqpStringStore_t;
125 typedef rchandle<DateTime> DateTime_t;
126 typedef rchandle<Date> Date_t;
127 typedef rchandle<Time> Time_t;
128 typedef rchandle<TimeZone> TimeZone_t;
129 typedef rchandle<Duration> Duration_t;
130 typedef rchandle<GYearMonth> GYearMonth_t;
131 typedef rchandle<GYear> GYear_t;
132 typedef rchandle<GMonthDay> GMonthDay_t;
133 typedef rchandle<GDay> GDay_t;
134 typedef rchandle<GMonth> GMonth_t;
135 
136 /* numerics */
137 template<typename FloatType> class FloatImpl;
138 typedef FloatImpl<double> Double;
139 typedef FloatImpl<float>  Float;
140 #ifdef ZORBA_WITH_BIG_INTEGER
141 class IntegerImpl;
142 typedef IntegerImpl Integer;
143 typedef IntegerImpl UInteger;
144 #else
145 template<typename IntType> class IntegerImpl;
146 typedef IntegerImpl<long long> Integer;
147 typedef IntegerImpl<unsigned long long> UInteger;
148 #endif /* ZORBA_WITH_BIG_INTEGER */
149 
150 /* api */
151 class serializer;
152 
153 } // namespace zorba
154 
155 #endif /* ZORBA_SHARED_TYPES_H */
156 /*
157  * Local variables:
158  * mode: c++
159  * End:
160  */
161 /* vim:set et sw=2 ts=2: */
162