Basic Collection class unit test
[LibreOffice.git] / include / registry / types.hxx
bloba9763f5ea6bb59ee8144f71d19b6e1c129973a20
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
33 /** specifies that the structure of the given blob is unknown and can't be
34 read.
36 RT_TYPE_INVALID,
38 /** specifies that the blob represents an interface type. An interface blob
39 can contain a base interface, attributes and methods.
41 RT_TYPE_INTERFACE,
43 /** specifies that the blob represents a module type. A module blob can
44 contain a base module and constant members (fields).
46 RT_TYPE_MODULE,
48 /** specifies that the blob represents a struct type. A struct blob can
49 contain a base struct and members (fields).
51 RT_TYPE_STRUCT,
53 /** specifies that the blob represents an enum type. An enum blob can
54 contain enum values which are accessible as fields.
56 RT_TYPE_ENUM,
58 /** specifies that the blob represents an exception type. An exception blob
59 can contain a base exception and members (fields).
61 RT_TYPE_EXCEPTION,
63 /** specifies that the blob represents a typedef type. A typedef blob can
64 contain a base type.
66 RT_TYPE_TYPEDEF,
68 /** specifies that the blob represents a service type. A service blob can
69 contain a base service, properties (fields), references to services or
70 interfaces.
72 RT_TYPE_SERVICE,
74 /** specifies that the blob represents a singleton type (a named object)
75 which refers exactly one existing service.
77 RT_TYPE_SINGLETON,
79 /// deprecated, not used.
80 RT_TYPE_OBJECT,
82 /** specifies that the blob represents a constants type. A constants blob
83 can contain constant types as fields.
85 RT_TYPE_CONSTANTS,
87 /** @deprecated
88 a union type was evaluated but currently not supported.
90 RT_TYPE_UNION,
92 /// @cond INTERNAL
93 /**
94 Flag for published entities.
96 Used in combination with RT_TYPE_INTERFACE, RT_TYPE_STRUCT, RT_TYPE_ENUM,
97 RT_TYPE_EXCEPTION, RT_TYPE_TYPEDEF, RT_TYPE_SERVICE, RT_TYPE_SINGLETON,
98 or RT_TYPE_CONSTANTS to mark an entity as published.
100 (The value of this enumerator is chosen so that it is unlikely that its
101 addition changes the underlying type of this enumeration for any C/C++
102 compiler.)
104 @since UDK 3.2.0
106 RT_TYPE_PUBLISHED = 0x4000
107 /// @endcond
110 /** specifies the type for the field access.
112 Fields in a type blob are used for different types. Among others they were
113 used for properties of services and these properties can have several flags.
115 @see RTFieldAccess::INVALID
116 @see RTFieldAccess::READONLY
117 @see RTFieldAccess::OPTIONAL
118 @see RTFieldAccess::MAYBEVOID
119 @see RTFieldAccess::BOUND
120 @see RTFieldAccess::CONSTRAINED
121 @see RTFieldAccess::TRANSIENT
122 @see RTFieldAccess::MAYBEAMBIGUOUS
123 @see RTFieldAccess::MAYBEDEFAULT
124 @see RTFieldAccess::REMOVABLE
125 @see RTFieldAccess::ATTRIBUTE
126 @see RTFieldAccess::PROPERTY
127 @see RTFieldAccess::CONST
128 @see RTFieldAccess::READWRITE
129 @see RTFieldAccess::DEFAULT
130 @see RTFieldAccess::PARAMETERIZED_TYPE
131 @see RTFieldAccess::PUBLISHED
133 enum class RTFieldAccess
135 NONE = 0x0000,
136 /// specifies an unknown flag
137 INVALID = 0x0000,
138 /// specifies a readonly property/attribute
139 READONLY = 0x0001,
140 /// specifies a property as optional that means that it must not be implemented.
141 OPTIONAL = 0x0002,
142 /// @see com::sun::star::beans::PropertyAttribute
143 MAYBEVOID = 0x0004,
144 /// @see com::sun::star::beans::PropertyAttribute
145 BOUND = 0x0008,
146 /// @see com::sun::star::beans::PropertyAttribute
147 CONSTRAINED = 0x0010,
148 /// @see com::sun::star::beans::PropertyAttribute
149 TRANSIENT = 0x0020,
150 /// @see com::sun::star::beans::PropertyAttribute
151 MAYBEAMBIGUOUS = 0x0040,
152 /// @see com::sun::star::beans::PropertyAttribute
153 MAYBEDEFAULT = 0x0080,
154 /// @see com::sun::star::beans::PropertyAttribute
155 REMOVABLE = 0x0100,
156 /// @see com::sun::star::beans::PropertyAttribute
157 ATTRIBUTE = 0x0200,
158 /// specifies that the field is a property
159 PROPERTY = 0x0400,
160 /// specifies that the field is a constant or enum value
161 CONST = 0x0800,
162 /// specifies that the property/attribute has read/write access
163 READWRITE = 0x1000,
164 /// only to describe a union default label
165 DEFAULT = 0x2000,
167 Indicates that a member of a polymorphic struct type template is of a
168 parameterized type.
170 Only valid for fields that represent members of polymorphic struct type
171 templates.
173 @since UDK 3.2.0
175 PARAMETERIZED_TYPE = 0x4000,
177 Flag for published individual constants.
179 Used in combination with RTFieldAccess::CONST for individual constants (which are
180 not members of constant groups).
182 @since UDK 3.2.0
184 PUBLISHED = 0x8000,
187 namespace o3tl
189 template <> struct typed_flags<RTFieldAccess> : is_typed_flags<RTFieldAccess, 0xffff>
194 /** specifies the type of a field value.
196 A field can have a value if it represents a constant or an enum value.
198 enum RTValueType
200 RT_TYPE_NONE,
201 RT_TYPE_BOOL,
202 RT_TYPE_BYTE,
203 RT_TYPE_INT16,
204 RT_TYPE_UINT16,
205 RT_TYPE_INT32,
206 RT_TYPE_UINT32,
207 RT_TYPE_INT64,
208 RT_TYPE_UINT64,
209 RT_TYPE_FLOAT,
210 RT_TYPE_DOUBLE,
211 RT_TYPE_STRING
214 /** specifies a variable container for field values.
216 union RTConstValueUnion {
217 bool aBool;
218 sal_Int8 aByte;
219 sal_Int16 aShort;
220 sal_uInt16 aUShort;
221 sal_Int32 aLong;
222 sal_uInt32 aULong;
223 sal_Int64 aHyper;
224 sal_uInt64 aUHyper;
225 float aFloat;
226 double aDouble;
227 sal_Unicode const* aString;
230 /** specifies the mode of a method.
232 A method can be synchron or asynchron (oneway). The const attribute for
233 methods was removed so that the const values are deprecated.
235 enum class RTMethodMode
237 /// indicates an invalid mode
238 INVALID,
240 /// indicates the asynchronous mode of a method
241 ONEWAY,
243 /// @deprecated
244 ONEWAY_CONST,
246 /// indicated the synchronous mode of a method
247 TWOWAY,
249 /// @deprecated
250 TWOWAY_CONST,
253 Indicates an extended attribute getter (that has a 'raises' clause) of an
254 interface type.
256 @since UDK 3.2.0
258 ATTRIBUTE_GET,
261 Indicates an extended attribute setter (that has a 'raises' clause) of an
262 interface type.
264 @since UDK 3.2.0
266 ATTRIBUTE_SET
269 /** specifies the mode of a parameter.
271 There are three parameter modes which have impact of the handling of the
272 parameter in the UNO bridges and the UNO code generation.
274 enum RTParamMode
276 /// indicates an invalid parameter mode
277 RT_PARAM_INVALID = 0,
279 /// indicates a pure in parameter which is used by value
280 RT_PARAM_IN = 1,
282 /// indicates a pure out parameter which is used by reference
283 RT_PARAM_OUT = 2,
285 /// indicates a in and out parameter which is used also by reference
286 RT_PARAM_INOUT = 3,
289 Indicates a rest parameter (currently only valid for service
290 constructors).
292 This value can be combined with any of RT_PARAM_IN, RT_PARAM_OUT, and
293 RT_PARAM_INOUT (however, service constructors currently only allow
294 RT_PARAM_IN, anyway).
296 @since UDK 3.2.0
298 RT_PARAM_REST = 4
301 /** specifies the type of a reference used in a service description.
303 enum class RTReferenceType
305 /// the reference type is unknown
306 INVALID,
308 /** the service support the interface that means an implementation of this
309 service must implement this interface.
311 SUPPORTS,
313 /** @deprecated
314 the service observes the interface.
316 OBSERVES,
318 /** the service exports the specified service that means this service
319 provides also the specified service.
321 EXPORTS,
323 /** @deprecated
324 the service needs the specified service that means in the context of
325 this service the specified service will be used or must be available.
327 NEEDS,
330 Indicates a type parameter of a polymorphic struct type template.
332 @since UDK 3.2.0
334 TYPE_PARAMETER
337 #endif
339 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */