forked from HIITMetagenomics/dsm-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EnumerateQuery.h
58 lines (43 loc) · 1.18 KB
/
EnumerateQuery.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
#ifndef _EnumerateQuery_H_
#define _EnumerateQuery_H_
#include "Query.h"
#include "ClientSocket.h"
#include <string>
#include <cstdlib> // exit()
#include <ctime>
#include <vector>
class EnumerateQuery : public Query
{
public:
EnumerateQuery(TextCollection *tc, OutputWriter &ow, bool vrb, ClientSocket *csocket, std::string const &ep, unsigned fm, unsigned md)
: Query(tc, ow, vrb, 0, 0, 0), reported(0), cs(csocket), enforcepath(ep), fmin(fm), maxdepth(md) //, haltTo(0), haltDepth(~0u)
{ }
virtual ~EnumerateQuery()
{
delete cs;
}
bool pushChar(char);
void popChar();
char leftChar();
void enumerate(unsigned &reported);
protected:
void firstStep();
private:
ulong reported;
ClientSocket *cs;
time_t wctime;
time_t wcrate;
std::string enforcepath;
TextCollection *tcr; // Index for reversed text
unsigned fmin;
unsigned maxdepth;
std::stack<ulong> extmin[ALPHABET_SIZE];
std::stack<ulong> extmax[ALPHABET_SIZE];
/*ulong haltTo;
unsigned haltDepth;
std::vector<ulong> nodeids;*/
void followOneBranch();
void nextSymbol();
void nextEnforced();
};
#endif // _EnumerateQuery_H_