Isis 3.0
Back | Home
Isis::FileList Class Reference

Internalizes a list of files. More...

#include <FileList.h>

Inherits QList< FileName >.

Public Member Functions

 FileList (FileName listFile)
 Constructs a FileList from a stream. More...
 
 FileList (std::istream &in)
 
 FileList ()
 Constructs an empty FileList. More...
 
 ~FileList ()
 Destroys the FileList object. More...
 
void read (FileName listFile)
 Constructs a FileList from a stream. More...
 
void read (std::istream &in)
 Loads list of files from a stream. More...
 
void write (FileName outputFileList)
 Writes a list of files to a file. More...
 
void write (std::ostream &out)
 Writes a list of files to a stream. More...
 

Detailed Description

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:

* m0035431.imq
* m0030402.imq
* m0033231.imq
* .
* .
* .
* m0203331.imq
*

Will be internalized as and accessable as an vector.

Author
2003-05-01 Jeff Anderson

Constructor & Destructor Documentation

Isis::FileList::FileList ( FileName  listFile)

Constructs a FileList from a stream.

Parameters
inAn input stream containing a list of files.
Isis::FileList::FileList ( std::istream &  in)
Isis::FileList::FileList ( )

Constructs an empty FileList.

Isis::FileList::~FileList ( )
inline

Destroys the FileList object.

Member Function Documentation

void Isis::FileList::read ( FileName  listFile)

Constructs a FileList from a stream.

Parameters
pathof a file containing a list of files. Opens and loads the list of files from a file.
listName of the file to open that contains the list of files.
Exceptions
Isis::iException::Io- Cannot open file

References _FILEINFO_, Isis::Message::FileOpen(), read(), and Isis::FileName::toString().

Referenced by Isis::Equalization::addHolds(), Isis::Equalization::loadOutputs(), and 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.

Parameters
inAn input stream containing a list of files.

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.

Parameters
listThe name of the file to create. The method will overwrite any existing files.
Exceptions
Isis::iException::IoFile could not be created.

References _FILEINFO_, Isis::Message::FileOpen(), and Isis::FileName::toString().

void Isis::FileList::write ( std::ostream &  out)

Writes a list of files to a stream.

Parameters
outThe list will be written to this output stream.

The documentation for this class was generated from the following files:

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:37:15