2 #ifndef ZIPIOS_FILECOLLECTION_HPP
3 #define ZIPIOS_FILECOLLECTION_HPP
64 virtual std::string
getName()
const;
65 virtual size_t size()
const;
virtual FileEntry::pointer_t getEntry(std::string const &name, MatchPath matchpath=MatchPath::MATCH) const
Get an entry from this collection.
std::ostream & operator<<(std::ostream &os, FileCollection const &collection)
Write a FileCollection to the output stream.
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
virtual FileEntry::vector_t entries() const
Retrieve the array of entries.
virtual std::string getName() const
Returns the name of the FileCollection.
StorageMethod
The types used with FileEntry::setMethod and FileEntry::getMethod.
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.
virtual size_t size() const
Returns the number of entries in the FileCollection.
FileEntry::vector_t m_entries
virtual ~FileCollection()
Make sure the resources are released.
virtual void close()
Close the current FileEntry of this FileCollection.
virtual void mustBeValid() const
Check whether the collection is valid.
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.
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.
Define the zipios::FileEntry class.
bool isValid() const
Check whether the current collection is valid.
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