Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scord
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eu
ADMIRE
scord
Commits
dbe7e798
Verified
Commit
dbe7e798
authored
2 years ago
by
Alberto Miranda
Browse files
Options
Downloads
Patches
Plain Diff
Add admire::node type to CXX API
parent
4ed3938c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!30
Resolve "Refactor library RPC implementation of `admire::transfer_dataset`"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/api/admire_types.hpp
+20
-0
20 additions, 0 deletions
src/common/api/admire_types.hpp
src/common/api/types.cpp
+39
-0
39 additions, 0 deletions
src/common/api/types.cpp
with
59 additions
and
0 deletions
src/common/api/admire_types.hpp
+
20
−
0
View file @
dbe7e798
...
...
@@ -59,6 +59,26 @@ private:
std
::
unique_ptr
<
impl
>
m_pimpl
;
};
struct
node
{
explicit
node
(
std
::
string
hostname
);
explicit
node
(
const
ADM_node_t
&
srv
);
node
(
const
node
&
)
noexcept
;
node
(
node
&&
)
noexcept
;
node
&
operator
=
(
const
node
&
)
noexcept
;
node
&
operator
=
(
node
&&
)
noexcept
;
~
node
();
std
::
string
hostname
()
const
;
private:
class
impl
;
std
::
unique_ptr
<
impl
>
m_pimpl
;
};
struct
job
{
explicit
job
(
job_id
id
);
...
...
This diff is collapsed.
Click to expand it.
src/common/api/types.cpp
+
39
−
0
View file @
dbe7e798
...
...
@@ -746,6 +746,45 @@ server::address() const {
return
m_pimpl
->
address
();
}
class
node
::
impl
{
public:
explicit
impl
(
std
::
string
hostname
)
:
m_hostname
(
std
::
move
(
hostname
))
{}
std
::
string
hostname
()
const
{
return
m_hostname
;
}
private
:
std
::
string
m_hostname
;
};
node
::
node
(
std
::
string
hostname
)
:
m_pimpl
(
std
::
make_unique
<
node
::
impl
>
(
std
::
move
(
hostname
)))
{}
node
::
node
(
const
ADM_node_t
&
node
)
:
node
::
node
(
node
->
n_hostname
)
{}
node
::
node
(
const
node
&
other
)
noexcept
:
m_pimpl
(
std
::
make_unique
<
impl
>
(
*
other
.
m_pimpl
))
{}
node
::
node
(
node
&&
)
noexcept
=
default
;
node
&
node
::
operator
=
(
const
node
&
other
)
noexcept
{
this
->
m_pimpl
=
std
::
make_unique
<
impl
>
(
*
other
.
m_pimpl
);
return
*
this
;
}
node
&
node
::
operator
=
(
node
&&
)
noexcept
=
default
;
node
::~
node
()
=
default
;
std
::
string
node
::
hostname
()
const
{
return
m_pimpl
->
hostname
();
}
class
job
::
impl
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment