2 #ifndef ZIPIOS_FILECOLLECTION_HPP 3 #define ZIPIOS_FILECOLLECTION_HPP 64 virtual std::string
getName()
const;
65 virtual size_t size()
const;
std::ostream & operator<<(std::ostream &os, FileCollection const &collection)
Write a FileCollection to the output stream.
virtual FileEntry::pointer_t getEntry(std::string const &name, MatchPath matchpath=MatchPath::MATCH) const
Get an entry from this collection.
The zipios namespace includes the Zipios++ library definitions.
std::shared_ptr< FileCollection > pointer_t
virtual void addEntry(FileEntry const &entry)
Add an entry to this collection.
FileCollection(std::string const &filename="")
Initializes a FileCollection object.
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.
std::vector< pointer_t > vector_t
StorageMethod
The types used with FileEntry::setMethod and FileEntry::getMethod.
virtual FileEntry::vector_t entries() const
Retrieve the array of entries.
bool isValid() const
Check whether the current collection is valid.
int CompressionLevel
The compression level to be used to save an entry.
virtual stream_pointer_t getInputStream(std::string const &entry_name, MatchPath matchpath=MatchPath::MATCH)=0
Retrieve pointer to an istream.
FileEntry::vector_t m_entries
virtual ~FileCollection()
Make sure the resources are released.
virtual void close()
Close the current FileEntry of this FileCollection.
FileCollection & operator=(FileCollection const &src)
Replace the content of a collection with a copy of another collection.
A FileEntry represents an entry in a FileCollection.
virtual void mustBeValid() const
Check whether the collection is valid.
Base class for various file collections.
void setLevel(size_t limit, FileEntry::CompressionLevel small_compression_level, FileEntry::CompressionLevel large_compression_level)
Change the compression level to the specified value.
virtual size_t size() const
Returns the number of entries in the FileCollection.
virtual std::string getName() const
Returns the name of the FileCollection.
Define the zipios::FileEntry class.
std::shared_ptr< FileEntry > pointer_t
void setMethod(size_t limit, StorageMethod small_storage_method, StorageMethod large_storage_method)
Change the storage method to the specified value.
std::vector< pointer_t > vector_t