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