FOSSology
3.2.0rc1
Open Source License Compliance by Open Source Software
|
Provide regex using conf file. More...
#include <regexConfProvider.hpp>
Public Member Functions | |
RegexConfProvider (const bool isVerbosityDebug=false) | |
Constructor to set verbosity level. | |
void | maybeLoad (const std::string &identity) |
Check if identity already loaded in RegexMap, if not load them. More... | |
void | maybeLoad (const std::string &identity, std::istringstream &stream) |
const char * | getRegexValue (const std::string &name, const std::string &key) |
Get the regex as string from the RegexMap. More... | |
Private Member Functions | |
bool | getRegexConfStream (const std::string &identity, std::ifstream &stream) |
Get file stream for regex conf file. More... | |
Private Attributes | |
bool | _isVerbosityDebug |
Static Private Attributes | |
static std::map< std::string, RegexMap > | _regexMapMap = {} |
Map to store RegexMap with a string key. More... | |
Provide regex using conf file.
Definition at line 37 of file regexConfProvider.hpp.
|
private |
Get file stream for regex conf file.
[in] | identity | Name of file to be found (without ".conf" extension) |
[out] | stream | Input file stream created from identity |
Definition at line 93 of file regexConfProvider.cc.
const char * RegexConfProvider::getRegexValue | ( | const std::string & | name, |
const std::string & | key | ||
) |
Get the regex as string from the RegexMap.
identity | Identity from which the map was loaded |
key | Key of the regex value required |
Definition at line 168 of file regexConfProvider.cc.
void RegexConfProvider::maybeLoad | ( | const std::string & | identity | ) |
Check if identity already loaded in RegexMap, if not load them.
identity | Identity to be matched |
Definition at line 110 of file regexConfProvider.cc.
|
private |
True to print debug messages
Definition at line 52 of file regexConfProvider.hpp.
|
staticprivate |
Map to store RegexMap with a string key.
Where key is the identity file name from which the RegexMap is loaded and value is the RegexMap from the identity file
Definition at line 50 of file regexConfProvider.hpp.