-
Notifications
You must be signed in to change notification settings - Fork 1
/
Suffix.h
74 lines (63 loc) · 1.89 KB
/
Suffix.h
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* Suffix.h
*
* This is the header file for the SUffix object. The Suffix object represents a
* particular suffix from a DNA sequence. The main attributes of this suffix
* are:
* dnaStrand - the sequence of DNA Bases that form the suffix
* fileName - the name of the fasta file the suffix came from
* location - the location the suffix begins from in the original DNA strand
* from the fasta file
* forward - true if the sufix is from the foward strand of the original DNA
* strand from the fasta file
* - false if it is from the reverse complement
*
* Typical use for this object:
*
* 1. Suffix(aDnaStrand, aStrandName, aLocaiton, isForward) to create an instance
* 2. toString(prefixSize) to get xml result for the suffix
*
* Created on: 1-12-13
* Author: tomkolar
*/
#ifndef SUFFIX_H
#define SUFFIX_H
#include <string>
using namespace std;
class Suffix {
public:
// Constuctors
// ==============================================
Suffix();
Suffix(char* aDnaSequence, string aStrandName, int aLocation, bool isForward);
// Destructor
// =============================================
virtual ~Suffix();
// Public Methods
// =============================================
// string toString(int prefixSize)
// Purpose:
// Returns a formatted XML element representing the fileName,
// location and forwardness of this suffix
//
// format:
// <result type='location' file='<<fileName>>' strand='<<forward|reverse>>' >
// <<location>>
// </result>
// Preconditions:
// Object has been fully populated
string toString(int prefixSize);
// Public Accessors
// =============================================
char*& getDnaSequence();
string& getFileName();
bool isForward();
private:
// Attributes
// =============================================
char* dnaSequence;
string fileName;
int location;
bool forward;
};
#endif /* SUFFIX_H */