Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
eigenpy
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
Container Registry
Model registry
Operate
Environments
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
Stack Of Tasks
eigenpy
Commits
ae3081b2
Unverified
Commit
ae3081b2
authored
9 months ago
by
Justin Carpentier
Browse files
Options
Downloads
Patches
Plain Diff
core: add id helper
parent
ca81cf1a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-0
1 addition, 0 deletions
CMakeLists.txt
include/eigenpy/fwd.hpp
+1
-0
1 addition, 0 deletions
include/eigenpy/fwd.hpp
include/eigenpy/id.hpp
+33
-0
33 additions, 0 deletions
include/eigenpy/id.hpp
with
35 additions
and
0 deletions
CMakeLists.txt
+
1
−
0
View file @
ae3081b2
...
@@ -232,6 +232,7 @@ set(${PROJECT_NAME}_HEADERS
...
@@ -232,6 +232,7 @@ set(${PROJECT_NAME}_HEADERS
include/eigenpy/eigen-to-python.hpp
include/eigenpy/eigen-to-python.hpp
include/eigenpy/eigen-from-python.hpp
include/eigenpy/eigen-from-python.hpp
include/eigenpy/eigen-typedef.hpp
include/eigenpy/eigen-typedef.hpp
include/eigenpy/id.hpp
include/eigenpy/numpy-map.hpp
include/eigenpy/numpy-map.hpp
include/eigenpy/geometry.hpp
include/eigenpy/geometry.hpp
include/eigenpy/geometry-conversion.hpp
include/eigenpy/geometry-conversion.hpp
...
...
This diff is collapsed.
Click to expand it.
include/eigenpy/fwd.hpp
+
1
−
0
View file @
ae3081b2
...
@@ -200,5 +200,6 @@ struct has_operator_equal : internal::has_operator_equal_impl<T1, T2>::type {};
...
@@ -200,5 +200,6 @@ struct has_operator_equal : internal::has_operator_equal_impl<T1, T2>::type {};
}
// namespace eigenpy
}
// namespace eigenpy
#include
"eigenpy/alignment.hpp"
#include
"eigenpy/alignment.hpp"
#include
"eigenpy/id.hpp"
#endif // ifndef __eigenpy_fwd_hpp__
#endif // ifndef __eigenpy_fwd_hpp__
This diff is collapsed.
Click to expand it.
include/eigenpy/id.hpp
0 → 100644
+
33
−
0
View file @
ae3081b2
//
// Copyright (c) 2024 INRIA
//
#ifndef __eigenpy_id_hpp__
#define __eigenpy_id_hpp__
#include
<boost/python.hpp>
#include
<boost/cstdint.hpp>
namespace
eigenpy
{
///
/// \brief Add the Python method id to retrieving a unique id for a given object
/// exposed with Boost.Python
///
template
<
class
C
>
struct
IdVisitor
:
public
bp
::
def_visitor
<
IdVisitor
<
C
>
>
{
template
<
class
PyClass
>
void
visit
(
PyClass
&
cl
)
const
{
cl
.
def
(
"id"
,
&
id
,
bp
::
arg
(
"self"
),
"Returns the unique identity of an object.
\n
"
"For object held in C++, it corresponds to its memory address."
);
}
private
:
static
boost
::
int64_t
id
(
const
C
&
self
)
{
return
boost
::
int64_t
(
reinterpret_cast
<
const
void
*>
(
&
self
));
}
};
}
// namespace eigenpy
#endif // ifndef __eigenpy_id_hpp__
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