Bump version to 6.4-15
[LibreOffice.git] / include / registry / types.hxx
blobbabebbcec79bff752c90c08845eb9f38963ad364
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 .
20 #ifndef INCLUDED_REGISTRY_TYPES_H
21 #define INCLUDED_REGISTRY_TYPES_H
23 #include <sal/types.h>
24 #include <o3tl/typed_flags_set.hxx>
26 /** specifies the typeclass of a binary type blob.
28 The general structure of a binary type blob is always the same. It depends
29 on the typeclass which parts of the blob are filled with data or not.
31 enum RTTypeClass {
32 /** specifies that the structure of the given blob is unknown and can't be
33 read.
35 RT_TYPE_INVALID,
37 /** specifies that the blob represents an interface type. An interface blob
38 can contain a base interface, attributes and methods.
40 RT_TYPE_INTERFACE,
42 /** specifies that the blob represents a module type. A module blob can
43 contain a base module and constant members (fields).
45 RT_TYPE_MODULE,
47 /** specifies that the blob represents a struct type. A struct blob can
48 contain a base struct and members (fields).
50 RT_TYPE_STRUCT,
52 /** specifies that the blob represents an enum type. An enum blob can
53 contain enum values which are accessible as fields.
55 RT_TYPE_ENUM,
57 /** specifies that the blob represents an exception type. An exception blob
58 can contain a base exception and members (fields).
60 RT_TYPE_EXCEPTION,
62 /** specifies that the blob represents a typedef type. A typedef blob can
63 contain a base type.
65 RT_TYPE_TYPEDEF,
67 /** specifies that the blob represents a service type. A service blob can
68 contain a base service, properties (fields), references to services or
69 interfaces.
71 RT_TYPE_SERVICE,
73 /** specifies that the blob represents a singleton type (a named object)
74 which refers exactly one existing service.
76 RT_TYPE_SINGLETON,
78 /// deprecated, not used.
79 RT_TYPE_OBJECT,
81 /** specifies that the blob represents a constants type. A constants blob
82 can contain constant types as fields.
84 RT_TYPE_CONSTANTS,
86 /** @deprecated
87 a union type was evaluated but currently not supported.
89 RT_TYPE_UNION,
91 /// @cond INTERNAL
92 /**
93 Flag for published entities.
95 Used in combination with RT_TYPE_INTERFACE, RT_TYPE_STRUCT, RT_TYPE_ENUM,
96 RT_TYPE_EXCEPTION, RT_TYPE_TYPEDEF, RT_TYPE_SERVICE, RT_TYPE_SINGLETON,
97 or RT_TYPE_CONSTANTS to mark an entity as published.
99 (The value of this enumerator is chosen so that it is unlikely that its
100 addition changes the underlying type of this enumeration for any C/C++
101 compiler.)
103 @since UDK 3.2.0
105 RT_TYPE_PUBLISHED = 0x4000
106 /// @endcond
109 /** specifies the type for the field access.
111 Fields in a type blob are used for different types. Among others they were
112 used for properties of services and these properties can have several flags.
114 @see RTFieldAccess::INVALID
115 @see RTFieldAccess::READONLY
116 @see RTFieldAccess::OPTIONAL
117 @see RTFieldAccess::MAYBEVOID
118 @see RTFieldAccess::BOUND
119 @see RTFieldAccess::CONSTRAINED
120 @see RTFieldAccess::TRANSIENT
121 @see RTFieldAccess::MAYBEAMBIGUOUS
122 @see RTFieldAccess::MAYBEDEFAULT
123 @see RTFieldAccess::REMOVABLE
124 @see RTFieldAccess::ATTRIBUTE
125 @see RTFieldAccess::PROPERTY
126 @see RTFieldAccess::CONST
127 @see RTFieldAccess::READWRITE
128 @see RTFieldAccess::DEFAULT
129 @see RTFieldAccess::PARAMETERIZED_TYPE
130 @see RTFieldAccess::PUBLISHED
132 enum class RTFieldAccess
134 NONE = 0x0000,
135 /// specifies an unknown flag
136 INVALID = 0x0000,
137 /// specifies a readonly property/attribute
138 READONLY = 0x0001,
139 /// specifies a property as optional that means that it must not be implemented.
140 OPTIONAL = 0x0002,
141 /// @see com::sun::star::beans::PropertyAttribute
142 MAYBEVOID = 0x0004,
143 /// @see com::sun::star::beans::PropertyAttribute
144 BOUND = 0x0008,
145 /// @see com::sun::star::beans::PropertyAttribute
146 CONSTRAINED = 0x0010,
147 /// @see com::sun::star::beans::PropertyAttribute
148 TRANSIENT = 0x0020,
149 /// @see com::sun::star::beans::PropertyAttribute
150 MAYBEAMBIGUOUS = 0x0040,
151 /// @see com::sun::star::beans::PropertyAttribute
152 MAYBEDEFAULT = 0x0080,
153 /// @see com::sun::star::beans::PropertyAttribute
154 REMOVABLE = 0x0100,
155 /// @see com::sun::star::beans::PropertyAttribute
156 ATTRIBUTE = 0x0200,
157 /// specifies that the field is a property
158 PROPERTY = 0x0400,
159 /// specifies that the field is a constant or enum value
160 CONST = 0x0800,
161 /// specifies that the property/attribute has read/write access
162 READWRITE = 0x1000,
163 /// only to describe a union default label
164 DEFAULT = 0x2000,
166 Indicates that a member of a polymorphic struct type template is of a
167 parameterized type.
169 Only valid for fields that represent members of polymorphic struct type
170 templates.
172 @since UDK 3.2.0
174 PARAMETERIZED_TYPE = 0x4000,
176 Flag for published individual constants.
178 Used in combination with RTFieldAccess::CONST for individual constants (which are
179 not members of constant groups).
181 @since UDK 3.2.0
183 PUBLISHED = 0x8000,
186 namespace o3tl
188 template<> struct typed_flags<RTFieldAccess> : is_typed_flags<RTFieldAccess, 0xffff> {};
191 /** specifies the type of a field value.
193 A field can have a value if it represents a constant or an enum value.
195 enum RTValueType {
196 RT_TYPE_NONE,
197 RT_TYPE_BOOL,
198 RT_TYPE_BYTE,
199 RT_TYPE_INT16,
200 RT_TYPE_UINT16,
201 RT_TYPE_INT32,
202 RT_TYPE_UINT32,
203 RT_TYPE_INT64,
204 RT_TYPE_UINT64,
205 RT_TYPE_FLOAT,
206 RT_TYPE_DOUBLE,
207 RT_TYPE_STRING
210 /** specifies a variable container for field values.
212 union RTConstValueUnion {
213 bool aBool;
214 sal_Int8 aByte;
215 sal_Int16 aShort;
216 sal_uInt16 aUShort;
217 sal_Int32 aLong;
218 sal_uInt32 aULong;
219 sal_Int64 aHyper;
220 sal_uInt64 aUHyper;
221 float aFloat;
222 double aDouble;
223 sal_Unicode const * aString;
226 /** specifies the mode of a method.
228 A method can be synchron or asynchron (oneway). The const attribute for
229 methods was removed so that the const values are deprecated.
231 enum class RTMethodMode {
232 /// indicates an invalid mode
233 INVALID,
235 /// indicates the asynchronous mode of a method
236 ONEWAY,
238 /// @deprecated
239 ONEWAY_CONST,
241 /// indicated the synchronous mode of a method
242 TWOWAY,
244 /// @deprecated
245 TWOWAY_CONST,
248 Indicates an extended attribute getter (that has a 'raises' clause) of an
249 interface type.
251 @since UDK 3.2.0
253 ATTRIBUTE_GET,
256 Indicates an extended attribute setter (that has a 'raises' clause) of an
257 interface type.
259 @since UDK 3.2.0
261 ATTRIBUTE_SET
264 /** specifies the mode of a parameter.
266 There are three parameter modes which have impact of the handling of the
267 parameter in the UNO bridges and the UNO code generation.
269 enum RTParamMode {
270 /// indicates an invalid parameter mode
271 RT_PARAM_INVALID = 0,
273 /// indicates a pure in parameter which is used by value
274 RT_PARAM_IN = 1,
276 /// indicates a pure out parameter which is used by reference
277 RT_PARAM_OUT = 2,
279 /// indicates a in and out parameter which is used also by reference
280 RT_PARAM_INOUT = 3,
283 Indicates a rest parameter (currently only valid for service
284 constructors).
286 This value can be combined with any of RT_PARAM_IN, RT_PARAM_OUT, and
287 RT_PARAM_INOUT (however, service constructors currently only allow
288 RT_PARAM_IN, anyway).
290 @since UDK 3.2.0
292 RT_PARAM_REST = 4
295 /** specifies the type of a reference used in a service description.
297 enum class RTReferenceType {
298 /// the reference type is unknown
299 INVALID,
301 /** the service support the interface that means an implementation of this
302 service must implement this interface.
304 SUPPORTS,
306 /** @deprecated
307 the service observes the interface.
309 OBSERVES,
311 /** the service exports the specified service that means this service
312 provides also the specified service.
314 EXPORTS,
316 /** @deprecated
317 the service needs the specified service that means in the context of
318 this service the specified service will be used or must be available.
320 NEEDS,
323 Indicates a type parameter of a polymorphic struct type template.
325 @since UDK 3.2.0
327 TYPE_PARAMETER
330 #endif
332 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */