FOSSology
4.4.0
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 26 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 82 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 157 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 99 of file regexConfProvider.cc.
|
private |
True to print debug messages
Definition at line 41 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 39 of file regexConfProvider.hpp.