4#include "zipios++/zipios-config.h"
64 virtual void close() ;
69 MatchPath matchpath = MATCH )
const ;
74 MatchPath matchpath = MATCH ) ;
78 virtual int size()
const ;
92 std::vector< FileCollection * >::const_iterator &it,
93 MatchPath matchpath = MATCH )
const ;
95 vector< FileCollection * > _collections ;
121 _collections.reserve( src._collections.size() ) ;
122 std::vector< FileCollection * >::const_iterator it ;
123 for ( it = src._collections.begin() ; it != src._collections.end() ; ++it )
124 _collections.push_back( (*it)->clone() ) ;
133 if (
this != &src ) {
135 std::vector< FileCollection * >::const_iterator it ;
136 for ( it = _collections.begin() ; it != _collections.end() ; ++it )
139 _collections.clear() ;
140 _collections.reserve( src._collections.size() ) ;
141 for ( it = src._collections.begin() ; it != src._collections.end() ; ++it )
142 _collections.push_back( (*it)->clone() ) ;
CollectionCollection is a FileCollection that consists of an arbitrary number of FileCollections.
virtual ConstEntries entries() const
Returns a vector of const pointers to the entries in the FileCollection.
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.
virtual FileCollection * clone() const
Create a heap allocated clone of the object this method is called for.
virtual istream * getInputStream(const ConstEntryPointer &entry)
Returns a pointer to an opened istream for the specified FileEntry.
CollectionCollection()
Constructor.
virtual int size() const
Returns the number in entries in all collections kept by the CollectionCollection object.
virtual void close()
Closes the FileCollection.
const CollectionCollection & operator=(const CollectionCollection &src)
Copy assignment operator.
FileCollection is an abstract baseclass that represents a collection of files.
const FileCollection & operator=(const FileCollection &src)
Copy assignment operator.
SimpleSmartPointer is a simple reference counting smart pointer template.
Header file that defines FileCollection.
vector< EntryPointer > ConstEntries
ConstEntries is a vector of ConstEntryPointer's.