zipios  2.2.6
Zipios -- a small C++ library that provides easy access to .zip files.
collectioncollection.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef ZIPIOS_COLLECTIONCOLLECTION_HPP
3 #define ZIPIOS_COLLECTIONCOLLECTION_HPP
4 
5 /*
6  Zipios -- a small C++ library that provides easy access to .zip files.
7 
8  Copyright (C) 2000-2007 Thomas Sondergaard
9  Copyright (C) 2015-2019 Made to Order Software Corporation
10 
11  This library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU Lesser General Public
13  License as published by the Free Software Foundation; either
14  version 2.1 of the License, or (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Lesser General Public License for more details.
20 
21  You should have received a copy of the GNU Lesser General Public
22  License along with this library; if not, write to the Free Software
23  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25 
34 
35 
36 namespace zipios
37 {
38 
39 
41 {
42 public:
43  explicit CollectionCollection();
45  virtual pointer_t clone() const override;
47  virtual ~CollectionCollection() override;
48 
49  bool addCollection(FileCollection const & collection);
51  virtual void close() override;
52  virtual FileEntry::vector_t entries() const override;
53  virtual FileEntry::pointer_t getEntry(std::string const & name, MatchPath matchpath = MatchPath::MATCH) const override;
54  virtual stream_pointer_t getInputStream(std::string const & entry_name, MatchPath matchpath = MatchPath::MATCH) override;
55  virtual size_t size() const override;
56  virtual void mustBeValid() const;
57 
58 protected:
60 };
61 
62 
63 } // zipios namespace
64 
65 // Local Variables:
66 // mode: cpp
67 // indent-tabs-mode: nil
68 // c-basic-offset: 4
69 // tab-width: 4
70 // End:
71 
72 // vim: ts=4 sw=4 et
73 #endif
zipios::CollectionCollection::operator=
CollectionCollection & operator=(CollectionCollection const &src)
Copy assignment operator.
Definition: collectioncollection.cpp:132
zipios::CollectionCollection
A collection of collections.
Definition: collectioncollection.hpp:41
zipios::CollectionCollection::addCollection
bool addCollection(FileCollection const &collection)
Add a FileCollection to this CollectionCollection.
Definition: collectioncollection.cpp:193
zipios::FileCollection::stream_pointer_t
std::shared_ptr< std::istream > stream_pointer_t
A shared pointer to an input stream.
Definition: filecollection.hpp:45
zipios::CollectionCollection::clone
virtual pointer_t clone() const override
Create a clone of this object.
Definition: collectioncollection.cpp:161
zipios::CollectionCollection::mustBeValid
virtual void mustBeValid() const
Check whether the collection is valid.
Definition: collectioncollection.cpp:432
zipios::CollectionCollection::~CollectionCollection
virtual ~CollectionCollection() override
Clean up this CollectionCollection object.
Definition: collectioncollection.cpp:172
zipios::CollectionCollection::entries
virtual FileEntry::vector_t entries() const override
Retrieve a vector to all the collection entries.
Definition: collectioncollection.cpp:293
zipios::FileEntry::pointer_t
std::shared_ptr< FileEntry > pointer_t
Definition: fileentry.hpp:78
zipios::FileCollection::vector_t
std::vector< pointer_t > vector_t
Definition: filecollection.hpp:44
zipios::FileCollection
Base class for various file collections.
Definition: filecollection.hpp:41
zipios::FileCollection::MatchPath
MatchPath
Definition: filecollection.hpp:48
zipios::CollectionCollection::getInputStream
virtual stream_pointer_t getInputStream(std::string const &entry_name, MatchPath matchpath=MatchPath::MATCH) override
Retrieve pointer to an istream.
Definition: collectioncollection.cpp:384
zipios::CollectionCollection::size
virtual size_t size() const override
Return the size of the of this collection.
Definition: collectioncollection.cpp:408
zipios::FileCollection::MatchPath::MATCH
@ MATCH
zipios::CollectionCollection::getEntry
virtual FileEntry::pointer_t getEntry(std::string const &name, MatchPath matchpath=MatchPath::MATCH) const override
Get an entry from the collection.
Definition: collectioncollection.cpp:341
filecollection.hpp
Define the zipios::FileCollection class.
zipios::CollectionCollection::m_collections
vector_t m_collections
Definition: collectioncollection.hpp:59
zipios::CollectionCollection::CollectionCollection
CollectionCollection()
Initialize a CollectionCollection object.
Definition: collectioncollection.cpp:97
zipios::CollectionCollection::close
virtual void close() override
Close the CollectionCollection object.
Definition: collectioncollection.cpp:260
zipios::FileCollection::pointer_t
std::shared_ptr< FileCollection > pointer_t
Definition: filecollection.hpp:43
zipios::FileEntry::vector_t
std::vector< pointer_t > vector_t
Definition: fileentry.hpp:79
zipios
The zipios namespace includes the Zipios library definitions.
Definition: backbuffer.cpp:36