update dev300-m58
[ooovba.git] / udkapi / com / sun / star / container / XNameAccess.idl
blobd8d753d439abde4492aa0affeb909e78dba7a539
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XNameAccess.idl,v $
10 * $Revision: 1.13 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_container_XNameAccess_idl__
31 #define __com_sun_star_container_XNameAccess_idl__
33 #ifndef __com_sun_star_container_XElementAccess_idl__
34 #include <com/sun/star/container/XElementAccess.idl>
35 #endif
37 #ifndef __com_sun_star_container_NoSuchElementException_idl__
38 #include <com/sun/star/container/NoSuchElementException.idl>
39 #endif
41 #ifndef __com_sun_star_lang_WrappedTargetException_idl__
42 #include <com/sun/star/lang/WrappedTargetException.idl>
43 #endif
45 //=============================================================================
47 module com { module sun { module star { module container {
49 //=============================================================================
51 /** is used to access named objects within a container.
53 <p>To implement inaccurate name access, support the
54 <type scope="com::sun::star::beans">XExactName</type>
55 interface. </p>
56 @see com::sun::star::beans::XExactName
58 published interface XNameAccess: com::sun::star::container::XElementAccess
60 //-------------------------------------------------------------------------
62 /** @returns
63 the object with the specified name.
65 @param aName
66 the name of the object.
68 @throws NoSuchElementException
69 if an element under Name does not exist.
71 @throws com::sun::star::lang::WrappedTargetException
72 If the implementation has internal reasons for exceptions,
73 then wrap these in a <type scope="com::sun::star::lang">WrappedTargetException</type>
74 exception.
76 any getByName( [in] string aName )
77 raises( com::sun::star::container::NoSuchElementException,
78 com::sun::star::lang::WrappedTargetException );
80 //-------------------------------------------------------------------------
82 /** @returns
83 a sequence of all element names in this container.
85 <p>The order of the names is not specified. </p>
87 sequence<string> getElementNames();
89 //-------------------------------------------------------------------------
91 /** @returns
92 <TRUE/> if an element with this name is in
93 the container, <FALSE/> otherwise.
95 <p>In many cases the next call is <member>XNameAccess::getByName</member>.
96 You should optimize this case. </p>
98 @param aName
99 the name of the object.
101 boolean hasByName( [in] string aName );
105 //=============================================================================
107 }; }; }; };
109 #endif