FOSSology  4.4.0
Open Source License Compliance by Open Source Software
match.cc
1 /*
2  SPDX-FileCopyrightText: © 2021 Sarita Singh <saritasingh.0425@gmail.com>
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
6 
7 #include "match.hpp"
8 
15 Match::Match(string matchName, string type, unsigned startPosition, unsigned length)
16  : matchName(matchName),type(type), startPosition(startPosition), length(length) {}
17 
27 Match::Match(string matchName, int percentage, string licenseFullName,
28  string textUrl, unsigned startPosition, unsigned length)
29  : matchName(matchName), percentage(percentage),
30  licenseFullName(licenseFullName), textUrl(textUrl),
31  startPosition(startPosition), length(length) {}
32 
37 Match::Match(string matchName)
38  : matchName(matchName) {}
39 
44 
46 
50 const string Match::getMatchName() const { return matchName; }
51 
56 const string Match::getType() const { return type; }
61 int Match::getPercentage() const { return percentage; }
62 
67 const string Match::getLicenseFullName() const { return licenseFullName; }
68 
73 const string Match::getTextUrl() const { return textUrl; }
74 
79 unsigned Match::getStartPosition() const { return startPosition; }
80 
85 unsigned Match::getLength() const { return length; }
unsigned startPosition
Definition: match.hpp:66
string licenseFullName
Definition: match.hpp:56
~Match()
Definition: match.cc:43
unsigned getStartPosition() const
get the start byte of the matched text
Definition: match.cc:79
const string getMatchName() const
get the match name
Definition: match.cc:50
int percentage
Definition: match.hpp:51
string textUrl
Definition: match.hpp:61
const string getType() const
get the match type
Definition: match.cc:56
Match(string matchName, string type, unsigned startPosition, unsigned length)
constructor for match class intended to store copyright/holder information
Definition: match.cc:15
string matchName
Definition: match.hpp:41
const string getLicenseFullName() const
get the license full name
Definition: match.cc:67
int getPercentage() const
get the percent match
Definition: match.cc:61
const string getTextUrl() const
get the reference text URL
Definition: match.cc:73
unsigned length
Definition: match.hpp:71
unsigned getLength() const
get the match text length
Definition: match.cc:85