1*408a4873SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*408a4873SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*408a4873SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*408a4873SAndrew Rist * distributed with this work for additional information
6*408a4873SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*408a4873SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*408a4873SAndrew Rist * "License"); you may not use this file except in compliance
9*408a4873SAndrew Rist * with the License.  You may obtain a copy of the License at
10*408a4873SAndrew Rist *
11*408a4873SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*408a4873SAndrew Rist *
13*408a4873SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*408a4873SAndrew Rist * software distributed under the License is distributed on an
15*408a4873SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*408a4873SAndrew Rist * KIND, either express or implied.  See the License for the
17*408a4873SAndrew Rist * specific language governing permissions and limitations
18*408a4873SAndrew Rist * under the License.
19*408a4873SAndrew Rist *
20*408a4873SAndrew Rist *************************************************************/
21*408a4873SAndrew Rist
22*408a4873SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_reflection_XIdlClass_idl__
24cdf0e10cSrcweir#define __com_sun_star_reflection_XIdlClass_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_uno_TypeClass_idl__
31cdf0e10cSrcweir#include <com/sun/star/uno/TypeClass.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_uno_Uik_idl__
35cdf0e10cSrcweir#include <com/sun/star/uno/Uik.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir//=============================================================================
39cdf0e10cSrcweir
40cdf0e10cSrcweirmodule com {  module sun {  module star {  module reflection {
41cdf0e10cSrcweir
42cdf0e10cSrcweir published interface XIdlField;
43cdf0e10cSrcweir published interface XIdlMethod;
44cdf0e10cSrcweir published interface XIdlArray;
45cdf0e10cSrcweir
46cdf0e10cSrcweir//=============================================================================
47cdf0e10cSrcweir
48cdf0e10cSrcweir/** Provides information reflecting an UNO type.
49cdf0e10cSrcweir*/
50cdf0e10cSrcweirpublished interface XIdlClass: com::sun::star::uno::XInterface
51cdf0e10cSrcweir{
52cdf0e10cSrcweir	/** Deprecated.  Do not call.
53cdf0e10cSrcweir        @deprecated
54cdf0e10cSrcweir    */
55cdf0e10cSrcweir	sequence<XIdlClass> getClasses();
56cdf0e10cSrcweir	/** Deprecated.  Do not call.
57cdf0e10cSrcweir        @deprecated
58cdf0e10cSrcweir    */
59cdf0e10cSrcweir	XIdlClass getClass( [in] string aName );
60cdf0e10cSrcweir
61cdf0e10cSrcweir	/** Tests whether two reflecting objects reflect the same type.
62cdf0e10cSrcweir
63cdf0e10cSrcweir        @returns
64cdf0e10cSrcweir                true, if the objects reflect the same type, false otherwise.
65cdf0e10cSrcweir    */
66cdf0e10cSrcweir	boolean equals( [in] XIdlClass Type );
67cdf0e10cSrcweir
68cdf0e10cSrcweir	/** Tests whether values of this reflected type are assignable from values
69cdf0e10cSrcweir        of a second one (<code>xType</code>).
70cdf0e10cSrcweir
71cdf0e10cSrcweir        @param xType
72cdf0e10cSrcweir               another reflected type
73cdf0e10cSrcweir        @return
74cdf0e10cSrcweir                true, if values of this reflected type are assignable
75cdf0e10cSrcweir                from values of <code>xType</code>.
76cdf0e10cSrcweir    */
77cdf0e10cSrcweir	boolean isAssignableFrom( [in] XIdlClass xType );
78cdf0e10cSrcweir
79cdf0e10cSrcweir	/** Returns the <type scope="com::sun::star::uno">TypeClass</type>
80cdf0e10cSrcweir        of the reflected type.
81cdf0e10cSrcweir
82cdf0e10cSrcweir        @returns
83cdf0e10cSrcweir                  type class of the reflected type.
84cdf0e10cSrcweir    */
85cdf0e10cSrcweir	com::sun::star::uno::TypeClass getTypeClass();
86cdf0e10cSrcweir
87cdf0e10cSrcweir	/** Returns the fully-qualified name of the reflected type.
88cdf0e10cSrcweir
89cdf0e10cSrcweir        @returns
90cdf0e10cSrcweir                  the fully-qualified name of the type
91cdf0e10cSrcweir    */
92cdf0e10cSrcweir	string getName();
93cdf0e10cSrcweir
94cdf0e10cSrcweir	/** Deprecated.  Do not call.
95cdf0e10cSrcweir
96cdf0e10cSrcweir        @deprecated
97cdf0e10cSrcweir    */
98cdf0e10cSrcweir	com::sun::star::uno::Uik getUik();
99cdf0e10cSrcweir
100cdf0e10cSrcweir	/** If the reflected type is an interface, then the returned
101cdf0e10cSrcweir        sequence of <type>XIdlClass</type> reflect the base interfaces.
102cdf0e10cSrcweir        <br>
103cdf0e10cSrcweir        If the reflected type is not an interface or an interface that is
104cdf0e10cSrcweir        not derived from another, then an empty sequence is returned.
105cdf0e10cSrcweir
106cdf0e10cSrcweir        @return
107cdf0e10cSrcweir                all base interfaces of an interface type or an empty sequence.
108cdf0e10cSrcweir    */
109cdf0e10cSrcweir	sequence<XIdlClass> getSuperclasses();
110cdf0e10cSrcweir
111cdf0e10cSrcweir	/** Deprecated.  Do not call.
112cdf0e10cSrcweir        @deprecated
113cdf0e10cSrcweir    */
114cdf0e10cSrcweir	sequence<XIdlClass> getInterfaces();
115cdf0e10cSrcweir
116cdf0e10cSrcweir	/** If the reflected type is an array or sequence, then this method
117cdf0e10cSrcweir		returns a <type>XIdlClass</type> interface reflecting
118cdf0e10cSrcweir        the element.
119cdf0e10cSrcweir
120cdf0e10cSrcweir        @return
121cdf0e10cSrcweir                reflection interface of the element type of an array or
122cdf0e10cSrcweir                sequence type (null-reference otherwise).
123cdf0e10cSrcweir    */
124cdf0e10cSrcweir	XIdlClass getComponentType();
125cdf0e10cSrcweir
126cdf0e10cSrcweir	/** If the reflected type is an interface, struct or union, then you
127cdf0e10cSrcweir        get a <type>XIdlField</type> interface reflecting the demanded
128cdf0e10cSrcweir        field (/interface attribute) by name.
129cdf0e10cSrcweir        <br>
130cdf0e10cSrcweir        If the reflected type is not an interface, struct or union or the
131cdf0e10cSrcweir        interace, struct or union does not have a field (/interface attribute)
132cdf0e10cSrcweir        with the demanded name, then a null-reference is returned.
133cdf0e10cSrcweir
134cdf0e10cSrcweir        @param aName
135cdf0e10cSrcweir               name of the demanded field reflection
136cdf0e10cSrcweir        @return
137cdf0e10cSrcweir                demanded field (/interface attribute) reflection (or null-reference)
138cdf0e10cSrcweir    */
139cdf0e10cSrcweir	XIdlField getField( [in] string aName );
140cdf0e10cSrcweir
141cdf0e10cSrcweir	/** If the reflected type is an interface, struct or union, then you
142cdf0e10cSrcweir        get a sequence of <type>XIdlField</type> interfaces reflecting all fields
143cdf0e10cSrcweir        (/interface attributes).  This also includes all inherited
144cdf0e10cSrcweir        fields (/interface attributes) of the interface, struct of union.
145cdf0e10cSrcweir        <br>
146cdf0e10cSrcweir        If the reflected type is not an interface, struct or union or the
147cdf0e10cSrcweir        interface, struct or union does not have any field (/interface attribute),
148cdf0e10cSrcweir        then an empty sequence is returned.
149cdf0e10cSrcweir
150cdf0e10cSrcweir        @return
151cdf0e10cSrcweir                all field (/interface attribute) reflections (or empty sequence)
152cdf0e10cSrcweir    */
153cdf0e10cSrcweir	sequence<XIdlField> getFields();
154cdf0e10cSrcweir
155cdf0e10cSrcweir	/** If the reflected type is an interface, then you get
156cdf0e10cSrcweir        a <type>XIdlMethod</type> interface reflecting the demanded method by name.
157cdf0e10cSrcweir        <br>
158cdf0e10cSrcweir        If the reflected type is not an interface or the interface does not have
159cdf0e10cSrcweir        a method with the demanded name (including inherited methods),
160cdf0e10cSrcweir        then a null-reference is returned.
161cdf0e10cSrcweir
162cdf0e10cSrcweir        @param aName
163cdf0e10cSrcweir               name of demanded method reflection
164cdf0e10cSrcweir        @return
165cdf0e10cSrcweir                demanded method reflection (or null-reference)
166cdf0e10cSrcweir    */
167cdf0e10cSrcweir	XIdlMethod getMethod( [in] string aName );
168cdf0e10cSrcweir
169cdf0e10cSrcweir	/** If the reflected type is an interface, then you get
170cdf0e10cSrcweir        a sequence of <type>XIdlMethod</type> interfaces reflecting all methods
171cdf0e10cSrcweir        of the interface.  This also includes the inherited methods of the interface.
172cdf0e10cSrcweir        <br>
173cdf0e10cSrcweir        If the reflected type is not an interface or the interface
174cdf0e10cSrcweir        does not have any methods, then a null-reference is returned.
175cdf0e10cSrcweir
176cdf0e10cSrcweir        @return
177cdf0e10cSrcweir                all method reflections (or empty sequence)
178cdf0e10cSrcweir    */
179cdf0e10cSrcweir	sequence<XIdlMethod> getMethods();
180cdf0e10cSrcweir
181cdf0e10cSrcweir	/** If the reflected type is an array, then you get
182cdf0e10cSrcweir        a <type>XIdlArray</type> interface to modify instances of the array type.
183cdf0e10cSrcweir        <br>
184cdf0e10cSrcweir        If the reflected type is not an array, then a null-reference is returned.
185cdf0e10cSrcweir
186cdf0e10cSrcweir        @return
187cdf0e10cSrcweir                inteface to modify array instances (or null-reference)
188cdf0e10cSrcweir    */
189cdf0e10cSrcweir	XIdlArray getArray();
190cdf0e10cSrcweir
191cdf0e10cSrcweir	/** This method creates instances of the reflected type.
192cdf0e10cSrcweir
193cdf0e10cSrcweir        @attention
194cdf0e10cSrcweir        Instances of type <code>any</code> can not be passed using an <code>any</code>, because
195cdf0e10cSrcweir        anys cannot be nested.  So if the reflected type is an <code>any</code>, then the
196cdf0e10cSrcweir        returned value is empty.
197cdf0e10cSrcweir
198cdf0e10cSrcweir        @param obj
199cdf0e10cSrcweir               pure out parameter to pass the created instance
200cdf0e10cSrcweir    */
201cdf0e10cSrcweir	void createObject( [out] any obj );
202cdf0e10cSrcweir};
203cdf0e10cSrcweir
204cdf0e10cSrcweir//=============================================================================
205cdf0e10cSrcweir
206cdf0e10cSrcweir}; }; }; };
207cdf0e10cSrcweir
208cdf0e10cSrcweir/*=============================================================================
209cdf0e10cSrcweir
210cdf0e10cSrcweir=============================================================================*/
211cdf0e10cSrcweir#endif
212