FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
Provides a regex scanner using predefined regexs. More...
#include <regscan.hpp>
Public Member Functions | |
void | ScanString (const string &str, list< match > &results) const |
Scan a string using regex defined during initialization. More... | |
regexScanner (const string &type, const string &identity, int index=0) | |
Initialize RegexConfProvider and regex based on type and identity. More... | |
regexScanner (const string &type, std::istringstream &stream, int index=0) | |
Initialize RegexConfProvider and regex based on type and stream. More... | |
Public Member Functions inherited from scanner | |
virtual void | ScanFile (const string &fileName, list< match > &results) const |
Helper function to scan file. More... | |
Private Attributes | |
rx::regex | _reg |
const string | _type |
const string | _identity |
int | _index |
Provides a regex scanner using predefined regexs.
Definition at line 20 of file regscan.hpp.
regexScanner::regexScanner | ( | const string & | type, |
const string & | identity, | ||
int | index = 0 |
||
) |
Initialize RegexConfProvider and regex based on type and identity.
Definition at line 14 of file regscan.cc.
regexScanner::regexScanner | ( | const string & | type, |
std::istringstream & | stream, | ||
int | index = 0 |
||
) |
Initialize RegexConfProvider and regex based on type and stream.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 33 of file regscan.cc.
Scan a string using regex defined during initialization.
[in] | s | String to scan |
[out] | results | List of match results |
Implements scanner.
Definition at line 51 of file regscan.cc.
|
private |
Identity of regex
Definition at line 33 of file regscan.hpp.
|
private |
Index of regex
Definition at line 38 of file regscan.hpp.
|
private |
Regex to be used during scan
Definition at line 26 of file regscan.hpp.
|
private |
Type of regex to use
Definition at line 33 of file regscan.hpp.