Isis 3 Programmer Reference
|
Internalizes a list of files. More...
#include <FileList.h>
Public Member Functions | |
FileList (FileName listFile) | |
Creates a FileList based on a FileName. More... | |
FileList (std::istream &in) | |
Constructs a FileList from an istream. More... | |
FileList () | |
Creates an empty FileList obj. More... | |
~FileList () | |
Destroys the FileList object. More... | |
void | read (FileName listFile) |
reads in a FileName obj More... | |
void | read (std::istream &in) |
reads in an istream More... | |
void | write (FileName outputFileList) |
writes to a FileName obj More... | |
void | write (std::ostream &out) |
writes to an ostream More... | |
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 54 of file FileList.h.
Isis::FileList::FileList | ( | FileName | listFile | ) |
Isis::FileList::FileList | ( | std::istream & | in | ) |
Constructs a FileList from an istream.
in | the istream to read from |
Definition at line 40 of file FileList.cpp.
Isis::FileList::FileList | ( | ) |
Creates an empty FileList obj.
Constructs an empty FileList.
Definition at line 22 of file FileList.cpp.
|
inline |
Destroys the FileList object.
Definition at line 68 of file FileList.h.
void Isis::FileList::read | ( | FileName | listFile | ) |
reads in a FileName obj
Opens and loads the list of files from a file.
listFile | Name of the file to open that contains the list of files. |
Isis::iException::Io | - Cannot open file |
Definition at line 52 of file FileList.cpp.
References Isis::Message::FileOpen(), and Isis::FileName::toString().
Referenced by Isis::Equalization::addHolds(), and Isis::Equalization::loadOutputs().
void Isis::FileList::read | ( | std::istream & | in | ) |
reads in an istream
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 86 of file FileList.cpp.
References Isis::IString::Token(), Isis::IString::ToQt(), Isis::IString::TrimHead(), and Isis::IString::TrimTail().
void Isis::FileList::write | ( | FileName | outputFileList | ) |
writes to a FileName obj
Writes a list of files to a file.
outputFileList | 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 158 of file FileList.cpp.
References Isis::FileName::toString().
Referenced by Isis::Pipeline::Run().
void Isis::FileList::write | ( | std::ostream & | out | ) |
writes to an ostream
Writes a list of files to a stream.
out | The list will be written to this output stream. |
Definition at line 180 of file FileList.cpp.