.TH "zipios::FileCollection" 3 "Tue May 9 2017" "Zipios++" \" -*- nroff -*- .ad l .nh .SH NAME zipios::FileCollection .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherited by \fBzipios::CollectionCollection\fP, \fBzipios::DirectoryCollection\fP, and \fBzipios::ZipFile\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBMatchPath\fP { \fBIGNORE\fP, \fBMATCH\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBFileCollection\fP ()" .br .RI "\fBFileCollection\fP constructor\&. " .ti -1c .RI "\fBFileCollection\fP (const \fBFileCollection\fP &src)" .br .RI "Copy constructor\&. " .ti -1c .RI "const \fBFileCollection\fP & \fBoperator=\fP (const \fBFileCollection\fP &src)" .br .RI "Copy assignment operator\&. " .ti -1c .RI "virtual void \fBclose\fP ()=0" .br .RI "Closes the \fBFileCollection\fP\&. " .ti -1c .RI "virtual \fBConstEntries\fP \fBentries\fP () const" .br .ti -1c .RI "virtual \fBConstEntryPointer\fP \fBgetEntry\fP (const string &name, MatchPath matchpath=MATCH) const" .br .ti -1c .RI "virtual istream * \fBgetInputStream\fP (const \fBConstEntryPointer\fP &entry)=0" .br .ti -1c .RI "virtual istream * \fBgetInputStream\fP (const string &entry_name, MatchPath matchpath=MATCH)=0" .br .RI "Returns a pointer to an opened istream for the specified entry name\&. " .ti -1c .RI "virtual string \fBgetName\fP () const" .br .RI "Returns the name of the \fBFileCollection\fP\&. " .ti -1c .RI "virtual int \fBsize\fP () const" .br .RI "Returns the number of entries in the \fBFileCollection\fP\&. " .ti -1c .RI "bool \fBisValid\fP () const" .br .RI "The member function returns true if the collection is valid\&. " .ti -1c .RI "virtual \fBFileCollection\fP * \fBclone\fP () const =0" .br .RI "Create a heap allocated clone of the object this method is called for\&. " .ti -1c .RI "virtual \fB~FileCollection\fP ()" .br .RI "\fBFileCollection\fP destructor\&. " .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "string \fB_filename\fP" .br .ti -1c .RI "\fBEntries\fP \fB_entries\fP" .br .ti -1c .RI "bool \fB_valid\fP" .br .in -1c .SH "Detailed Description" .PP \fBFileCollection\fP is an abstract baseclass that represents a collection of files\&. The specializations of \fBFileCollection\fP represents different origins of file collections, such as directories, simple filename lists and compressed archives\&. .PP Definition at line 21 of file fcoll\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "zipios::FileCollection::FileCollection ()\fC [inline]\fP, \fC [explicit]\fP" .PP \fBFileCollection\fP constructor\&. .PP Definition at line 24 of file fcoll\&.h\&. .SS "zipios::FileCollection::FileCollection (const \fBFileCollection\fP & src)\fC [inline]\fP" .PP Copy constructor\&. .PP Definition at line 115 of file fcoll\&.h\&. .SS "zipios::FileCollection::~FileCollection ()\fC [virtual]\fP" .PP \fBFileCollection\fP destructor\&. .PP Definition at line 63 of file fcoll\&.cpp\&. .SH "Member Function Documentation" .PP .SS "virtual \fBFileCollection\fP* zipios::FileCollection::clone () const\fC [pure virtual]\fP" .PP Create a heap allocated clone of the object this method is called for\&. The caller is responsible for deallocating the clone when he is done with it\&. .PP \fBReturns:\fP .RS 4 A heap allocated copy of the object this method is called for\&. .RE .PP .PP Implemented in \fBzipios::CollectionCollection\fP, \fBzipios::ZipFile\fP, and \fBzipios::DirectoryCollection\fP\&. .SS "virtual void zipios::FileCollection::close ()\fC [pure virtual]\fP" .PP Closes the \fBFileCollection\fP\&. .PP Implemented in \fBzipios::CollectionCollection\fP, \fBzipios::ZipFile\fP, and \fBzipios::DirectoryCollection\fP\&. .SS "\fBConstEntries\fP zipios::FileCollection::entries () const\fC [virtual]\fP" Returns a vector of const pointers to the entries in the \fBFileCollection\fP\&. .PP \fBReturns:\fP .RS 4 a ConstEntries containing the entries of the \fBFileCollection\fP\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBInvalidStateException\fP\fP Thrown if the collection is invalid\&. .RE .PP .PP Reimplemented in \fBzipios::CollectionCollection\fP, and \fBzipios::DirectoryCollection\fP\&. .PP Definition at line 17 of file fcoll\&.cpp\&. .SS "\fBConstEntryPointer\fP zipios::FileCollection::getEntry (const string & name, MatchPath matchpath = \fCMATCH\fP) const\fC [virtual]\fP" Returns a ConstEntryPointer to a \fBFileEntry\fP object for the entry with the specified name\&. To ignore the path part of the filename in search of a match, specify FileCollection::IGNORE as the second argument\&. .PP \fBParameters:\fP .RS 4 \fIname\fP A string containing the name of the entry to get\&. .br \fImatchpath\fP Speficy MATCH, if the path should match as well, specify IGNORE, if the path should be ignored\&. .RE .PP \fBReturns:\fP .RS 4 A ConstEntryPointer to the found entry\&. The returned pointer equals zero if no entry is found\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBInvalidStateException\fP\fP Thrown if the collection is invalid\&. .RE .PP .PP Reimplemented in \fBzipios::CollectionCollection\fP, and \fBzipios::DirectoryCollection\fP\&. .PP Definition at line 34 of file fcoll\&.cpp\&. .SS "virtual istream* zipios::FileCollection::getInputStream (const \fBConstEntryPointer\fP & entry)\fC [pure virtual]\fP" Returns a pointer to an opened istream for the specified \fBFileEntry\fP\&. It is the callers responsibility to delete the stream when he is done with it\&. Returns 0, if there is no such \fBFileEntry\fP in the \fBFileCollection\fP\&. .PP \fBParameters:\fP .RS 4 \fIentry\fP A ConstEntryPointer to the \fBFileEntry\fP to get an istream to\&. .RE .PP \fBReturns:\fP .RS 4 an open istream for the specified entry\&. The istream is allocated on heap and it is the users responsibility to delete it when he is done with it\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBInvalidStateException\fP\fP Thrown if the collection is invalid\&. .RE .PP .PP Implemented in \fBzipios::CollectionCollection\fP, \fBzipios::ZipFile\fP, and \fBzipios::DirectoryCollection\fP\&. .SS "virtual istream* zipios::FileCollection::getInputStream (const string & entry_name, MatchPath matchpath = \fCMATCH\fP)\fC [pure virtual]\fP" .PP Returns a pointer to an opened istream for the specified entry name\&. It is the callers responsibility to delete the stream when he is done with it\&. Returns 0, if there is no entry with the specified name in the \fBFileCollection\fP\&. .PP \fBParameters:\fP .RS 4 \fImatchpath\fP Speficy MATCH, if the path should match as well, specify IGNORE, if the path should be ignored\&. .RE .PP \fBReturns:\fP .RS 4 an open istream for the specified entry\&. The istream is allocated on heap and it is the users responsibility to delete it when he is done with it\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBInvalidStateException\fP\fP Thrown if the collection is invalid\&. .RE .PP .PP Implemented in \fBzipios::CollectionCollection\fP, \fBzipios::ZipFile\fP, and \fBzipios::DirectoryCollection\fP\&. .SS "string zipios::FileCollection::getName () const\fC [virtual]\fP" .PP Returns the name of the \fBFileCollection\fP\&. .PP \fBReturns:\fP .RS 4 the name of the \fBFileCollection\fP\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBInvalidStateException\fP\fP Thrown if the collection is invalid\&. .RE .PP .PP Definition at line 50 of file fcoll\&.cpp\&. .SS "bool zipios::FileCollection::isValid () const\fC [inline]\fP" .PP The member function returns true if the collection is valid\&. .PP \fBReturns:\fP .RS 4 true if the collection is valid\&. .RE .PP .PP Definition at line 93 of file fcoll\&.h\&. .SS "const \fBFileCollection\fP & zipios::FileCollection::operator= (const \fBFileCollection\fP & src)\fC [inline]\fP" .PP Copy assignment operator\&. .PP Definition at line 125 of file fcoll\&.h\&. .SS "int zipios::FileCollection::size () const\fC [virtual]\fP" .PP Returns the number of entries in the \fBFileCollection\fP\&. .PP \fBReturns:\fP .RS 4 the number of entries in the \fBFileCollection\fP\&. .RE .PP \fBExceptions:\fP .RS 4 \fI\fBInvalidStateException\fP\fP Thrown if the collection is invalid\&. .RE .PP .PP Reimplemented in \fBzipios::CollectionCollection\fP, and \fBzipios::DirectoryCollection\fP\&. .PP Definition at line 57 of file fcoll\&.cpp\&. .SH "Author" .PP Generated automatically by Doxygen for Zipios++ from the source code\&.