FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Match Class Reference

#include <match.hpp>

Collaboration diagram for Match:
Collaboration graph

Public Member Functions

 Match (string matchName, string type, unsigned startPosition, unsigned length)
 constructor for match class intended to store copyright/holder information More...
 
 Match (string matchName, int percentage, string licenseFullName, string textUrl, unsigned startPosition, unsigned length)
 constructor for match class intended to store license information More...
 
 Match (string matchName)
 constructor for match class intended to store No license information More...
 
 ~Match ()
 
const string getType () const
 get the match type More...
 
const string getMatchName () const
 get the match name More...
 
int getPercentage () const
 get the percent match More...
 
const string getLicenseFullName () const
 get the license full name More...
 
const string getTextUrl () const
 get the reference text URL More...
 
unsigned getStartPosition () const
 get the start byte of the matched text More...
 
unsigned getLength () const
 get the match text length More...
 

Public Attributes

const Licenselicense
 
union {
   DiffPoint *   full
 
   DiffResult *   diff
 
ptr
 
int type
 

Private Attributes

string matchName
 
string type
 
int percentage
 
string licenseFullName
 
string textUrl
 
unsigned startPosition
 
unsigned length
 

Detailed Description

class to store license/copyright information for an upload scanned with scancode-toolkit

Definition at line 20 of file match.h.

Constructor & Destructor Documentation

◆ Match() [1/3]

Match::Match ( string  matchName,
string  type,
unsigned  startPosition,
unsigned  length 
)

constructor for match class intended to store copyright/holder information

Parameters
matchNamecontent for copyright/holder
startPositionstart byte for matched_text
lengthno. of bytes matched

Definition at line 15 of file match.cc.

◆ Match() [2/3]

Match::Match ( string  matchName,
int  percentage,
string  licenseFullName,
string  textUrl,
unsigned  startPosition,
unsigned  length 
)

constructor for match class intended to store license information

Parameters
matchNamespdx key for license
percentagescore for license
licenseFullNamefull name of license
textUrlreference text url for license
startPositionstart byte for matched_text
lengthno. of bytes matched

Definition at line 27 of file match.cc.

◆ Match() [3/3]

Match::Match ( string  matchName)

constructor for match class intended to store No license information

Parameters
matchNamespdx key for license

Definition at line 37 of file match.cc.

◆ ~Match()

Match::~Match ( )

Default destructor for the match class

Definition at line 43 of file match.cc.

Member Function Documentation

◆ getLength()

unsigned Match::getLength ( ) const

get the match text length

Returns
unsigned integer no. of byte matched

Definition at line 85 of file match.cc.

◆ getLicenseFullName()

const string Match::getLicenseFullName ( ) const

get the license full name

Returns
string full name of matched license

Definition at line 67 of file match.cc.

◆ getMatchName()

const string Match::getMatchName ( ) const

get the match name

Returns
string matchName

Definition at line 50 of file match.cc.

◆ getPercentage()

int Match::getPercentage ( ) const

get the percent match

Returns
integer percentage

Definition at line 61 of file match.cc.

◆ getStartPosition()

unsigned Match::getStartPosition ( ) const

get the start byte of the matched text

Returns
unsigned integer start position(byte)

Definition at line 79 of file match.cc.

◆ getTextUrl()

const string Match::getTextUrl ( ) const

get the reference text URL

Returns
string reference text URL

Definition at line 73 of file match.cc.

◆ getType()

const string Match::getType ( ) const

get the match type

Returns
string type

Definition at line 56 of file match.cc.

Member Data Documentation

◆ length

unsigned Match::length
private

no of bytes matched

Definition at line 71 of file match.hpp.

◆ licenseFullName

string Match::licenseFullName
private

Full name of the licenses scanned

Definition at line 56 of file match.hpp.

◆ matchName

string Match::matchName
private

value/content matched spdx short name incase of licenses copyright content incase of copyright copyright holder

Definition at line 41 of file match.hpp.

◆ percentage

int Match::percentage
private

score of a rule to matched with the output licenes

Definition at line 51 of file match.hpp.

◆ startPosition

unsigned Match::startPosition
private

start byte of matched text

Definition at line 66 of file match.hpp.

◆ textUrl

string Match::textUrl
private

reference text URL

Definition at line 61 of file match.hpp.

◆ type

string Match::type
private

scan type

Definition at line 46 of file match.hpp.


The documentation for this class was generated from the following files: