-
Notifications
You must be signed in to change notification settings - Fork 0
/
NucleoBase.h
59 lines (52 loc) · 1.75 KB
/
NucleoBase.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
#ifndef NUCLEOBASE_H
#define NUCLEOBASE_H
#include <iostream>
class Triangular;
using namespace std;
class NucleoBase {
/* This class represents a linked list to express RNA and will
be used only by Triangular microorganisms */
friend class Triangular;
private:
int size;
char nucleobase;
NucleoBase* next;
NucleoBase* prev;
NucleoBase(char x, NucleoBase* back, NucleoBase* forwd) : nucleobase(x) {next=forwd; prev=back;}
public: // Do NOT make any modifications below!
/*********************************************************************
* Constructor
*
* The first @param is the whole RNA sequence
* The second parameter is a NucleoBase pointer addressing the previous
NucleoBase object. For the initial nucleobase this is NULL.
*/
NucleoBase(string, NucleoBase*);
/*********************************************************************
* Copy Constructor
*
* Deep copy
*/
NucleoBase(const NucleoBase&);
/*********************************************************************
* Destructor
*
*/
~NucleoBase();
/*********************************************************************
* GetLast
*
* @return pointer to the last element of NucleoBase chain.
*/
NucleoBase* GetLast();
/*********************************************************************
* Stream Operator
* Prints the data in NucleoBase chain.
* Prints the char data of each NucleoBase object starting from the
given NucleoBase in the @param upto the last element of the chain.
* Do NOT add new line character "\n" to the end of the stream.
*/
friend ostream& operator<<(ostream&, const NucleoBase&);
/********************************************************************/
};
#endif