-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatternset.h
More file actions
37 lines (29 loc) · 791 Bytes
/
patternset.h
File metadata and controls
37 lines (29 loc) · 791 Bytes
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
#ifndef _PATTERNSET_H_
#define _PATTERNSET_H_
#include <vector>
#include "pattern.h"
class PatternSet
{
public:
PatternSet() {}
~PatternSet() { Clear(); }
bool Load(const char* filepath);
void Copy(const PatternSet& set);
void Clear();
void Add(const Pattern& pat);
void Add(const char* str);
void Intersect(const PatternSet& set);
void Print(void);
void Complement(const PatternSet& set);
void Complement(const Pattern& pat);
void Minimize(void);
bool HasOverlap() const;
bool Expand(const PatternSet& set);
Pattern* Lookup(unsigned int i) const { return mPatterns[i]; }
unsigned int Size() const { return mPatterns.size(); }
private:
void Intersect(const PatternSet& a, const PatternSet& b);
private:
std::vector<Pattern*> mPatterns;
};
#endif // _PATTERNSET_H_