Arkanjo 0.1
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
Comparation Struct Reference

Structure representing a code comparison result. More...

#include <parser.hpp>

Public Member Functions

 Comparation ()
 Default constructor.
 
 Comparation (string _path1, string _path2, double _sim)
 Parameterized constructor.
 
bool operator< (const Comparation &com) const
 Comparison operator for sorting.
 
bool operator== (const Comparation &com) const
 Equality comparison operator.
 
 Comparation ()
 
 Comparation (string _path1, string _path2, double _sim)
 
bool operator< (const Comparation &com) const
 
bool operator== (const Comparation &com) const
 

Public Attributes

string path1
 Path to first code file being compared.
 
string path2
 Path to second code file being compared.
 
double similarity
 Similarity score between the files (0-100)
 

Detailed Description

Structure representing a code comparison result.

Stores information about two code paths and their similarity score, with comparison operators for sorting and deduplication.

Definition at line 25 of file parser.hpp.

Constructor & Destructor Documentation

◆ Comparation() [1/4]

Comparation::Comparation ( )

Default constructor.

Definition at line 33 of file parser.hpp.

◆ Comparation() [2/4]

Comparation::Comparation ( string _path1,
string _path2,
double _sim )

Parameterized constructor.

Parameters
_path1First file path
_path2Second file path
_simSimilarity score

Definition at line 4 of file parser.cpp.

◆ Comparation() [3/4]

Comparation::Comparation ( )

Definition at line 56 of file parser.cpp.

◆ Comparation() [4/4]

Comparation::Comparation ( string _path1,
string _path2,
double _sim )

Definition at line 59 of file parser.cpp.

Member Function Documentation

◆ operator<() [1/2]

bool Comparation::operator< ( const Comparation & com) const

Comparison operator for sorting.

Parameters
comOther Comparation to compare with
Returns
bool True if this should be ordered before com

Definition at line 11 of file parser.cpp.

◆ operator<() [2/2]

bool Comparation::operator< ( const Comparation & com) const

Definition at line 66 of file parser.cpp.

◆ operator==() [1/2]

bool Comparation::operator== ( const Comparation & com) const

Equality comparison operator.

Parameters
comOther Comparation to compare with
Returns
bool True if comparations are identical

Definition at line 21 of file parser.cpp.

◆ operator==() [2/2]

bool Comparation::operator== ( const Comparation & com) const

Definition at line 76 of file parser.cpp.

Member Data Documentation

◆ path1

string Comparation::path1

Path to first code file being compared.

Definition at line 26 of file parser.hpp.

◆ path2

string Comparation::path2

Path to second code file being compared.

Definition at line 27 of file parser.hpp.

◆ similarity

double Comparation::similarity

Similarity score between the files (0-100)

Definition at line 28 of file parser.hpp.


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