FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
git2cpp/src/wrapper/branch_wrapper.hpp at main · QuantStack/git2cpp · GitHub
QuantStack
git2cpp
Repository navigation
Code
Issues
6
(6)
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
git2cpp
/
src
/
wrapper
/
branch_wrapper.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
57 lines (36 loc) · 1.23 KB
Breadcrumbs
git2cpp
/
src
/
wrapper
/
branch_wrapper.hpp
Copy path
File metadata and controls
57 lines (36 loc) · 1.23 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#
pragma
once
#
include
<
optional
>
#
include
<
string_view
>
#
include
<
git2.h
>
#
include
"
../wrapper/wrapper_base.hpp
"
class
commit_wrapper
;
class
branch_wrapper
:
public
wrapper_base
<git_reference>
{
public:
using
base_type = wrapper_base<git_reference>;
~branch_wrapper
();
branch_wrapper
(branch_wrapper&&) =
default
;
branch_wrapper&
operator
=(branch_wrapper&&) =
default
;
std::string_view
name
()
const
;
std::string_view
reference_name
()
const
;
private:
explicit
branch_wrapper
(git_reference* ref);
friend
class
repository_wrapper
;
friend
class
branch_iterator
;
};
void
delete_branch
(branch_wrapper&& br);
//
Rust / Python-like iterator instead of regular C++ iterator,
//
because of the libgit2 API. Implementing the postfix increment
//
operator of an input iterator would be overcomplicated.
class
branch_iterator
:
public
wrapper_base
<git_branch_iterator>
{
public:
using
base_type = wrapper_base<git_branch_iterator>;
~branch_iterator
();
branch_iterator
(branch_iterator&&) =
default
;
branch_iterator&
operator
=(branch_iterator&&) =
default
;
std::optional<branch_wrapper>
next
();
private:
explicit
branch_iterator
(git_branch_iterator* iter);
friend
class
repository_wrapper
;
};
Back
|
FazBrowse Home
|
New Git URL