3#include "zipios++/zipios-config.h"
5#include "zipios++/meta-iostreams.h"
12using namespace zipios ;
22 cout <<
"Instantiating a DirectoryCollection" << endl ;
25 cout <<
"Instantiating a ZipFile" << endl ;
28 cout <<
"Instantiating a CollectionCollection" << endl ;
31 cout <<
"Adding the zip file and directory collection to the collection collection"
34 cerr <<
"Failed to add the zip file" << endl ;
38 cerr <<
"Failed to add the zip file" << endl ;
66 auto_ptr< istream > is(
CColl::inst().getInputStream( ent ) ) ;
68 cout <<
"Contents of entry, " << ent->getName() <<
" :" << endl ;
75 auto_ptr< istream > is(
CColl::inst().getInputStream( ent ) ) ;
77 cout <<
"Contents of entry, " << ent->getName() <<
" :" << endl ;
81 cout <<
"end of main()" << endl ;
85 catch( exception &excp ) {
86 cerr <<
"Exception caught in main() :" << endl ;
87 cerr << excp.what() << endl ;
CollectionCollection is a FileCollection that consists of an arbitrary number of FileCollections.
virtual ConstEntryPointer getEntry(const string &name, MatchPath matchpath=MATCH) const
Returns a ConstEntryPointer to a FileEntry object for the entry with the specified name.
bool addCollection(const FileCollection &collection)
Adds a collection.
static CollectionCollection & inst()
This static method provides a singleton instance of a CollectionCollection.
DirectoryCollection is a FileCollection that obtains its entries from a directory.
SimpleSmartPointer is a simple reference counting smart pointer template.
ZipFile is a FileCollection, where the files are stored in a .zip file.
Header file that defines CollectionCollection.
Header file that defines DirectoryCollection.
Header file that defines ZipFile.