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_XStructTypeDescription_idl__
29#define __com_sun_star_reflection_XStructTypeDescription_idl__
30
31#include "com/sun/star/reflection/XCompoundTypeDescription.idl"
32
33module com {  module sun {  module star {  module reflection {
34
35interface XTypeDescription;
36
37/**
38   Reflects a struct type, supporting polymorphic struct types.
39
40   <p>This type supersedes <type>XCompoundTypeDescription</type>, which only
41   supports plain struct types.</p>
42
43   <p>This type is used to reflect all of the following:</p>
44   <ul>
45       <li>Polymorphic struct type templates, like
46       <code>Struct&lt;T, U&gt;</code>.  For these,
47       <member scope="com::sun::star::reflection"><!--
48       -->XStructTypeDescription::getTypeParameters</member> returns a non-empty
49       sequence, while <member scope="com::sun::star::reflection"><!--
50       -->XStructTypeDescription::getTypeArguments</member> returns an empty
51       sequence.</li>
52
53       <li>Instantiated polymorphic struct types, like <code>Struct&lt;long,
54       hyper&gt;</code>.  For these,
55       <member scope="com::sun::star::reflection"><!--
56       -->XStructTypeDescription::getTypeParameters</member> returns an empty
57       sequence, while <member scope="com::sun::star::reflection"><!--
58       -->XStructTypeDescription::getTypeArguments</member> returns a non-empty
59       sequence.</li>
60
61       <li>Plain struct types.  For these, both
62       <member scope="com::sun::star::reflection"><!--
63       -->XStructTypeDescription::getTypeParameters</member> and
64       <member scope="com::sun::star::reflection"><!--
65       -->XStructTypeDescription::getTypeArguments</member> return an empty
66       sequence.</li>
67   </ul>
68
69   @since OOo 2.0
70 */
71interface XStructTypeDescription: XCompoundTypeDescription {
72    /**
73       Returns the type parameters of a polymorphic struct type template.
74
75       @return a sequence of the names of all type parameters, in the correct
76       order; for a plain struct type, or an instantiated polymorphic struct
77       type, an empty sequence is returned
78     */
79    sequence<string> getTypeParameters();
80
81    /**
82       Returns the type arguments of an instantiated polymorphic struct type.
83
84       @return a sequence of all type arguments, in the correct order; for a
85       plain struct type, or a polymorphic struct type template, an empty
86       sequence is returned
87     */
88    sequence<XTypeDescription> getTypeArguments();
89};
90
91}; }; }; };
92
93#endif
94