source: icGREP/icgrep-devel/icgrep/grep_engine.h @ 5423

Last change on this file since 5423 was 5419, checked in by nmedfort, 2 years ago

Bug fixes for 32-bit systems

File size: 1.3 KB
Line 
1/*
2 *  Copyright (c) 2016 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6#ifndef DO_GREP_H
7#define DO_GREP_H
8#include <grep_type.h>  // for GrepType, GrepType::Normal
9#include <string>       // for string
10#include <vector>
11namespace llvm { class ExecutionEngine; }
12namespace llvm { class Module; }
13namespace re { class CC; }
14namespace re { class RE; }
15
16class GrepEngine {
17public:
18
19    GrepEngine();
20
21    void grepCodeGen(std::string moduleName, std::vector<re::RE *> REs, bool CountOnly, bool UTF_16, GrepSource grepSource, GrepType grepType = GrepType::Normal);
22
23    uint64_t doGrep(const std::string & fileName, const uint32_t fileIdx) const;
24
25    uint64_t doGrep(const int32_t fileDescriptor, const uint32_t fileIdx) const;
26   
27    void doGrep(const char * buffer, const uint64_t length, const uint32_t fileIdx) const;
28
29    re::CC * grepCodepoints();
30
31    const std::vector<std::string> & grepPropertyValues(const std::string & propertyName);
32   
33private:
34   
35    void * mGrepFunction;
36};
37
38
39re::CC * getParsedCodePointSet();
40void setParsedCodePointSet();
41
42void setParsedPropertyValues();
43
44void initFileResult(std::vector<std::string> filenames);
45void PrintResult(bool CountOnly, std::vector<size_t> & total_CountOnly);
46
47#endif
Note: See TracBrowser for help on using the repository browser.