1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir#ifndef __com_sun_star_reflection_XIdlClass_idl__
28*cdf0e10cSrcweir#define __com_sun_star_reflection_XIdlClass_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
31*cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
32*cdf0e10cSrcweir#endif
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir#ifndef __com_sun_star_uno_TypeClass_idl__
35*cdf0e10cSrcweir#include <com/sun/star/uno/TypeClass.idl>
36*cdf0e10cSrcweir#endif
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir#ifndef __com_sun_star_uno_Uik_idl__
39*cdf0e10cSrcweir#include <com/sun/star/uno/Uik.idl>
40*cdf0e10cSrcweir#endif
41*cdf0e10cSrcweir
42*cdf0e10cSrcweir//=============================================================================
43*cdf0e10cSrcweir
44*cdf0e10cSrcweirmodule com {  module sun {  module star {  module reflection {
45*cdf0e10cSrcweir
46*cdf0e10cSrcweir published interface XIdlField;
47*cdf0e10cSrcweir published interface XIdlMethod;
48*cdf0e10cSrcweir published interface XIdlArray;
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir//=============================================================================
51*cdf0e10cSrcweir
52*cdf0e10cSrcweir/** Provides information reflecting an UNO type.
53*cdf0e10cSrcweir*/
54*cdf0e10cSrcweirpublished interface XIdlClass: com::sun::star::uno::XInterface
55*cdf0e10cSrcweir{
56*cdf0e10cSrcweir	/** Deprecated.  Do not call.
57*cdf0e10cSrcweir        @deprecated
58*cdf0e10cSrcweir    */
59*cdf0e10cSrcweir	sequence<XIdlClass> getClasses();
60*cdf0e10cSrcweir	/** Deprecated.  Do not call.
61*cdf0e10cSrcweir        @deprecated
62*cdf0e10cSrcweir    */
63*cdf0e10cSrcweir	XIdlClass getClass( [in] string aName );
64*cdf0e10cSrcweir
65*cdf0e10cSrcweir	/** Tests whether two reflecting objects reflect the same type.
66*cdf0e10cSrcweir
67*cdf0e10cSrcweir        @returns
68*cdf0e10cSrcweir                true, if the objects reflect the same type, false otherwise.
69*cdf0e10cSrcweir    */
70*cdf0e10cSrcweir	boolean equals( [in] XIdlClass Type );
71*cdf0e10cSrcweir
72*cdf0e10cSrcweir	/** Tests whether values of this reflected type are assignable from values
73*cdf0e10cSrcweir        of a second one (<code>xType</code>).
74*cdf0e10cSrcweir
75*cdf0e10cSrcweir        @param xType
76*cdf0e10cSrcweir               another reflected type
77*cdf0e10cSrcweir        @return
78*cdf0e10cSrcweir                true, if values of this reflected type are assignable
79*cdf0e10cSrcweir                from values of <code>xType</code>.
80*cdf0e10cSrcweir    */
81*cdf0e10cSrcweir	boolean isAssignableFrom( [in] XIdlClass xType );
82*cdf0e10cSrcweir
83*cdf0e10cSrcweir	/** Returns the <type scope="com::sun::star::uno">TypeClass</type>
84*cdf0e10cSrcweir        of the reflected type.
85*cdf0e10cSrcweir
86*cdf0e10cSrcweir        @returns
87*cdf0e10cSrcweir                  type class of the reflected type.
88*cdf0e10cSrcweir    */
89*cdf0e10cSrcweir	com::sun::star::uno::TypeClass getTypeClass();
90*cdf0e10cSrcweir
91*cdf0e10cSrcweir	/** Returns the fully-qualified name of the reflected type.
92*cdf0e10cSrcweir
93*cdf0e10cSrcweir        @returns
94*cdf0e10cSrcweir                  the fully-qualified name of the type
95*cdf0e10cSrcweir    */
96*cdf0e10cSrcweir	string getName();
97*cdf0e10cSrcweir
98*cdf0e10cSrcweir	/** Deprecated.  Do not call.
99*cdf0e10cSrcweir
100*cdf0e10cSrcweir        @deprecated
101*cdf0e10cSrcweir    */
102*cdf0e10cSrcweir	com::sun::star::uno::Uik getUik();
103*cdf0e10cSrcweir
104*cdf0e10cSrcweir	/** If the reflected type is an interface, then the returned
105*cdf0e10cSrcweir        sequence of <type>XIdlClass</type> reflect the base interfaces.
106*cdf0e10cSrcweir        <br>
107*cdf0e10cSrcweir        If the reflected type is not an interface or an interface that is
108*cdf0e10cSrcweir        not derived from another, then an empty sequence is returned.
109*cdf0e10cSrcweir
110*cdf0e10cSrcweir        @return
111*cdf0e10cSrcweir                all base interfaces of an interface type or an empty sequence.
112*cdf0e10cSrcweir    */
113*cdf0e10cSrcweir	sequence<XIdlClass> getSuperclasses();
114*cdf0e10cSrcweir
115*cdf0e10cSrcweir	/** Deprecated.  Do not call.
116*cdf0e10cSrcweir        @deprecated
117*cdf0e10cSrcweir    */
118*cdf0e10cSrcweir	sequence<XIdlClass> getInterfaces();
119*cdf0e10cSrcweir
120*cdf0e10cSrcweir	/** If the reflected type is an array or sequence, then this method
121*cdf0e10cSrcweir		returns a <type>XIdlClass</type> interface reflecting
122*cdf0e10cSrcweir        the element.
123*cdf0e10cSrcweir
124*cdf0e10cSrcweir        @return
125*cdf0e10cSrcweir                reflection interface of the element type of an array or
126*cdf0e10cSrcweir                sequence type (null-reference otherwise).
127*cdf0e10cSrcweir    */
128*cdf0e10cSrcweir	XIdlClass getComponentType();
129*cdf0e10cSrcweir
130*cdf0e10cSrcweir	/** If the reflected type is an interface, struct or union, then you
131*cdf0e10cSrcweir        get a <type>XIdlField</type> interface reflecting the demanded
132*cdf0e10cSrcweir        field (/interface attribute) by name.
133*cdf0e10cSrcweir        <br>
134*cdf0e10cSrcweir        If the reflected type is not an interface, struct or union or the
135*cdf0e10cSrcweir        interace, struct or union does not have a field (/interface attribute)
136*cdf0e10cSrcweir        with the demanded name, then a null-reference is returned.
137*cdf0e10cSrcweir
138*cdf0e10cSrcweir        @param aName
139*cdf0e10cSrcweir               name of the demanded field reflection
140*cdf0e10cSrcweir        @return
141*cdf0e10cSrcweir                demanded field (/interface attribute) reflection (or null-reference)
142*cdf0e10cSrcweir    */
143*cdf0e10cSrcweir	XIdlField getField( [in] string aName );
144*cdf0e10cSrcweir
145*cdf0e10cSrcweir	/** If the reflected type is an interface, struct or union, then you
146*cdf0e10cSrcweir        get a sequence of <type>XIdlField</type> interfaces reflecting all fields
147*cdf0e10cSrcweir        (/interface attributes).  This also includes all inherited
148*cdf0e10cSrcweir        fields (/interface attributes) of the interface, struct of union.
149*cdf0e10cSrcweir        <br>
150*cdf0e10cSrcweir        If the reflected type is not an interface, struct or union or the
151*cdf0e10cSrcweir        interface, struct or union does not have any field (/interface attribute),
152*cdf0e10cSrcweir        then an empty sequence is returned.
153*cdf0e10cSrcweir
154*cdf0e10cSrcweir        @return
155*cdf0e10cSrcweir                all field (/interface attribute) reflections (or empty sequence)
156*cdf0e10cSrcweir    */
157*cdf0e10cSrcweir	sequence<XIdlField> getFields();
158*cdf0e10cSrcweir
159*cdf0e10cSrcweir	/** If the reflected type is an interface, then you get
160*cdf0e10cSrcweir        a <type>XIdlMethod</type> interface reflecting the demanded method by name.
161*cdf0e10cSrcweir        <br>
162*cdf0e10cSrcweir        If the reflected type is not an interface or the interface does not have
163*cdf0e10cSrcweir        a method with the demanded name (including inherited methods),
164*cdf0e10cSrcweir        then a null-reference is returned.
165*cdf0e10cSrcweir
166*cdf0e10cSrcweir        @param aName
167*cdf0e10cSrcweir               name of demanded method reflection
168*cdf0e10cSrcweir        @return
169*cdf0e10cSrcweir                demanded method reflection (or null-reference)
170*cdf0e10cSrcweir    */
171*cdf0e10cSrcweir	XIdlMethod getMethod( [in] string aName );
172*cdf0e10cSrcweir
173*cdf0e10cSrcweir	/** If the reflected type is an interface, then you get
174*cdf0e10cSrcweir        a sequence of <type>XIdlMethod</type> interfaces reflecting all methods
175*cdf0e10cSrcweir        of the interface.  This also includes the inherited methods of the interface.
176*cdf0e10cSrcweir        <br>
177*cdf0e10cSrcweir        If the reflected type is not an interface or the interface
178*cdf0e10cSrcweir        does not have any methods, then a null-reference is returned.
179*cdf0e10cSrcweir
180*cdf0e10cSrcweir        @return
181*cdf0e10cSrcweir                all method reflections (or empty sequence)
182*cdf0e10cSrcweir    */
183*cdf0e10cSrcweir	sequence<XIdlMethod> getMethods();
184*cdf0e10cSrcweir
185*cdf0e10cSrcweir	/** If the reflected type is an array, then you get
186*cdf0e10cSrcweir        a <type>XIdlArray</type> interface to modify instances of the array type.
187*cdf0e10cSrcweir        <br>
188*cdf0e10cSrcweir        If the reflected type is not an array, then a null-reference is returned.
189*cdf0e10cSrcweir
190*cdf0e10cSrcweir        @return
191*cdf0e10cSrcweir                inteface to modify array instances (or null-reference)
192*cdf0e10cSrcweir    */
193*cdf0e10cSrcweir	XIdlArray getArray();
194*cdf0e10cSrcweir
195*cdf0e10cSrcweir	/** This method creates instances of the reflected type.
196*cdf0e10cSrcweir
197*cdf0e10cSrcweir        @attention
198*cdf0e10cSrcweir        Instances of type <code>any</code> can not be passed using an <code>any</code>, because
199*cdf0e10cSrcweir        anys cannot be nested.  So if the reflected type is an <code>any</code>, then the
200*cdf0e10cSrcweir        returned value is empty.
201*cdf0e10cSrcweir
202*cdf0e10cSrcweir        @param obj
203*cdf0e10cSrcweir               pure out parameter to pass the created instance
204*cdf0e10cSrcweir    */
205*cdf0e10cSrcweir	void createObject( [out] any obj );
206*cdf0e10cSrcweir};
207*cdf0e10cSrcweir
208*cdf0e10cSrcweir//=============================================================================
209*cdf0e10cSrcweir
210*cdf0e10cSrcweir}; }; }; };
211*cdf0e10cSrcweir
212*cdf0e10cSrcweir/*=============================================================================
213*cdf0e10cSrcweir
214*cdf0e10cSrcweir=============================================================================*/
215*cdf0e10cSrcweir#endif
216