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_XIdlField2_idl__
24cdf0e10cSrcweir#define __com_sun_star_reflection_XIdlField2_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_reflection_XIdlMember_idl__
27cdf0e10cSrcweir#include <com/sun/star/reflection/XIdlMember.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_reflection_XIdlClass_idl__
31cdf0e10cSrcweir#include <com/sun/star/reflection/XIdlClass.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_reflection_FieldAccessMode_idl__
35cdf0e10cSrcweir#include <com/sun/star/reflection/FieldAccessMode.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
39cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir
42cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalAccessException_idl__
43cdf0e10cSrcweir#include <com/sun/star/lang/IllegalAccessException.idl>
44cdf0e10cSrcweir#endif
45cdf0e10cSrcweir
46cdf0e10cSrcweir
47cdf0e10cSrcweir//=============================================================================
48cdf0e10cSrcweir
49cdf0e10cSrcweir module com {  module sun {  module star {  module reflection {
50cdf0e10cSrcweir
51cdf0e10cSrcweir//=============================================================================
52cdf0e10cSrcweir
53cdf0e10cSrcweir/** Reflects an IDL interface attribute, enum or compound type
54cdf0e10cSrcweir    (i.e. struct/exception) member.
55cdf0e10cSrcweir*/
56cdf0e10cSrcweirpublished interface XIdlField2: com::sun::star::reflection::XIdlMember
57cdf0e10cSrcweir{
58cdf0e10cSrcweir	/** Returns the type of the field.
59cdf0e10cSrcweir
60cdf0e10cSrcweir        @return
61cdf0e10cSrcweir                type of the field
62cdf0e10cSrcweir    */
63cdf0e10cSrcweir	com::sun::star::reflection::XIdlClass getType();
64cdf0e10cSrcweir
65cdf0e10cSrcweir	/** Returns the access mode of the field, i.e. read-write, read-only or
66cdf0e10cSrcweir        write-only (access mode "const" is deprecated).
67cdf0e10cSrcweir
68cdf0e10cSrcweir        @return
69cdf0e10cSrcweir                access mode of the field
70cdf0e10cSrcweir    */
71cdf0e10cSrcweir	com::sun::star::reflection::FieldAccessMode getAccessMode();
72cdf0e10cSrcweir
73cdf0e10cSrcweir	/** Gets the value of the reflected field from the given object,
74cdf0e10cSrcweir        i.e. an interface, enum or compound type (struct/exception).
75cdf0e10cSrcweir        For enums, the given object is ignored; the returned value
76cdf0e10cSrcweir        reflects the constant enum 32-bit value.
77cdf0e10cSrcweir
78cdf0e10cSrcweir        <p>When setting an interface attribute raises a
79cdf0e10cSrcweir        non-<type scope="com::sun::star::uno">RuntimeException</type>, it is
80cdf0e10cSrcweir        wrapped in a <type
81cdf0e10cSrcweir        scope="com::sun::star::lang">WrappedTargetRuntimeException</type>.</p>
82cdf0e10cSrcweir
83cdf0e10cSrcweir        @param obj
84cdf0e10cSrcweir               object instance having member of reflected type
85cdf0e10cSrcweir        @return
86cdf0e10cSrcweir                value of field
87cdf0e10cSrcweir
88cdf0e10cSrcweir        @throws IllegalAccessException
89cdf0e10cSrcweir        An <type scope="com::sun::star::lang">IllegalAccessException</type>
90cdf0e10cSrcweir        is thrown if the given object is no interface, enum or compound type;
91cdf0e10cSrcweir        or the given object does not have the reflected field.
92cdf0e10cSrcweir    */
93cdf0e10cSrcweir	any get(
94cdf0e10cSrcweir        [in] any obj )
95cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException );
96cdf0e10cSrcweir
97cdf0e10cSrcweir	/** Sets the value of the reflected field of the given object,
98cdf0e10cSrcweir        i.e. an interface or compound type (struct/exception).
99cdf0e10cSrcweir
100cdf0e10cSrcweir        <p>When setting an interface attribute raises a
101cdf0e10cSrcweir        non-<type scope="com::sun::star::uno">RuntimeException</type>, it is
102cdf0e10cSrcweir        wrapped in a <type
103cdf0e10cSrcweir        scope="com::sun::star::lang">WrappedTargetRuntimeException</type>.</p>
104cdf0e10cSrcweir
105cdf0e10cSrcweir        @param obj
106cdf0e10cSrcweir               object instance having member of reflected type
107cdf0e10cSrcweir        @param value
108cdf0e10cSrcweir               value to be set
109cdf0e10cSrcweir
110cdf0e10cSrcweir        @throws IllegalAccessException
111cdf0e10cSrcweir        An <type scope="com::sun::star::lang">IllegalAccessException</type>
112cdf0e10cSrcweir        is thrown if the given object is no interface or compound type;
113cdf0e10cSrcweir        or the given object does not have the reflected field.
114cdf0e10cSrcweir    */
115cdf0e10cSrcweir	void set(
116cdf0e10cSrcweir        [inout] any obj,
117cdf0e10cSrcweir        [in] any value )
118cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException,
119cdf0e10cSrcweir                com::sun::star::lang::IllegalAccessException );
120cdf0e10cSrcweir};
121cdf0e10cSrcweir
122cdf0e10cSrcweir//=============================================================================
123cdf0e10cSrcweir
124cdf0e10cSrcweir}; }; }; };
125cdf0e10cSrcweir
126cdf0e10cSrcweir/*=============================================================================
127cdf0e10cSrcweir
128cdf0e10cSrcweir=============================================================================*/
129cdf0e10cSrcweir#endif
130