Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Leander Singer
RobotAPI
Commits
c6f9cbe2
Commit
c6f9cbe2
authored
2 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Deprecate moved functions
parent
d9f5a648
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/libraries/armem/core/ice_conversions_templates.h
+19
-6
19 additions, 6 deletions
...RobotAPI/libraries/armem/core/ice_conversions_templates.h
with
19 additions
and
6 deletions
source/RobotAPI/libraries/armem/core/ice_conversions_templates.h
+
19
−
6
View file @
c6f9cbe2
#pragma once
#include
"Commit
.h
"
#include
<ArmarXCore/core/ice_conversions
.h
>
#include
<Ice/Handle.h>
#include
<map>
#include
<memory>
#include
<vector>
#define DEPRECATION_TO_ICE "This function is deprecated. Use armarx::toIce() from <ArmarXCore/core/ice_conversions.h> instead."
#define DEPRECATION_FROM_ICE "This function is deprecated. Use armarx::fromIce() from <ArmarXCore/core/ice_conversions.h> instead."
namespace
armarx
::
armem
...
...
@@ -14,11 +11,13 @@ namespace armarx::armem
// Same type
template
<
class
T
>
[[
deprecated
(
DEPRECATION_TO_ICE
)]]
void
toIce
(
T
&
ice
,
const
T
&
cpp
)
{
ice
=
cpp
;
}
template
<
class
T
>
[[
deprecated
(
DEPRECATION_FROM_ICE
)]]
void
fromIce
(
const
T
&
ice
,
T
&
cpp
)
{
cpp
=
ice
;
...
...
@@ -27,12 +26,14 @@ namespace armarx::armem
// Ice Handle
template
<
class
IceT
,
class
CppT
>
[[
deprecated
(
DEPRECATION_TO_ICE
)]]
void
toIce
(
::
IceInternal
::
Handle
<
IceT
>&
ice
,
const
CppT
&
cpp
)
{
ice
=
new
IceT
();
toIce
(
*
ice
,
cpp
);
}
template
<
class
IceT
,
class
CppT
>
[[
deprecated
(
DEPRECATION_FROM_ICE
)]]
void
fromIce
(
const
::
IceInternal
::
Handle
<
IceT
>&
ice
,
CppT
&
cpp
)
{
if
(
ice
)
...
...
@@ -44,6 +45,7 @@ namespace armarx::armem
// General return version
template
<
class
IceT
,
class
CppT
>
[[
deprecated
(
DEPRECATION_TO_ICE
)]]
IceT
toIce
(
const
CppT
&
cpp
)
{
IceT
ice
;
...
...
@@ -51,6 +53,7 @@ namespace armarx::armem
return
ice
;
}
template
<
class
CppT
,
class
IceT
>
[[
deprecated
(
DEPRECATION_FROM_ICE
)]]
CppT
fromIce
(
const
IceT
&
ice
)
{
CppT
cpp
;
...
...
@@ -61,6 +64,7 @@ namespace armarx::armem
// std::unique_ptr
template
<
class
IceT
,
class
CppT
>
[[
deprecated
(
DEPRECATION_TO_ICE
)]]
void
toIce
(
IceT
&
ice
,
const
std
::
unique_ptr
<
CppT
>&
cppPointer
)
{
if
(
cppPointer
)
...
...
@@ -69,6 +73,7 @@ namespace armarx::armem
}
}
template
<
class
IceT
,
class
CppT
>
[[
deprecated
(
DEPRECATION_FROM_ICE
)]]
void
fromIce
(
const
IceT
&
ice
,
std
::
unique_ptr
<
CppT
>&
cppPointer
)
{
cppPointer
=
std
::
make_unique
<
CppT
>
();
...
...
@@ -79,6 +84,7 @@ namespace armarx::armem
// Ice Handle <-> std::unique_ptr
template
<
class
IceT
,
class
CppT
>
[[
deprecated
(
DEPRECATION_TO_ICE
)]]
void
toIce
(
::
IceInternal
::
Handle
<
IceT
>&
ice
,
const
std
::
unique_ptr
<
CppT
>&
cppPointer
)
{
if
(
cppPointer
)
...
...
@@ -92,6 +98,7 @@ namespace armarx::armem
}
}
template
<
class
IceT
,
class
CppT
>
[[
deprecated
(
DEPRECATION_FROM_ICE
)]]
void
fromIce
(
const
::
IceInternal
::
Handle
<
IceT
>&
ice
,
std
::
unique_ptr
<
CppT
>&
cppPointer
)
{
if
(
ice
)
...
...
@@ -109,6 +116,7 @@ namespace armarx::armem
// std::vector
template
<
class
IceT
,
class
CppT
>
[[
deprecated
(
DEPRECATION_TO_ICE
)]]
void
toIce
(
std
::
vector
<
IceT
>&
ices
,
const
std
::
vector
<
CppT
>&
cpps
)
{
ices
.
clear
();
...
...
@@ -119,6 +127,7 @@ namespace armarx::armem
}
}
template
<
class
IceT
,
class
CppT
>
[[
deprecated
(
DEPRECATION_FROM_ICE
)]]
void
fromIce
(
const
std
::
vector
<
IceT
>&
ices
,
std
::
vector
<
CppT
>&
cpps
)
{
cpps
.
clear
();
...
...
@@ -130,6 +139,7 @@ namespace armarx::armem
}
template
<
class
IceT
,
class
CppT
>
[[
deprecated
(
DEPRECATION_TO_ICE
)]]
std
::
vector
<
IceT
>
toIce
(
const
std
::
vector
<
CppT
>&
cpps
)
{
std
::
vector
<
IceT
>
ices
;
...
...
@@ -141,6 +151,7 @@ namespace armarx::armem
// std::map
template
<
class
IceKeyT
,
class
IceValueT
,
class
CppKeyT
,
class
CppValueT
>
[[
deprecated
(
DEPRECATION_TO_ICE
)]]
void
toIce
(
std
::
map
<
IceKeyT
,
IceValueT
>&
iceMap
,
const
std
::
map
<
CppKeyT
,
CppValueT
>&
cppMap
)
{
...
...
@@ -151,6 +162,7 @@ namespace armarx::armem
}
}
template
<
class
IceKeyT
,
class
IceValueT
,
class
CppKeyT
,
class
CppValueT
>
[[
deprecated
(
DEPRECATION_FROM_ICE
)]]
void
fromIce
(
const
std
::
map
<
IceKeyT
,
IceValueT
>&
iceMap
,
std
::
map
<
CppKeyT
,
CppValueT
>&
cppMap
)
{
...
...
@@ -162,6 +174,7 @@ namespace armarx::armem
}
template
<
class
IceKeyT
,
class
IceValueT
,
class
CppKeyT
,
class
CppValueT
>
[[
deprecated
(
DEPRECATION_TO_ICE
)]]
std
::
map
<
IceKeyT
,
IceValueT
>
toIce
(
const
std
::
map
<
CppKeyT
,
CppValueT
>&
cppMap
)
{
std
::
map
<
IceKeyT
,
IceValueT
>
iceMap
;
...
...
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