Skip to content
Snippets Groups Projects
Commit 7211d629 authored by florent's avatar florent
Browse files

Handle entity type as input to signal_base.value setter.

       * src/dynamic_graph/signal_base.py.
parent 821dcee5
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
Author: Florent Lamiraux
"""
import wrap
import entity
import re
def stringToTuple (vector) :
......@@ -92,11 +93,12 @@ def matrixToString(matrix) :
def objectToString(obj) :
"""
Transform an object to a string. Object is either
- an entity (more precisely a sub-class named Feature)
- a matrix
- a vector or
- a floating point number,
- an integer,
- a boolean,
- a vector or
- a matrix
"""
if (isinstance(obj, tuple)) :
# matrix or vector
......@@ -109,6 +111,8 @@ def objectToString(obj) :
else :
#vector
return tupleToString(obj)
elif isinstance(obj, entity.Entity) :
return obj.name
else :
return str(obj)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment