-
Notifications
You must be signed in to change notification settings - Fork 66
/
Interval.hh
50 lines (42 loc) · 1.04 KB
/
Interval.hh
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef __INTERVAL_HH__
#define __INTERVAL_HH__
// C/C++ includes
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;
class Interval
{
private:
string _name1,_name2;
short _index;
int _s1,_e1;
int _s2,_e2;
short _u1,_u2;
Interval *_next;
public:
Interval(string file);
private:
Interval();
public:
inline string name1() { return _name1; }
inline int start1() { return _s1; }
inline int end1() { return _e1; }
inline int unique1() { return _u1; }
inline string name2() { return _name2; }
inline int start2() { return _s2; }
inline int end2() { return _e2; }
inline int unique2() { return _u2; }
inline int otherIndex() { return _index; }
inline Interval *next() { return _next; }
public:
void setUnique1(int val);
void setUnique2(int val);
void setOtherIndex(short val);
int getEquivalent(int pos);
int count();
private:
inline void setNext(Interval *inter) { _next = inter; }
bool parseRecord(ifstream &in);
};
#endif