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