File: FileReader.cpp

package info (click to toggle)
bedtools 2.27.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 54,804 kB
  • sloc: cpp: 38,072; sh: 7,307; makefile: 2,241; python: 163
file content (33 lines) | stat: -rw-r--r-- 547 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <iostream>
#include <cstring>
#include "FileReader.h"
#include "BufferedStreamMgr.h"

FileReader::FileReader()
: _fileIdx(-1),
  _bufStreamMgr(NULL),
  _isFileOpen(false),
  _currChromId(-1)
{
}

FileReader::~FileReader() {
}

bool FileReader::open() {

	if (_isFileOpen) {
		return true;
	} else {
		fprintf(stderr, "Error: bad input stream.\n");
		exit(1);
	}
	return false; //can't reach this point, but it's here to satisfy the compiler.
}

void FileReader::close() {
}

bool FileReader::eof() const {
	return _bufStreamMgr->eof();
}