CycloBranch
cSequenceDatabase.h
Go to the documentation of this file.
1
7#ifndef _CSEQUENCEDATABASE_H
8#define _CSEQUENCEDATABASE_H
9
10#include <iostream>
11#include <fstream>
12#include <vector>
13#include <string>
14#include "core/utilities.h"
15#include "core/cSequence.h"
16
17
18using namespace std;
19
20
21class cMainThread;
22
23
28
29 vector<cSequence> sequences;
30
31 void parseRT(bool keeprt);
32
33
34public:
35
36
41
42
48 void loadFromPlainTextStream(ifstream &stream, bool keeprt);
49
50
56 void storeToPlainTextStream(ofstream &stream, bool keeprt);
57
58
63 int size();
64
65
71 cSequence& operator[](int position);
72
73
77 void clear();
78
79
84 void push_back(cSequence& sequence);
85
86
91 void erase(int index);
92
93
98 void store(ofstream& os);
99
100
108 void load(ifstream& is, int fileversionpart1, int fileversionpart2, int fileversionpart3);
109
110
115 void attachDecoys(bool& terminatecomputation);
116
117};
118
119
120#endif
The representation of a sequence.
The class representing a thread launched by the command 'Search->Run'.
Definition: cMainThread.h:34
The class representing a database of sequences.
Definition: cSequenceDatabase.h:27
cSequence & operator[](int position)
Overloaded operator [].
Definition: cSequenceDatabase.cpp:199
cSequenceDatabase()
The constructor.
Definition: cSequenceDatabase.cpp:58
void loadFromPlainTextStream(ifstream &stream, bool keeprt)
Load the database of sequences from a plain text stream.
Definition: cSequenceDatabase.cpp:63
void load(ifstream &is, int fileversionpart1, int fileversionpart2, int fileversionpart3)
Load the structure from an input stream.
Definition: cSequenceDatabase.cpp:233
void push_back(cSequence &sequence)
Push a new sequence into the vector of sequences.
Definition: cSequenceDatabase.cpp:209
void storeToPlainTextStream(ofstream &stream, bool keeprt)
Store the database of sequences into a plain text stream.
Definition: cSequenceDatabase.cpp:175
void clear()
Clear the vector of sequences.
Definition: cSequenceDatabase.cpp:204
int size()
Get the number of sequences in the database.
Definition: cSequenceDatabase.cpp:194
void store(ofstream &os)
Store the structure into an output stream.
Definition: cSequenceDatabase.cpp:221
void erase(int index)
Erase a sequence.
Definition: cSequenceDatabase.cpp:214
void attachDecoys(bool &terminatecomputation)
Attach decoys.
Definition: cSequenceDatabase.cpp:245
The class representing a sequence.
Definition: cSequence.h:26
Auxiliary funtions and structures.