4 #include "zipios++/zipios-config.h" 36 virtual void close() = 0 ;
46 enum MatchPath { IGNORE, MATCH } ;
59 MatchPath matchpath = MATCH )
const ;
80 MatchPath matchpath = MATCH ) = 0 ;
84 virtual string getName()
const ;
88 virtual int size()
const ;
116 : _filename( src._filename ),
117 _valid ( src._valid )
119 _entries.reserve( src._entries.size() ) ;
120 Entries::const_iterator it ;
121 for ( it = src._entries.begin() ; it != src._entries.end() ; ++it )
122 _entries.push_back( (*it)->clone() ) ;
126 if (
this != &src ) {
127 _filename = src._filename ;
128 _valid = src._valid ;
130 _entries.reserve( src._entries.size() ) ;
132 Entries::const_iterator it ;
133 for ( it = src._entries.begin() ; it != src._entries.end() ; ++it )
134 _entries.push_back( (*it)->clone() ) ;
139 inline ostream & operator<< (ostream &os,
const FileCollection& collection) {
140 os <<
"collection '" << collection.
getName() <<
"' {" ;
142 ConstEntries::const_iterator it;
144 for (it=entries.begin(); it != entries.end(); ++it) {
148 os << (*it)->getName();
virtual void close()=0
Closes the FileCollection.
Header file that defines FileEntry.
SimpleSmartPointer is a simple reference counting smart pointer template.
virtual ConstEntries entries() const
vector< EntryPointer > ConstEntries
ConstEntries is a vector of ConstEntryPointer's.
FileCollection()
FileCollection constructor.
virtual istream * getInputStream(const ConstEntryPointer &entry)=0
const FileCollection & operator=(const FileCollection &src)
Copy assignment operator.
virtual int size() const
Returns the number of entries in the FileCollection.
vector< EntryPointer > Entries
Entries is a vector of EntryPointer's.
virtual ~FileCollection()
FileCollection destructor.
virtual FileCollection * clone() const =0
Create a heap allocated clone of the object this method is called for.
bool isValid() const
The member function returns true if the collection is valid.
virtual string getName() const
Returns the name of the FileCollection.
Header file that defines a number of exceptions used by FileCollection and its subclasses.
virtual ConstEntryPointer getEntry(const string &name, MatchPath matchpath=MATCH) const