1*a3872823SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*a3872823SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*a3872823SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*a3872823SAndrew Rist * distributed with this work for additional information 6*a3872823SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*a3872823SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*a3872823SAndrew Rist * "License"); you may not use this file except in compliance 9*a3872823SAndrew Rist * with the License. You may obtain a copy of the License at 10*a3872823SAndrew Rist * 11*a3872823SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*a3872823SAndrew Rist * 13*a3872823SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*a3872823SAndrew Rist * software distributed under the License is distributed on an 15*a3872823SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*a3872823SAndrew Rist * KIND, either express or implied. See the License for the 17*a3872823SAndrew Rist * specific language governing permissions and limitations 18*a3872823SAndrew Rist * under the License. 19*a3872823SAndrew Rist * 20*a3872823SAndrew Rist *************************************************************/ 21*a3872823SAndrew Rist 22*a3872823SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_package.hxx" 26cdf0e10cSrcweir #include <ZipEnumeration.hxx> 27cdf0e10cSrcweir 28cdf0e10cSrcweir /** Provides an Enumeration over the contents of a Zip file */ 29cdf0e10cSrcweir ZipEnumeration(EntryHash & rNewEntryHash)30cdf0e10cSrcweirZipEnumeration::ZipEnumeration( EntryHash & rNewEntryHash) 31cdf0e10cSrcweir : rEntryHash(rNewEntryHash) 32cdf0e10cSrcweir , aIterator(rEntryHash.begin()) 33cdf0e10cSrcweir { 34cdf0e10cSrcweir } ~ZipEnumeration(void)35cdf0e10cSrcweirZipEnumeration::~ZipEnumeration( void ) 36cdf0e10cSrcweir { 37cdf0e10cSrcweir } hasMoreElements()38cdf0e10cSrcweirsal_Bool SAL_CALL ZipEnumeration::hasMoreElements() 39cdf0e10cSrcweir { 40cdf0e10cSrcweir return (aIterator != rEntryHash.end()); 41cdf0e10cSrcweir } 42cdf0e10cSrcweir nextElement()43cdf0e10cSrcweirconst ZipEntry* SAL_CALL ZipEnumeration::nextElement() 44cdf0e10cSrcweir { 45cdf0e10cSrcweir if (aIterator != rEntryHash.end()) 46cdf0e10cSrcweir return &((*aIterator++).second); 47cdf0e10cSrcweir else 48cdf0e10cSrcweir return NULL; 49cdf0e10cSrcweir } 50