zipios
2.2.6
Zipios -- a small C++ library that provides easy access to .zip files.
|
Go to the documentation of this file.
60 for(
auto it = collections.begin(); it != collections.end(); ++it)
62 cep = (*it)->getEntry(name, matchpath);
65 file_collection = *it;
70 file_collection.reset();
203 if(
this == &collection || !collection.
isValid())
238 if(collection ==
nullptr)
241 throw InvalidException(
"CollectionCollection::addCollection(): called with a null collection pointer");
300 all_entries += (*it)->entries();
393 return cep ? file_collection->getInputStream(entry_name) :
nullptr;
441 (*it)->mustBeValid();
CollectionCollection & operator=(CollectionCollection const &src)
Copy assignment operator.
A collection of collections.
bool addCollection(FileCollection const &collection)
Add a FileCollection to this CollectionCollection.
virtual pointer_t clone() const =0
Create a clone of this object.
std::shared_ptr< std::istream > stream_pointer_t
A shared pointer to an input stream.
virtual pointer_t clone() const override
Create a clone of this object.
virtual void mustBeValid() const
Check whether the collection is valid.
virtual void mustBeValid() const
Check whether the collection is valid.
Various exceptions used throughout the Zipios library, all based on zipios::Exception.
virtual ~CollectionCollection() override
Clean up this CollectionCollection object.
Various functions used throughout the library.
virtual FileEntry::vector_t entries() const override
Retrieve a vector to all the collection entries.
std::shared_ptr< FileEntry > pointer_t
void matchEntry(CollectionCollection::vector_t collections, std::string const &name, FileEntry::pointer_t &cep, FileCollection::pointer_t &file_collection, CollectionCollection::MatchPath matchpath)
Search for an entry.
FileCollection & operator=(FileCollection const &src)
Replace the content of a collection with a copy of another collection.
std::vector< pointer_t > vector_t
Base class for various file collections.
virtual stream_pointer_t getInputStream(std::string const &entry_name, MatchPath matchpath=MatchPath::MATCH) override
Retrieve pointer to an istream.
virtual void close()
Close the current FileEntry of this FileCollection.
virtual size_t size() const override
Return the size of the of this collection.
virtual FileEntry::pointer_t getEntry(std::string const &name, MatchPath matchpath=MatchPath::MATCH) const override
Get an entry from the collection.
CollectionCollection()
Initialize a CollectionCollection object.
An InvalidException is used when invalid data is provided.
virtual void close() override
Close the CollectionCollection object.
std::shared_ptr< FileCollection > pointer_t
Define the zipios::CollectionCollection class.
std::vector< pointer_t > vector_t
The zipios namespace includes the Zipios library definitions.
bool isValid() const
Check whether the current collection is valid.