10 #ifndef SOT_CORE_UNARYOP_HH 11 #define SOT_CORE_UNARYOP_HH 18 #include <dynamic-graph/all-signals.h> 19 #include <dynamic-graph/entity.h> 28 template <
typename Operator>
class UnaryOp :
public Entity {
30 typedef typename Operator::Tin Tin;
31 typedef typename Operator::Tout Tout;
35 static std::string
getTypeInName(
void) {
return Operator::nameTypeIn(); }
44 : Entity(name),
SIN(NULL, Self::CLASS_NAME +
"(" + name +
")::input(" +
47 Self::CLASS_NAME +
"(" + name +
")::output(" +
49 signalRegistration(
SIN <<
SOUT);
50 op.addSpecificCommands(*
this, commandMap);
56 SignalPtr<Tin, int>
SIN;
57 SignalTimeDependent<Tout, int>
SOUT;
61 const Tin &x1 =
SIN(time);
71 #endif // #ifndef SOT_CORE_UNARYOP_HH virtual ~UnaryOp(void)
Definition: unary-op.hh:53
UnaryOp(const std::string &name)
Definition: unary-op.hh:43
static std::string getTypeOutName(void)
Definition: unary-op.hh:36
SignalPtr< Tin, int > SIN
Definition: unary-op.hh:53
static std::string getTypeInName(void)
Definition: unary-op.hh:35
static const std::string CLASS_NAME
Definition: unary-op.hh:37
Definition: unary-op.hh:28
virtual const std::string & getClassName() const
Definition: unary-op.hh:39
std::string getDocString() const
Definition: unary-op.hh:41
Definition: abstract-sot-external-interface.hh:17
Tout & computeOperation(Tout &res, int time)
Definition: unary-op.hh:60
SignalTimeDependent< Tout, int > SOUT
Definition: unary-op.hh:57