1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef __com_sun_star_reflection_XTypeDescriptionEnumerationAccess_idl__
29#define __com_sun_star_reflection_XTypeDescriptionEnumerationAccess_idl__
30
31#ifndef __com_sun_star_uno_XInterface_idl__
32#include <com/sun/star/uno/XInterface.idl>
33#endif
34#ifndef __com_sun_star_uno_TypeClass_idl__
35#include <com/sun/star/uno/TypeClass.idl>
36#endif
37#ifndef __com_sun_star_reflection_XTypeDescriptionEnumeration_idl__
38#include <com/sun/star/reflection/XTypeDescriptionEnumeration.idl>
39#endif
40#ifndef __com_sun_star_reflection_TypeDescriptionSearchDepth_idl__
41#include <com/sun/star/reflection/TypeDescriptionSearchDepth.idl>
42#endif
43#ifndef __com_sun_star_reflection_NoSuchTypeNameException_idl__
44#include <com/sun/star/reflection/NoSuchTypeNameException.idl>
45#endif
46#ifndef __com_sun_star_reflection_InvalidTypeNameException_idl__
47#include <com/sun/star/reflection/InvalidTypeNameException.idl>
48#endif
49
50//=============================================================================
51
52 module com {  module sun {  module star {  module reflection {
53
54//=============================================================================
55
56/** Defines an interface for creating enumerations for type descriptions.
57
58    @since OOo 1.1.2
59
60  */
61published interface XTypeDescriptionEnumerationAccess : com::sun::star::uno::XInterface
62{
63    /** Creates an enumeration for type descriptions.
64
65        <p>An enumeration is always created for an UNOIDL module. The
66        enumeration contents can be restricted by specifying type classes.
67        Only types that match one of the supplied type classes will be part of
68        the collection. Additionally, it is possible to specify the depth
69        for the search within the underlying type description tree.
70
71        @param moduleName
72            contains the name of an UNOIDL module. Modules are seperated by a
73            single '.' (i.e., "com.sun.star.reflection"). The root of the module
74            hierarchy is specified with an empty string. Module names are always
75            absolute, never relative.
76
77        @param types
78            restricts the contents of the enumeration. It will only contain
79            type descriptions that match one of the supplied type classes. An
80            empty sequence specifies that the enumeration shall contain all
81            type descriptions.
82
83            <p>Valid types classes are:
84            <ul>
85            <li><member scope="com::sun::star::uno">TypeClass::MODULE</member>
86            <li><member scope="com::sun::star::uno">TypeClass::INTERFACE</member>
87            <li><member scope="com::sun::star::uno">TypeClass::SERVICE</member>
88            <li><member scope="com::sun::star::uno">TypeClass::STRUCT</member>
89            <li><member scope="com::sun::star::uno">TypeClass::ENUM</member>
90            <li><member scope="com::sun::star::uno">TypeClass::EXCEPTION</member>
91            <li><member scope="com::sun::star::uno">TypeClass::TYPEDEF</member>
92            <li><member scope="com::sun::star::uno">TypeClass::CONSTANT</member>
93            <li><member scope="com::sun::star::uno">TypeClass::CONSTANTS</member>
94            <li><member scope="com::sun::star::uno">TypeClass::SINGLETON</member>
95            </ul>
96
97        @param depth
98            specifies the depth of search in the underlying tree of type
99            descriptions. Clients should be aware of the fact that specifiying
100            <member>TypeDescriptionSearchDepth::INFINITE</member> can lead to
101            larger delays when constructing or using the
102            <type>XTypeDescriptionEnumeration</type> instance.
103
104        @returns
105            an enumeration of type descriptions.
106
107            <p>The enumeration returns implementations of
108            <type>XTypeDescription</type>. Following concrete UNOIDL parts
109            represented by specialized interfaces derived from
110            <type>XTypeDescription</type> can be returned by the enumerator:
111
112            <table border="1">
113                <thead><tr><th>IDL</th><th>interface</th></tr></thead>
114                <tbody>
115                    <tr>
116                        <td>enum</td>
117                        <td><type>XEnumTypeDescription</type></td>
118                    </tr>
119                    <tr>
120                        <td>struct</td>
121                        <td><type>XCompoundTypeDescription</type> (the returned
122                        object should actually implement
123                        <type>XStructTypeDescription</type>)</td>
124                    </tr>
125                    <tr>
126                        <td>exception</td>
127                        <td><type>XCompoundTypeDescription</type></td>
128                    </tr>
129                    <tr>
130                        <td>interface</td>
131                        <td><type>XInterfaceTypeDescription</type> (the returned
132                        object should actually implement
133                        <type>XInterfaceTypeDescription2</type>)</td>
134                    </tr>
135                    <tr>
136                        <td>service</td>
137                        <td><type>XServiceTypeDescription</type> (the returned
138                        object should actually implement
139                        <type>XServiceTypeDescription2</type>)</td>
140                    </tr>
141                    <tr>
142                        <td>singleton</td>
143                        <td><type>XSingletonTypeDescription</type> (the returned
144                        object should actually implement
145                        <type>XSingletonTypeDescription2</type>)</td>
146                    </tr>
147                    <tr>
148                        <td>module</td>
149                        <td><type>XModuleTypeDescription</type></td>
150                    </tr>
151                    <tr>
152                        <td>typedef</td>
153                        <td><type>XIndirectTypeDescription</type></td>
154                    </tr>
155                    <tr>
156                        <td>constant</td>
157                        <td><type>XConstantTypeDescription</type></td>
158                    </tr>
159                    <tr>
160                        <td>constants</td>
161                        <td><type>XConstantsTypeDescription</type></td>
162                    </tr>
163                </tbody>
164            </table>
165
166        @throws NoSuchTypeNameException
167            in case that the given module name does not exist. This exception
168            will never be thrown in case moduleName is the empty string.
169
170        @throws InvalidTypeNameException
171            in case that the given module name does exist, but does not specify
172            an UNOIDL module. This exception will never be thrown in case
173            moduleName is the empty string.
174      */
175    XTypeDescriptionEnumeration
176    createTypeDescriptionEnumeration(
177            [in] string moduleName,
178            [in] sequence< com::sun::star::uno::TypeClass > types,
179            [in] TypeDescriptionSearchDepth depth )
180        raises( NoSuchTypeNameException, InvalidTypeNameException );
181};
182
183//=============================================================================
184
185}; }; }; };
186
187#endif
188