FOSSology  4.4.0
Open Source License Compliance by Open Source Software
scanners.hpp File Reference

Utilities to help scanners. More...

#include <fstream>
#include <string>
#include <list>
Include dependency graph for scanners.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  match
 Store the results of a regex match. More...
 
class  scanner
 Abstract class to provide interface to scanners. More...
 

Functions

bool ReadFileToString (const string &fileName, string &out)
 Utility: read file to string from scanners.h. More...
 
bool operator== (const match &m1, const match &m2)
 Compare two regex match. More...
 
bool operator!= (const match &m1, const match &m2)
 Compare two regex match. More...
 

Detailed Description

Utilities to help scanners.

Definition in file scanners.hpp.

Function Documentation

◆ operator!=()

bool operator!= ( const match m1,
const match m2 
)

Compare two regex match.

Returns
True if they are not equal, false otherwise
See also
operator==(const match& m1, const match& m2)

Definition at line 44 of file scanners.cc.

◆ operator==()

bool operator== ( const match m1,
const match m2 
)

Compare two regex match.

Returns
True if they are equal, false otherwise

Definition at line 34 of file scanners.cc.

◆ ReadFileToString()

bool ReadFileToString ( const string &  fileName,
string &  out 
)

Utility: read file to string from scanners.h.

Parameters
[in]fileNamePath of file to read
[out]outString created from file
Returns
True on success, fail otherwise
Todo:
There should be a maximum string size

Definition at line 21 of file scanners.cc.