9 #ifndef SOT_CORE_VARIADICOP_HH 10 #define SOT_CORE_VARIADICOP_HH 21 #include <dynamic-graph/entity.h> 28 #include <boost/function.hpp> 38 template <
typename Tin,
typename Tout,
typename Time>
46 SOUT(className +
"(" + name +
")::output(" + getTypeOutName() +
48 baseSigname(className +
"(" + name +
")::input(" + getTypeInName() +
64 std::ostringstream oss;
91 const std::size_t oldSize =
signalsIN.size();
96 for (std::size_t
i = oldSize;
i < (std::size_t)n; ++
i) {
98 std::ostringstream oss;
102 signal_t *
s =
new signal_t(NULL, oss.str());
113 throw std::out_of_range(
"Wrong signal index");
138 template <
typename Operator>
140 typename Operator::Tout, int> {
141 typedef typename Operator::Tin
Tin;
142 typedef typename Operator::Tout
Tout;
158 this->
SOUT.
setFunction(boost::bind(&Self::computeOperation,
this, _1, _2));
166 std::vector<const Tin *> in(this->
signalsIN.size());
167 for (std::size_t
i = 0;
i < this->
signalsIN.size(); ++
i) {
180 #endif // #ifndef SOT_CORE_VARIADICOP_HH void _removeSignal(const std::size_t i)
void setSignalNumber(const int &n)
VariadicAbstract< Tin, Tout, int > Base
void signalRegistration(const SignalArray< int > &signals)
std::vector< signal_t * > signalsIN
Signal< dynamicgraph::Matrix, int > sig("matrix")
VariadicOp(const std::string &name)
VariadicOp< Operator > Self
Tout & computeOperation(Tout &res, int time)
VariadicAbstract(const std::string &name, const std::string &className)
SignalPtr< Tin, int > signal_t
const std::string baseSigname
static std::string getTypeOutName(void)
virtual ~VariadicAbstract(void)
virtual void removeDependency(const SignalBase< Time > &signal)
void updateSignalNumber(int n)
virtual void addDependency(const SignalBase< Time > &signal)
SignalTimeDependent< Tout, int > SOUT
void _declareSignal(signal_t *s)
virtual ~VariadicOp(void)
std::string getDocString() const
std::size_t addSignal(const std::string &name)
signal_t * getSignalIn(int i)
virtual void updateSignalNumber(int n)
void signalDeregistration(const std::string &name)
virtual void setFunction(boost::function2< T &, T &, Time > t, Mutex *mutexref=NULL)
static const std::string CLASS_NAME
int getSignalNumber() const
static std::string getTypeInName(void)
virtual const std::string & getClassName() const