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_XIdlArray_idl__ 24#define __com_sun_star_reflection_XIdlArray_idl__ 25 26#ifndef __com_sun_star_uno_XInterface_idl__ 27#include <com/sun/star/uno/XInterface.idl> 28#endif 29 30#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 31#include <com/sun/star/lang/IllegalArgumentException.idl> 32#endif 33 34#ifndef __com_sun_star_lang_ArrayIndexOutOfBoundsException_idl__ 35#include <com/sun/star/lang/ArrayIndexOutOfBoundsException.idl> 36#endif 37 38 39//============================================================================= 40 41 module com { module sun { module star { module reflection { 42 43//============================================================================= 44 45/** Reflects an IDL sequence and provides dynamic access to instances of 46 that sequence. 47 This interface supports widening conversion when getting or setting elements. 48 49 @attention 50 Although the name of this interface denotes arrays, 51 sequences are meant. Don't be obfuscated, arrays are not supported by UNO! 52*/ 53published interface XIdlArray: com::sun::star::uno::XInterface 54{ 55 /** Rellocates the length of the sequence instance. 56 57 @param array 58 sequence instance 59 @length 60 new length of sequence 61 */ 62 void realloc( 63 [inout] any array, 64 [in] long length ) 65 raises( com::sun::star::lang::IllegalArgumentException ); 66 67 /** Returns the length of the given sequence. 68 69 @param array 70 sequence instance 71 @return 72 length of sequence 73 */ 74 long getLen( [in] any array ) 75 raises( com::sun::star::lang::IllegalArgumentException ); 76 77 /** Returns element at given index. 78 79 @param aArray 80 sequence instance 81 @param nIndex 82 index 83 @return 84 value 85 86 @throws IllegalArgumentException 87 if the specified object is not a sequence or if the specified object is null 88 89 @throws ArrayIndexOutOfBoundsException 90 if the specified index argument is negative, or if it is greater than or equal to the 91 length of the specified sequence. 92 */ 93 any get( 94 [in] any aArray, 95 [in] long nIndex ) 96 raises( com::sun::star::lang::IllegalArgumentException, 97 com::sun::star::lang::ArrayIndexOutOfBoundsException ); 98 99 /** Sets a new value at given index. 100 101 @param aArray 102 sequence instance 103 @param nIndex 104 index 105 @param aNewValue 106 new value to be set 107 108 @throws IllegalArgumentException 109 if the specified object is not a sequence or if the specified object is null 110 111 @throws ArrayIndexOutOfBoundsException 112 if the specified index argument is negative, or if it is greater than or equal to the 113 length of the specified sequence. 114 */ 115 void set( 116 [inout] any aArray, 117 [in] long nIndex, 118 [in] any aNewValue ) 119 raises( com::sun::star::lang::IllegalArgumentException, 120 com::sun::star::lang::ArrayIndexOutOfBoundsException ); 121}; 122 123//============================================================================= 124 125}; }; }; }; 126 127/*============================================================================= 128 129=============================================================================*/ 130#endif 131