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.
32 /** specifies that the structure of the given blob is unknown and can't be
37 /** specifies that the blob represents an interface type. An interface blob
38 can contain a base interface, attributes and methods.
42 /** specifies that the blob represents a module type. A module blob can
43 contain a base module and constant members (fields).
47 /** specifies that the blob represents a struct type. A struct blob can
48 contain a base struct and members (fields).
52 /** specifies that the blob represents an enum type. An enum blob can
53 contain enum values which are accessible as fields.
57 /** specifies that the blob represents an exception type. An exception blob
58 can contain a base exception and members (fields).
62 /** specifies that the blob represents a typedef type. A typedef blob can
67 /** specifies that the blob represents a service type. A service blob can
68 contain a base service, properties (fields), references to services or
73 /** specifies that the blob represents a singleton type (a named object)
74 which refers exactly one existing service.
78 /// deprecated, not used.
81 /** specifies that the blob represents a constants type. A constants blob
82 can contain constant types as fields.
87 a union type was evaluated but currently not supported.
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++
105 RT_TYPE_PUBLISHED
= 0x4000
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
135 /// specifies an unknown flag
137 /// specifies a readonly property/attribute
139 /// specifies a property as optional that means that it must not be implemented.
141 /// @see com::sun::star::beans::PropertyAttribute
143 /// @see com::sun::star::beans::PropertyAttribute
145 /// @see com::sun::star::beans::PropertyAttribute
146 CONSTRAINED
= 0x0010,
147 /// @see com::sun::star::beans::PropertyAttribute
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
155 /// @see com::sun::star::beans::PropertyAttribute
157 /// specifies that the field is a property
159 /// specifies that the field is a constant or enum value
161 /// specifies that the property/attribute has read/write access
163 /// only to describe a union default label
166 Indicates that a member of a polymorphic struct type template is of a
169 Only valid for fields that represent members of polymorphic struct type
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).
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.
210 /** specifies a variable container for field values.
212 union RTConstValueUnion
{
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
235 /// indicates the asynchronous mode of a method
241 /// indicated the synchronous mode of a method
248 Indicates an extended attribute getter (that has a 'raises' clause) of an
256 Indicates an extended attribute setter (that has a 'raises' clause) of an
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.
270 /// indicates an invalid parameter mode
271 RT_PARAM_INVALID
= 0,
273 /// indicates a pure in parameter which is used by value
276 /// indicates a pure out parameter which is used by reference
279 /// indicates a in and out parameter which is used also by reference
283 Indicates a rest parameter (currently only valid for service
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).
295 /** specifies the type of a reference used in a service description.
297 enum class RTReferenceType
{
298 /// the reference type is unknown
301 /** the service support the interface that means an implementation of this
302 service must implement this interface.
307 the service observes the interface.
311 /** the service exports the specified service that means this service
312 provides also the specified service.
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.
323 Indicates a type parameter of a polymorphic struct type template.
332 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */