forked from PolusAI/filepattern
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstringpattern.hpp
More file actions
31 lines (26 loc) · 923 Bytes
/
Copy pathstringpattern.hpp
File metadata and controls
31 lines (26 loc) · 923 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
#pragma once
#include "internal_pattern.hpp"
class StringPattern : public InternalPattern {
public:
/**
* @brief Constructor of StringPattern.
*
* @param file_name Path to text file
* @param file_pattern Pattern to match line of text file to
* @param suppress_warnings True will disable the warnings about using the old style of pattern. Default is false.
*/
StringPattern(const std::string& file_name, const std::string& file_pattern, bool suppress_warnings=false, bool sorted=true);
/**
* @brief Match lines of text file to the pattern.
*
*/
void matchFiles();
/**
* @brief Read file into main memory.
*
*/
void readFile();
private:
std::vector<std::string> files_; // Vector of filenames
std::string file_name_; // path to txt file
};