  | 
  
    Isis 3 Programmer Reference
    
   | 
 
 
 
 
   50       bool p_GetLine(QString &line, 
bool chkComment);
 
   57       TextFile(
const QString &filename, 
const char *openmode = 
"input",
 
   58                const char *extension = 
"");
 
   61       TextFile(
const   char *filename, 
const char *openmode,
 
   62                std::vector<QString> &lines,
 
   63                const int &maxLinesToReadWrite = 0,
 
   64                const bool skipComments = 
true);
 
   66                const char *openmode, std::vector<QString> &lines,
 
   67                const int &maxLinesToReadWrite = 0,
 
   68                const bool skipComments = 
true);
 
   70                const char *openmode, QString *lines,
 
   71                const int &maxLinesToReadWrite, 
const bool skipComments = 
true);
 
   73                const char *openmode, QString *lines,
 
   74                const int &maxLinesToReadWrite, 
const bool skipComments = 
true);
 
   78       void Open(
const QString &filename, 
const char *openmode = 
"input",
 
   79                 const char *extension = 
"");
 
   80       void Open(
const char *filename, 
const char *openmode = 
"input",
 
   81                 const char *extension = 
"");
 
   83       bool OpenChk(
bool bailIfNotOpen = 
false);
 
   88       void GetFile(std::vector<QString> &lines, 
 
   89                    const int &maxLinesToRead = 0, 
 
   90                    const bool skipComments = 
true);
 
   91       void GetFile(QString *lines, 
const int &maxLinesToRead, 
 
   92                    const bool skipComments = 
true);
 
   94       void PutFile(std::vector<QString> &lines, 
 
   95                    const int &maxLinesToWrite = 0);
 
   96       void PutFile(
const QString *lines, 
const int &maxLinesToWrite);
 
   98       bool GetLine(QString &line, 
const bool skipComments = 
true);
 
  101       bool GetLine(
const bool skipComments = 
true);
 
  104       void PutLine(
const QString &line);
 
  105       void PutLine(
const char *line = 
"");
 
  110       QString GetComment();
 
  111       QString GetNewLine();
 
  113       void SetComment(
const char *commentString = 
"#");
 
  114       void SetNewLine(
const char *newLineString = 
"\n");
 
  116       int LineCount(
const int &maxLinesToRead = 0);
 
  117       std::streamsize 
Size();
 
  
 
std::streamsize Size()
Counts number of bytes in file.
 
~TextFile()
Closes file (if still open). Destroys the TextFile object.
 
void Close()
Closes file. Called automatically by TextFile destructor.
 
bool p_GetLine(QString &line, bool chkComment)
Gets next line from file.
 
QString p_newLineString
'newline' string used by PutLine and PutLineComment
 
TextFile()
Constructs an empty TextFile object.
 
Provides access to sequential ASCII stream I/O.
 
bool GetLine(QString &line, const bool skipComments=true)
Gets next line from file.
 
int p_openmode
openmode of file: Input, Output, Overwrite, Append
 
void SetNewLine(const char *newLineString="\n")
Sets the 'newline' string.
 
void Open(const QString &filename, const char *openmode="input", const char *extension="")
Opens a text file.
 
int LineCount(const int &maxLinesToRead=0)
Counts number of lines in file.
 
void Rewind()
Sets Read / Write pointer to begining of opened file.
 
QString p_commentString
'comment' string used by GetLine and PutLineComment
 
void SetComment(const char *commentString="#")
Sets the 'comment' string.
 
bool GetLineNoFilter()
Gets next NON-COMMENT line from file.
 
void PutLine(const QString &line)
Writes string to file and appends a 'newline' string.
 
QString p_filename
FileName of the opened file.
 
std::fstream p_stream
File stream handle.
 
void PutLineComment(const QString &line)
Writes string to file, prepends a 'comment' string and appends a 'newline' string.
 
This is free and unencumbered software released into the public domain.