ArKanjo
0.5.1
A tool for find code duplicated functions in codebases
text_diff.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <git2.h>
4
5
#include <string_view>
6
#include <iostream>
7
8
struct
DiffResult
{
9
int
error
;
10
bool
has_difference
;
11
};
12
13
class
GitTextDiff
{
14
public
:
15
static
DiffResult
compare
(
16
std::string_view first_text,
17
std::string_view first_name,
18
std::string_view second_text,
19
std::string_view second_name,
20
std::ostream& output
21
);
22
23
private
:
24
static
int
print_diff_file(
const
git_diff_delta* delta,
float
,
void
* payload);
25
26
static
int
print_diff_hunk(
const
git_diff_delta*,
const
git_diff_hunk* hunk,
void
* payload);
27
28
static
int
print_diff_line(
29
const
git_diff_delta*
/*delta*/
,
30
const
git_diff_hunk*
/*hunk*/
,
31
const
git_diff_line* line,
32
void
* payload
33
);
34
};
GitTextDiff
Definition:
text_diff.hpp:13
GitTextDiff::compare
static DiffResult compare(std::string_view first_text, std::string_view first_name, std::string_view second_text, std::string_view second_name, std::ostream &output)
Definition:
text_diff.cpp:89
DiffResult
Definition:
text_diff.hpp:8
DiffResult::has_difference
bool has_difference
Definition:
text_diff.hpp:10
DiffResult::error
int error
Definition:
text_diff.hpp:9
include
arkanjo
git
text_diff.hpp
Generated by
1.9.4