1*cdf0e10cSrcweir/************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ***********************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir#ifndef __com_sun_star_container_XEnumerableMap_idl__ 29*cdf0e10cSrcweir#define __com_sun_star_container_XEnumerableMap_idl__ 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir#include <com/sun/star/container/XMap.idl> 32*cdf0e10cSrcweir#include <com/sun/star/container/XEnumeration.idl> 33*cdf0e10cSrcweir#include <com/sun/star/lang/NoSupportException.idl> 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir//============================================================================= 36*cdf0e10cSrcweir 37*cdf0e10cSrcweirmodule com { module sun { module star { module container { 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir//============================================================================= 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir/** extends <type>XMap</type> with enumeration capabilities. 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir <p>No assumption should be made about the ordering of the elements returned by the various enumerators. 44*cdf0e10cSrcweir In particular, you cannot assume the elements are returned in the same order as they were inserted. Also, 45*cdf0e10cSrcweir you should not expect the <code>XMap</code> implementation to make use of a possibly existing strict ordering 46*cdf0e10cSrcweir defined on the domain of all possible key values.</p> 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir <p>You can create enumerators for the keys of the map, its values, and its key-value pairs.</p> 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir <p>In all cases, you can create an <em>isolated</em> enumerator, which works on a copy of the 51*cdf0e10cSrcweir map's content. Such an iterator is not affected by changes done to the map after creation of 52*cdf0e10cSrcweir the enumerator.</p> 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir <p>On the contrary, an enumerator which is <em>non-isolated</em> works directly on the map data. 55*cdf0e10cSrcweir This is less expensive than an <em>isolated</em> enumerator, but means that changes to the map while 56*cdf0e10cSrcweir an enumeration is running potentially invalidate your enumerator. The concrete behavior in this 57*cdf0e10cSrcweir case is undefined, it's up to the service implementing the <code>XEnumerableMap</code> interface 58*cdf0e10cSrcweir to specify it in more detail.</p> 59*cdf0e10cSrcweir 60*cdf0e10cSrcweir <p>Implementations of this interface might decide to support only <em>isolated</em> enumerators, or 61*cdf0e10cSrcweir only <em>non-isolated</em> enumerators. Again, it's up to the service to specify this. Requesting an 62*cdf0e10cSrcweir enumerator type which is not supported will generally result in an <type scope="com::sun::star::lang">NoSupportException</type> 63*cdf0e10cSrcweir being thrown.</p> 64*cdf0e10cSrcweir */ 65*cdf0e10cSrcweirinterface XEnumerableMap : XMap 66*cdf0e10cSrcweir{ 67*cdf0e10cSrcweir /** creates a enumerator for the keys of the map 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir @param Isolated 70*cdf0e10cSrcweir controls whether the newly create enumerator should be isolated from the map. 71*cdf0e10cSrcweir 72*cdf0e10cSrcweir @throws ::com::sun::star::lang::NoSupportException 73*cdf0e10cSrcweir if the specified enumerator method is not supported by the implementation. 74*cdf0e10cSrcweir */ 75*cdf0e10cSrcweir XEnumeration createKeyEnumeration( [in] boolean Isolated ) 76*cdf0e10cSrcweir raises ( ::com::sun::star::lang::NoSupportException ); 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir /** creates a enumerator for the values of the map 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir @param Isolated 81*cdf0e10cSrcweir controls whether the newly create enumerator should be isolated from the map. 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir @throws ::com::sun::star::lang::NoSupportException 84*cdf0e10cSrcweir if the specified enumerator method is not supported by the implementation. 85*cdf0e10cSrcweir */ 86*cdf0e10cSrcweir XEnumeration createValueEnumeration( [in] boolean Isolated ) 87*cdf0e10cSrcweir raises ( ::com::sun::star::lang::NoSupportException ); 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir /** creates a enumerator for the key-value pairs of the map 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir <p>The elements returned by the enumerator are instances of <type scope="com::sun::star::beans">Pair</type>, 92*cdf0e10cSrcweir holding the key-value-pairs which are part of the map.</p> 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir @param Isolated 95*cdf0e10cSrcweir controls whether the newly create enumerator should be isolated from the map. 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir @throws ::com::sun::star::lang::NoSupportException 98*cdf0e10cSrcweir if the specified enumerator method is not supported by the implementation. 99*cdf0e10cSrcweir */ 100*cdf0e10cSrcweir XEnumeration createElementEnumeration( [in] boolean Isolated ) 101*cdf0e10cSrcweir raises ( ::com::sun::star::lang::NoSupportException ); 102*cdf0e10cSrcweir}; 103*cdf0e10cSrcweir 104*cdf0e10cSrcweir//============================================================================= 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir}; }; }; }; 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir//============================================================================= 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir#endif 111