cgma
|
#include <CubitInputFile.hpp>
Public Types | |
enum | FileType { FILE_NORMAL = 1, FILE_FASTQ = 2, FILE_TEMPORARY = 3 } |
Public Member Functions | |
CubitInputFile (const CubitString &fileName, FileType type=FILE_NORMAL, int loop=1, const CubitString &default_path=CubitString()) | |
~CubitInputFile () | |
Public Attributes | |
CubitString | filename |
CubitFile | filePointer |
int | lineNumber |
CubitInputFile::FileType | fileType |
int | loopCount |
int | breakPoint |
Definition at line 10 of file CubitInputFile.hpp.
Definition at line 12 of file CubitInputFile.hpp.
{ FILE_NORMAL=1, FILE_FASTQ=2, FILE_TEMPORARY=3 };
CubitInputFile::CubitInputFile | ( | const CubitString & | fileName, |
CubitInputFile::FileType | type = FILE_NORMAL , |
||
int | loop = 1 , |
||
const CubitString & | default_path = CubitString() |
||
) | [inline] |
Definition at line 36 of file CubitInputFile.hpp.
: breakPoint(0) { CubitString file_and_path; filePointer.open(fileName, "r"); if (!filePointer && includePath.length()) { file_and_path = includePath; file_and_path += "/"; file_and_path += fileName; filePointer.open(file_and_path, "r"); } if (filePointer) { if (includePath.length()) filename = file_and_path; else filename = fileName; } else { filename = "<Invalid File>"; PRINT_WARNING("Could not open file: %s\n", fileName.c_str() ); } lineNumber = 1; fileType = type; loopCount = --loop; }
CubitInputFile::~CubitInputFile | ( | ) | [inline] |
Definition at line 67 of file CubitInputFile.hpp.
{ filePointer.close(); if (fileType == FILE_TEMPORARY) CubitFileUtil::remove_file(filename); /* Delete file if temporary */ }
Definition at line 24 of file CubitInputFile.hpp.
Definition at line 19 of file CubitInputFile.hpp.
Definition at line 20 of file CubitInputFile.hpp.
Definition at line 22 of file CubitInputFile.hpp.
Definition at line 21 of file CubitInputFile.hpp.
Definition at line 23 of file CubitInputFile.hpp.