Isis 3.0 Object Programmers' Reference |
Home |
Internalizes a list of files. More...
#include <FileList.h>
Public Member Functions | |
FileList (FileName listFile) | |
Constructs a FileList from a stream. | |
FileList (std::istream &in) | |
FileList () | |
Constructs an empty FileList. | |
~FileList () | |
Destroys the FileList object. | |
void | read (FileName listFile) |
Constructs a FileList from a stream. | |
void | read (std::istream &in) |
Loads list of files from a stream. | |
void | write (FileName outputFileList) |
Writes a list of files to a file. | |
void | write (std::ostream &out) |
Writes a list of files to a stream. |
Internalizes a list of files.
This class reads a list of filenames from a file an internalizes them in a standard template vector of strings. Thus, a file like:
Will be internalized as and accessable as an vector.
Definition at line 67 of file FileList.h.
Isis::FileList::FileList | ( | FileName | listFile | ) |
Constructs a FileList from a stream.
in | An input stream containing a list of files. |
Definition at line 46 of file FileList.cpp.
Isis::FileList::FileList | ( | ) |
Constructs an empty FileList.
Definition at line 38 of file FileList.cpp.
|
inline |
Destroys the FileList object.
Definition at line 75 of file FileList.h.
void Isis::FileList::read | ( | FileName | listFile | ) |
Constructs a FileList from a stream.
path | of a file containing a list of files. Opens and loads the list of files from a file. |
list | Name of the file to open that contains the list of files. |
Isis::iException::Io | - Cannot open file |
Definition at line 66 of file FileList.cpp.
References _FILEINFO_, Isis::Message::FileOpen(), and read().
Referenced by read().
void Isis::FileList::read | ( | std::istream & | in | ) |
Loads list of files from a stream.
This takes in a stream and loads a file list from it. The lines in the stream are considered separate entries, and comments are ignored. comments are considered to be any line starting with a '#' or '//', and anything after any whitespace following the first text on the line.
in | An input stream containing a list of files. |
Definition at line 101 of file FileList.cpp.
References _FILEINFO_, Isis::IString::Token(), Isis::IString::ToQt(), Isis::IString::TrimHead(), and Isis::IString::TrimTail().
void Isis::FileList::write | ( | FileName | outputFileList | ) |
Writes a list of files to a file.
list | The name of the file to create. The method will overwrite any existing files. |
Isis::iException::Io | File could not be created. |
Definition at line 174 of file FileList.cpp.
References _FILEINFO_, and Isis::Message::FileOpen().
void Isis::FileList::write | ( | std::ostream & | out | ) |
Writes a list of files to a stream.
out | The list will be written to this output stream. |
Definition at line 196 of file FileList.cpp.