.TH "zipios::DirectoryCollection" 3 "Tue May 9 2017" "Zipios++" \" -*- nroff -*- .ad l .nh .SH NAME zipios::DirectoryCollection .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBzipios::FileCollection\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBDirectoryCollection\fP ()" .br .RI "Default Constructor\&. " .ti -1c .RI "\fBDirectoryCollection\fP (const string &path, bool recursive=true, bool load_now=false)" .br .RI "Constructor\&. " .ti -1c .RI "virtual void \fBclose\fP ()" .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)" .br .ti -1c .RI "virtual istream * \fBgetInputStream\fP (const string &entry_name, MatchPath matchpath=MATCH)" .br .RI "Returns a pointer to an opened istream for the specified entry name\&. " .ti -1c .RI "virtual int \fBsize\fP () const" .br .RI "Returns the number of entries in the \fBFileCollection\fP\&. " .ti -1c .RI "virtual \fBFileCollection\fP * \fBclone\fP () const" .br .RI "Create a heap allocated clone of the object this method is called for\&. " .ti -1c .RI "virtual \fB~DirectoryCollection\fP ()" .br .RI "Destructor\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "void \fBloadEntries\fP () const" .br .ti -1c .RI "void \fBload\fP (bool recursive, const \fBFilePath\fP &subdir=\fBFilePath\fP())" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "bool \fB_entries_loaded\fP" .br .ti -1c .RI "bool \fB_recursive\fP" .br .ti -1c .RI "\fBFilePath\fP \fB_filepath\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP \fBDirectoryCollection\fP is a \fBFileCollection\fP that obtains its entries from a directory\&. .PP Definition at line 19 of file dircoll\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "zipios::DirectoryCollection::DirectoryCollection ()\fC [inline]\fP, \fC [explicit]\fP" .PP Default Constructor\&. .PP Definition at line 23 of file dircoll\&.h\&. .SS "zipios::DirectoryCollection::DirectoryCollection (const string & path, bool recursive = \fCtrue\fP, bool load_now = \fCfalse\fP)\fC [explicit]\fP" .PP Constructor\&. .PP \fBParameters:\fP .RS 4 \fIpath\fP A directory path name\&. If the name is not a valid directory the created \fBDirectoryCollection\fP will be invalid\&. .br \fIload_now\fP Load directory into memory now\&. Otherwise it will be done when it is first needed\&. .RE .PP .PP Definition at line 20 of file dircoll\&.cpp\&. .SS "zipios::DirectoryCollection::~DirectoryCollection ()\fC [virtual]\fP" .PP Destructor\&. .PP Definition at line 118 of file dircoll\&.cpp\&. .SH "Member Function Documentation" .PP .SS "\fBFileCollection\fP * zipios::DirectoryCollection::clone () const\fC [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 Implements \fBzipios::FileCollection\fP\&. .PP Definition at line 114 of file dircoll\&.cpp\&. .SS "void zipios::DirectoryCollection::close ()\fC [virtual]\fP" .PP Closes the \fBFileCollection\fP\&. .PP Implements \fBzipios::FileCollection\fP\&. .PP Definition at line 33 of file dircoll\&.cpp\&. .SS "\fBConstEntries\fP zipios::DirectoryCollection::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 from \fBzipios::FileCollection\fP\&. .PP Definition at line 38 of file dircoll\&.cpp\&. .SS "\fBConstEntryPointer\fP zipios::DirectoryCollection::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 from \fBzipios::FileCollection\fP\&. .PP Definition at line 49 of file dircoll\&.cpp\&. .SS "istream * zipios::DirectoryCollection::getInputStream (const \fBConstEntryPointer\fP & entry)\fC [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 Implements \fBzipios::FileCollection\fP\&. .PP Definition at line 68 of file dircoll\&.cpp\&. .SS "istream * zipios::DirectoryCollection::getInputStream (const string & entry_name, MatchPath matchpath = \fCMATCH\fP)\fC [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 Implements \fBzipios::FileCollection\fP\&. .PP Definition at line 76 of file dircoll\&.cpp\&. .SS "int zipios::DirectoryCollection::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 from \fBzipios::FileCollection\fP\&. .PP Definition at line 106 of file dircoll\&.cpp\&. .SH "Author" .PP Generated automatically by Doxygen for Zipios++ from the source code\&.