Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic-graph-python
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
dynamic-graph-python
Commits
fb705aa1
Commit
fb705aa1
authored
4 years ago
by
Guilhem Saurel
Browse files
Options
Downloads
Patches
Plain Diff
format
parent
b67b31b9
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
include/dynamic-graph/python/signal.hh
+8
-15
8 additions, 15 deletions
include/dynamic-graph/python/signal.hh
with
8 additions
and
15 deletions
include/dynamic-graph/python/signal.hh
+
8
−
15
View file @
fb705aa1
...
@@ -19,15 +19,11 @@ auto exposeSignal(const std::string& name) {
...
@@ -19,15 +19,11 @@ auto exposeSignal(const std::string& name) {
namespace
bp
=
boost
::
python
;
namespace
bp
=
boost
::
python
;
typedef
Signal
<
T
,
Time
>
S_t
;
typedef
Signal
<
T
,
Time
>
S_t
;
bp
::
class_
<
S_t
,
bp
::
bases
<
SignalBase
<
Time
>
>
,
boost
::
noncopyable
>
obj
(
bp
::
class_
<
S_t
,
bp
::
bases
<
SignalBase
<
Time
>
>
,
boost
::
noncopyable
>
obj
(
name
.
c_str
(),
bp
::
init
<
std
::
string
>
());
name
.
c_str
(),
bp
::
init
<
std
::
string
>
());
obj
.
add_property
(
"value"
,
bp
::
make_function
(
&
S_t
::
accessCopy
,
bp
::
return_value_policy
<
bp
::
copy_const_reference
>
()),
obj
.
add_property
(
&
S_t
::
setConstant
,
// TODO check the setter
"value"
,
"the signal value.
\n
"
bp
::
make_function
(
&
S_t
::
accessCopy
,
"warning: for Eigen objects, sig.value[0] = 1. may not work)."
);
bp
::
return_value_policy
<
bp
::
copy_const_reference
>
()),
&
S_t
::
setConstant
,
// TODO check the setter
"the signal value.
\n
"
"warning: for Eigen objects, sig.value[0] = 1. may not work)."
);
return
obj
;
return
obj
;
}
}
...
@@ -36,8 +32,7 @@ auto exposeSignalWrapper(const std::string& name) {
...
@@ -36,8 +32,7 @@ auto exposeSignalWrapper(const std::string& name) {
namespace
bp
=
boost
::
python
;
namespace
bp
=
boost
::
python
;
typedef
SignalWrapper
<
T
,
Time
>
S_t
;
typedef
SignalWrapper
<
T
,
Time
>
S_t
;
bp
::
class_
<
S_t
,
bp
::
bases
<
Signal
<
T
,
Time
>
>
,
boost
::
noncopyable
>
obj
(
bp
::
class_
<
S_t
,
bp
::
bases
<
Signal
<
T
,
Time
>
>
,
boost
::
noncopyable
>
obj
(
name
.
c_str
(),
bp
::
no_init
);
name
.
c_str
(),
bp
::
no_init
);
return
obj
;
return
obj
;
}
}
...
@@ -46,8 +41,7 @@ auto exposeSignalPtr(const std::string& name) {
...
@@ -46,8 +41,7 @@ auto exposeSignalPtr(const std::string& name) {
namespace
bp
=
boost
::
python
;
namespace
bp
=
boost
::
python
;
typedef
SignalPtr
<
T
,
Time
>
S_t
;
typedef
SignalPtr
<
T
,
Time
>
S_t
;
bp
::
class_
<
S_t
,
bp
::
bases
<
Signal
<
T
,
Time
>
>
,
boost
::
noncopyable
>
obj
(
bp
::
class_
<
S_t
,
bp
::
bases
<
Signal
<
T
,
Time
>
>
,
boost
::
noncopyable
>
obj
(
name
.
c_str
(),
bp
::
no_init
);
name
.
c_str
(),
bp
::
no_init
);
return
obj
;
return
obj
;
}
}
...
@@ -56,8 +50,7 @@ auto exposeSignalTimeDependent(const std::string& name) {
...
@@ -56,8 +50,7 @@ auto exposeSignalTimeDependent(const std::string& name) {
namespace
bp
=
boost
::
python
;
namespace
bp
=
boost
::
python
;
typedef
SignalTimeDependent
<
T
,
Time
>
S_t
;
typedef
SignalTimeDependent
<
T
,
Time
>
S_t
;
bp
::
class_
<
S_t
,
bp
::
bases
<
Signal
<
T
,
Time
>
>
,
boost
::
noncopyable
>
obj
(
bp
::
class_
<
S_t
,
bp
::
bases
<
Signal
<
T
,
Time
>
>
,
boost
::
noncopyable
>
obj
(
name
.
c_str
(),
bp
::
no_init
);
name
.
c_str
(),
bp
::
no_init
);
return
obj
;
return
obj
;
}
}
...
...
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