blob: 809a7c4eded3d709093f13862eec08eb4cd5a62c [file] [log] [blame]
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
#ifndef __com_sun_star_reflection_XIdlArray_idl__
#define __com_sun_star_reflection_XIdlArray_idl__
#ifndef __com_sun_star_uno_XInterface_idl__
#include <com/sun/star/uno/XInterface.idl>
#endif
#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
#include <com/sun/star/lang/IllegalArgumentException.idl>
#endif
#ifndef __com_sun_star_lang_ArrayIndexOutOfBoundsException_idl__
#include <com/sun/star/lang/ArrayIndexOutOfBoundsException.idl>
#endif
//=============================================================================
module com { module sun { module star { module reflection {
//=============================================================================
/** Reflects an IDL sequence and provides dynamic access to instances of
that sequence.
This interface supports widening conversion when getting or setting elements.
@attention
Although the name of this interface denotes arrays,
sequences are meant. Don't be obfuscated, arrays are not supported by UNO!
*/
published interface XIdlArray: com::sun::star::uno::XInterface
{
/** Rellocates the length of the sequence instance.
@param array
sequence instance
@length
new length of sequence
*/
void realloc(
[inout] any array,
[in] long length )
raises( com::sun::star::lang::IllegalArgumentException );
/** Returns the length of the given sequence.
@param array
sequence instance
@return
length of sequence
*/
long getLen( [in] any array )
raises( com::sun::star::lang::IllegalArgumentException );
/** Returns element at given index.
@param aArray
sequence instance
@param nIndex
index
@return
value
@throws IllegalArgumentException
if the specified object is not a sequence or if the specified object is null
@throws ArrayIndexOutOfBoundsException
if the specified index argument is negative, or if it is greater than or equal to the
length of the specified sequence.
*/
any get(
[in] any aArray,
[in] long nIndex )
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::lang::ArrayIndexOutOfBoundsException );
/** Sets a new value at given index.
@param aArray
sequence instance
@param nIndex
index
@param aNewValue
new value to be set
@throws IllegalArgumentException
if the specified object is not a sequence or if the specified object is null
@throws ArrayIndexOutOfBoundsException
if the specified index argument is negative, or if it is greater than or equal to the
length of the specified sequence.
*/
void set(
[inout] any aArray,
[in] long nIndex,
[in] any aNewValue )
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::lang::ArrayIndexOutOfBoundsException );
};
//=============================================================================
}; }; }; };
/*=============================================================================
=============================================================================*/
#endif