16 #include <boost/bind.hpp> 17 #include <boost/function.hpp> 20 #ifdef HAVE_LIBBOOST_THREAD 21 #include <boost/thread.hpp> 40 template <
class T,
class Time>
41 class Signal :
public SignalBase<Time> {
59 #ifdef HAVE_LIBBOOST_THREAD 60 typedef boost::try_mutex
Mutex;
80 virtual void get(std::ostream &value)
const;
81 virtual void set(std::istringstream &value);
82 virtual void trace(std::ostream &os)
const;
86 virtual void setReference(
const T *t, Mutex *mutexref = NULL);
88 virtual void setFunction(boost::function2<T &, T &, Time> t,
89 Mutex *mutexref = NULL);
95 virtual const T &
access(
const Time &t);
99 virtual std::ostream &
display(std::ostream &os)
const;
106 aClassName =
typeid(
this).
name();
125 #endif // #ifndef __SIGNAL_HH virtual void getClassName(std::string &aClassName) const
virtual std::ostream & display(std::ostream &os) const
boost::function2< T &, T &, Time > Tfunction
static const bool KEEP_REFERENCE_DEFAULT
virtual void setConstant(const T &t)
Signals link I/O ports of entities. They can be constant-valued signals, or copy the value of a heap ...
virtual void checkCompatibility()
The base class for signals: not to be used as such.
void setKeepReference(const bool &b)
virtual void recompute(const Time &t)
virtual void setReferenceNonConstant(T *t, Mutex *mutexref=NULL)
const T & setTcopy(const T &t)
static const SignalType SIGNAL_TYPE_DEFAULT
virtual Signal< T, Time > & operator=(const T &t)
virtual const T & operator()(const Time &t)
virtual const T & accessCopy() const
virtual void trace(std::ostream &os) const
virtual void setFunction(boost::function2< T &, T &, Time > t, Mutex *mutexref=NULL)
virtual const T & access(const Time &t)
virtual void setReference(const T *t, Mutex *mutexref=NULL)