Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
dynamic-graph-python
Commits
a0363375
Commit
a0363375
authored
Jul 10, 2013
by
olivier stasse
Browse files
Exposes class name to the python side.
parent
45f00cff
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/dynamic-graph-py.cc
View file @
a0363375
...
...
@@ -33,6 +33,7 @@ namespace dynamicgraph {
extern
PyObject
*
getTime
(
PyObject
*
self
,
PyObject
*
args
);
extern
PyObject
*
setTime
(
PyObject
*
self
,
PyObject
*
args
);
extern
PyObject
*
getName
(
PyObject
*
self
,
PyObject
*
args
);
extern
PyObject
*
getClassName
(
PyObject
*
self
,
PyObject
*
args
);
extern
PyObject
*
display
(
PyObject
*
self
,
PyObject
*
args
);
extern
PyObject
*
displayDependencies
(
PyObject
*
self
,
PyObject
*
args
);
extern
PyObject
*
getValue
(
PyObject
*
self
,
PyObject
*
args
);
...
...
@@ -151,6 +152,8 @@ static PyMethodDef dynamicGraphMethods[] = {
METH_VARARGS
,
"Set time of a SignalBase"
},
{
"signal_base_get_name"
,
dynamicgraph
::
python
::
signalBase
::
getName
,
METH_VARARGS
,
"Get the name of a signal"
},
{
"signal_base_get_class_name"
,
dynamicgraph
::
python
::
signalBase
::
getClassName
,
METH_VARARGS
,
"Get the class name of a signal"
},
{
"signal_base_display"
,
dynamicgraph
::
python
::
signalBase
::
display
,
METH_VARARGS
,
"Print the signal in a string"
},
{
"signal_base_display_dependencies"
,
dynamicgraph
::
python
::
signalBase
::
displayDependencies
,
...
...
src/dynamic_graph/signal_base.py
View file @
a0363375
...
...
@@ -165,7 +165,7 @@ class SignalBase (object) :
raise
RuntimeError
(
"A pointer is required to create SignalBase object."
)
self
.
name
=
self
.
getName
()
self
.
className
=
self
.
getClassName
()
@
property
def
time
(
self
)
:
"""
...
...
@@ -222,6 +222,12 @@ class SignalBase (object) :
"""
return
wrap
.
signal_base_get_name
(
self
.
obj
)
def
getClassName
(
self
):
"""
Get class name of signal
"""
return
wrap
.
signal_base_get_class_name
(
self
.
obj
)
def
recompute
(
self
,
time
):
"""
Force signal to recompute the value at given time.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment