Bump version to 6.0-14
[LibreOffice.git] / idlc / inc / idlctypes.hxx
blob8f6f799f11ff4a9994a6437817d2c5ef3aebcd15
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_IDLC_INC_IDLCTYPES_HXX
20 #define INCLUDED_IDLC_INC_IDLCTYPES_HXX
22 #include <stdio.h>
24 #include <list>
25 #include <set>
26 #include <string>
27 #include <unordered_map>
28 #include <vector>
30 #include <sal/types.h>
31 #include <rtl/ustring.hxx>
34 class AstDeclaration;
36 typedef std::list< AstDeclaration* > DeclList;
38 class AstScope;
39 AstDeclaration* SAL_CALL scopeAsDecl(AstScope* pScope);
40 AstScope* SAL_CALL declAsScope(AstDeclaration* pDecl);
42 #ifdef _MSC_VER
43 #pragma warning( disable : 4541 )
44 #endif
46 // flags used for attributes, properties and services
47 #define AF_INVALID 0x0000
48 #define AF_READONLY 0x0001
49 #define AF_OPTIONAL 0x0002
50 #define AF_MAYBEVOID 0x0004
51 #define AF_BOUND 0x0008
52 #define AF_CONSTRAINED 0x0010
53 #define AF_TRANSIENT 0x0020
54 #define AF_MAYBEAMBIGUOUS 0x0040
55 #define AF_MAYBEDEFAULT 0x0080
56 #define AF_REMOVABLE 0x0100
57 #define AF_ATTRIBUTE 0x0200
58 #define AF_PROPERTY 0x0400
60 enum ParseState
62 PS_NoState,
63 PS_TypeDeclSeen, // Seen complete typedef declaration
64 PS_ConstantDeclSeen, // Seen complete const declaration
65 PS_ExceptionDeclSeen, // Seen complete exception declaration
66 PS_InterfaceDeclSeen, // Seen complete interface declaration
67 PS_ServiceDeclSeen, // Seen complete service declaration
68 PS_SingletonDeclSeen, // Seen complete singleton declaration
69 PS_ModuleDeclSeen, // Seen complete module declaration
70 PS_AttributeDeclSeen, // Seen complete attribute declaration
71 PS_PropertyDeclSeen, // Seen complete property declaration
72 PS_OperationDeclSeen, // Seen complete operation declaration
73 PS_InterfaceInheritanceDeclSeen, // Seen complete interface inheritance decl
74 PS_ConstantsDeclSeen, // Seen complete constants declaration
76 PS_ServiceSeen, // Seen a SERVICE keyword
77 PS_ServiceIDSeen, // Seen the service ID
78 PS_ServiceSqSeen, // '{' seen for service
79 PS_ServiceQsSeen, // '}' seen for service
80 PS_ServiceBodySeen, // Seen complete service body
81 PS_ServiceMemberSeen, // Seen a service member
82 PS_ServiceIFHeadSeen, // Seen an interface member header
83 PS_ServiceSHeadSeen, // Seen an service member header
85 PS_SingletonSeen, // Seen a SINGLETON keyword
86 PS_SingletonIDSeen, // Seen the singleton ID
87 PS_SingletonSqSeen, // '{' seen for singleton
88 PS_SingletonQsSeen, // '}' seen for singleton
89 PS_SingletonBodySeen, // Seen complete singleton body
91 PS_ModuleSeen, // Seen a MODULE keyword
92 PS_ModuleIDSeen, // Seen the module ID
93 PS_ModuleSqSeen, // '{' seen for module
94 PS_ModuleQsSeen, // '}' seen for module
95 PS_ModuleBodySeen, // Seen complete module body
97 PS_ConstantsSeen, // Seen a CONSTANTS keyword
98 PS_ConstantsIDSeen, // Seen the constants ID
99 PS_ConstantsSqSeen, // '{' seen for constants
100 PS_ConstantsQsSeen, // '}' seen for constants
101 PS_ConstantsBodySeen, // Seen complete constants body
103 PS_InterfaceSeen, // Seen an INTERFACE keyword
104 PS_InterfaceIDSeen, // Seen the interface ID
105 PS_InterfaceHeadSeen, // Seen the interface head
106 PS_InheritSpecSeen, // Seen a complete inheritance spec
107 PS_ForwardDeclSeen, // Forward interface decl seen
108 PS_InterfaceSqSeen, // '{' seen for interface
109 PS_InterfaceQsSeen, // '}' seen for interface
110 PS_InterfaceBodySeen, // Seen an interface body
111 PS_InheritColonSeen, // Seen ':' in inheritance list
113 PS_SNListCommaSeen, // Seen ',' in list of scoped names
114 PS_ScopedNameSeen, // Seen a complete scoped name
115 PS_SN_IDSeen, // Seen an identifier as part of a scoped name
116 PS_ScopeDelimSeen, // Seen a scope delim as party of a scoped name
118 PS_ConstSeen, // Seen a CONST keyword
119 PS_ConstTypeSeen, // Parsed the type of a constant
120 PS_ConstIDSeen, // Seen the constant ID
121 PS_ConstAssignSeen, // Seen the '='
122 PS_ConstExprSeen, // Seen the constant value expression
124 PS_TypedefSeen, // Seen a TYPEDEF keyword
125 PS_TypeSpecSeen, // Seen a complete type specification
126 PS_DeclaratorsSeen, // Seen a complete list of declarators
128 PS_StructSeen, // Seen a STRUCT keyword
129 PS_StructHeaderSeen, // Seen struct header
130 PS_StructIDSeen, // Seen the struct ID
131 PS_StructSqSeen, // '{' seen for struct
132 PS_StructQsSeen, // '}' seen for struct
133 PS_StructBodySeen, // Seen complete body of struct decl
135 PS_MemberTypeSeen, // Seen type of struct or except member
136 PS_MemberDeclsSeen, // Seen decls of struct or except members
137 PS_MemberDeclsCompleted,// Completed one struct or except member to ';'
139 PS_EnumSeen, // Seen an ENUM keyword
140 PS_EnumIDSeen, // Seen the enum ID
141 PS_EnumSqSeen, // Seen '{' for enum
142 PS_EnumQsSeen, // Seen '}' for enum
143 PS_EnumBodySeen, // Seen complete enum body
144 PS_EnumCommaSeen, // Seen ',' in list of enumerators
146 PS_SequenceSeen, // Seen a SEQUENCE keyword
147 PS_SequenceSqSeen, // Seen '<' for sequence
148 PS_SequenceQsSeen, // Seen '>' for sequence
149 PS_SequenceTypeSeen, // Seen type decl for sequence
151 PS_FlagHeaderSeen, // Seen the attribute|property|interface member head
152 PS_AttrSeen, // Seen ATTRIBUTE keyword
153 PS_AttrTypeSeen, // Seen type decl for attribute
154 PS_AttrCompleted, // Seen complete attribute declaration
155 PS_ReadOnlySeen, // Seen READONLY keyword
156 PS_OptionalSeen, // Seen OPTIONAL keyword
157 PS_MayBeVoidSeen, // Seen MAYBEVOID yword
158 PS_BoundSeen, // Seen BOUND keyword
159 PS_ConstrainedSeen, // Seen CONSTRAINED keyword
160 PS_TransientSeen, // Seen TRANSIENT keyword
161 PS_MayBeAmbigiousSeen, // Seen MAYBEAMBIGIOUS keyword
162 PS_MayBeDefaultSeen, // Seen MAYBEDEFAULT keyword
163 PS_RemoveableSeen, // Seen REMOVABLE keyword
165 PS_PropertySeen, // Seen PROPERTY keyword
166 PS_PropertyTypeSeen, // Seen type decl for property
167 PS_PropertyCompleted, // Seen complete property declaration
169 PS_ExceptSeen, // Seen EXCEPTION keyword
170 PS_ExceptHeaderSeen, // Seen exception header keyword
171 PS_ExceptIDSeen, // Seen exception identifier
172 PS_ExceptSqSeen, // Seen '{' for exception
173 PS_ExceptQsSeen, // Seen '}' for exception
174 PS_ExceptBodySeen, // Seen complete exception body
176 PS_OpTypeSeen, // Seen operation return type
177 PS_OpIDSeen, // Seen operation ID
178 PS_OpParsCompleted, // Completed operation param list
179 PS_OpSqSeen, // Seen '(' for operation
180 PS_OpQsSeen, // Seen ')' for operation
181 PS_OpParCommaSeen, // Seen ',' in list of op params
182 PS_OpParDirSeen, // Seen parameter direction
183 PS_OpParTypeSeen, // Seen parameter type
184 PS_OpParDeclSeen, // Seen parameter declaration
186 PS_RaiseSeen, // Seen RAISES keyword
187 PS_RaiseSqSeen, // Seen '(' for RAISES
188 PS_RaiseQsSeen, // Seen ')' for RAISES
190 PS_DeclsCommaSeen, // Seen ',' in declarators list
191 PS_DeclsDeclSeen // Seen complete decl in decls list
194 #endif // INCLUDED_IDLC_INC_IDLCTYPES_HXX
196 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */