1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_reflection_XStructTypeDescription_idl__ 25#define __com_sun_star_reflection_XStructTypeDescription_idl__ 26 27#include "com/sun/star/reflection/XCompoundTypeDescription.idl" 28 29module com { module sun { module star { module reflection { 30 31interface XTypeDescription; 32 33/** 34 Reflects a struct type, supporting polymorphic struct types. 35 36 <p>This type supersedes <type>XCompoundTypeDescription</type>, which only 37 supports plain struct types.</p> 38 39 <p>This type is used to reflect all of the following:</p> 40 <ul> 41 <li>Polymorphic struct type templates, like 42 <code>Struct<T, U></code>. For these, 43 <member scope="com::sun::star::reflection"><!-- 44 -->XStructTypeDescription::getTypeParameters</member> returns a non-empty 45 sequence, while <member scope="com::sun::star::reflection"><!-- 46 -->XStructTypeDescription::getTypeArguments</member> returns an empty 47 sequence.</li> 48 49 <li>Instantiated polymorphic struct types, like <code>Struct<long, 50 hyper></code>. For these, 51 <member scope="com::sun::star::reflection"><!-- 52 -->XStructTypeDescription::getTypeParameters</member> returns an empty 53 sequence, while <member scope="com::sun::star::reflection"><!-- 54 -->XStructTypeDescription::getTypeArguments</member> returns a non-empty 55 sequence.</li> 56 57 <li>Plain struct types. For these, both 58 <member scope="com::sun::star::reflection"><!-- 59 -->XStructTypeDescription::getTypeParameters</member> and 60 <member scope="com::sun::star::reflection"><!-- 61 -->XStructTypeDescription::getTypeArguments</member> return an empty 62 sequence.</li> 63 </ul> 64 65 @since OpenOffice 2.0 66 */ 67interface XStructTypeDescription: XCompoundTypeDescription { 68 /** 69 Returns the type parameters of a polymorphic struct type template. 70 71 @return a sequence of the names of all type parameters, in the correct 72 order; for a plain struct type, or an instantiated polymorphic struct 73 type, an empty sequence is returned 74 */ 75 sequence<string> getTypeParameters(); 76 77 /** 78 Returns the type arguments of an instantiated polymorphic struct type. 79 80 @return a sequence of all type arguments, in the correct order; for a 81 plain struct type, or a polymorphic struct type template, an empty 82 sequence is returned 83 */ 84 sequence<XTypeDescription> getTypeArguments(); 85}; 86 87}; }; }; }; 88 89#endif 90