1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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.
33 /** specifies that the structure of the given blob is unknown and can't be
38 /** specifies that the blob represents an interface type. An interface blob
39 can contain a base interface, attributes and methods.
43 /** specifies that the blob represents a module type. A module blob can
44 contain a base module and constant members (fields).
48 /** specifies that the blob represents a struct type. A struct blob can
49 contain a base struct and members (fields).
53 /** specifies that the blob represents an enum type. An enum blob can
54 contain enum values which are accessible as fields.
58 /** specifies that the blob represents an exception type. An exception blob
59 can contain a base exception and members (fields).
63 /** specifies that the blob represents a typedef type. A typedef blob can
68 /** specifies that the blob represents a service type. A service blob can
69 contain a base service, properties (fields), references to services or
74 /** specifies that the blob represents a singleton type (a named object)
75 which refers exactly one existing service.
79 /// deprecated, not used.
82 /** specifies that the blob represents a constants type. A constants blob
83 can contain constant types as fields.
88 a union type was evaluated but currently not supported.
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++
106 RT_TYPE_PUBLISHED
= 0x4000
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
136 /// specifies an unknown flag
138 /// specifies a readonly property/attribute
140 /// specifies a property as optional that means that it must not be implemented.
142 /// @see com::sun::star::beans::PropertyAttribute
144 /// @see com::sun::star::beans::PropertyAttribute
146 /// @see com::sun::star::beans::PropertyAttribute
147 CONSTRAINED
= 0x0010,
148 /// @see com::sun::star::beans::PropertyAttribute
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
156 /// @see com::sun::star::beans::PropertyAttribute
158 /// specifies that the field is a property
160 /// specifies that the field is a constant or enum value
162 /// specifies that the property/attribute has read/write access
164 /// only to describe a union default label
167 Indicates that a member of a polymorphic struct type template is of a
170 Only valid for fields that represent members of polymorphic struct type
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).
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.
214 /** specifies a variable container for field values.
216 union RTConstValueUnion
{
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
240 /// indicates the asynchronous mode of a method
246 /// indicated the synchronous mode of a method
253 Indicates an extended attribute getter (that has a 'raises' clause) of an
261 Indicates an extended attribute setter (that has a 'raises' clause) of an
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.
276 /// indicates an invalid parameter mode
277 RT_PARAM_INVALID
= 0,
279 /// indicates a pure in parameter which is used by value
282 /// indicates a pure out parameter which is used by reference
285 /// indicates a in and out parameter which is used also by reference
289 Indicates a rest parameter (currently only valid for service
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).
301 /** specifies the type of a reference used in a service description.
303 enum class RTReferenceType
305 /// the reference type is unknown
308 /** the service support the interface that means an implementation of this
309 service must implement this interface.
314 the service observes the interface.
318 /** the service exports the specified service that means this service
319 provides also the specified service.
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.
330 Indicates a type parameter of a polymorphic struct type template.
339 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */