BedPlusInterval.h 1.33 KB
Newer Older
nkindlon's avatar
nkindlon committed
1
2
3
4
5
6
7
8
9
10
/*
 * BedPlusInterval.h
 *
 *  Created on: Nov 13, 2012
 *      Author: nek3d
 */

#ifndef BEDPLUSINTERVAL_H_
#define BEDPLUSINTERVAL_H_

11
#include "Bed3Interval.h"
12
#include "PlusFields.h"
nkindlon's avatar
nkindlon committed
13
14
15

class SingleLineDelimTextFileReader;

16
class BedPlusInterval : public Bed3Interval {
nkindlon's avatar
nkindlon committed
17
18
19
20
public:
	friend class FreeList<BedPlusInterval>;

	BedPlusInterval();
21
	virtual ~BedPlusInterval() {}
nkindlon's avatar
nkindlon committed
22
23
24
25
26
27
28
29
	virtual bool initFromFile(SingleLineDelimTextFileReader *);
	virtual void clear();
	virtual void print(QuickString &outBuf) const;
	virtual void print(QuickString &outBuf, int start, int end) const;
	virtual void print(QuickString &outBuf, const QuickString & start, const QuickString & end) const;
	virtual void printNull(QuickString &outBuf) const;
	virtual FileRecordTypeChecker::RECORD_TYPE getType() const { return FileRecordTypeChecker::BED_PLUS_RECORD_TYPE; }

30
	virtual const QuickString &getField(int fieldNum) const;
31
	virtual int getNumFields() const  { return numFixedFields + _plusFields.size(); }
32

nkindlon's avatar
nkindlon committed
33
34
	virtual void setNumPrintFields(int num) { _numPrintFields = num; }
	virtual int getNumPrintFields() const { return _numPrintFields; }
35
36
	static bool isNumericField(int fieldNum);

nkindlon's avatar
nkindlon committed
37
38

protected:
39
40
	static const int numFixedFields = 3; //first three fields have names, and are not stored in otherIdxs.
	PlusFields _plusFields;
nkindlon's avatar
nkindlon committed
41
	int _numPrintFields;
42

nkindlon's avatar
nkindlon committed
43
44
45
46
47
};



#endif /* BEDPLUSINTERVAL_H_ */