6 #ifndef DYNAMIC_GRAPH_SIGNAL_PTR_H 7 #define DYNAMIC_GRAPH_SIGNAL_PTR_H 26 template <
class T,
class Time>
27 class SignalPtr :
public virtual Signal<T, Time> {
38 inline bool autoref()
const {
return signalPtr ==
this; }
45 transmitAbstract(false),
46 abstractTransmitter(NULL) {}
60 virtual bool isPlugged()
const {
return (NULL != signalPtr); }
63 virtual const Time &
getTime()
const;
70 inline operator bool()
const {
return isPlugged(); }
74 virtual std::ostream &
writeGraph(std::ostream &os)
const;
75 virtual std::ostream &
display(std::ostream &os)
const;
84 virtual const T &
access(
const Time &t);
127 const int depth = -1,
128 std::string space =
"",
129 std::string next1 =
"",
130 std::string next2 =
"")
const;
Signal< T, Time > * signalPtr
virtual void removeDependency()
virtual void setConstantDefault()
virtual bool isAbstractPluged() const
virtual void setFunction(boost::function2< T &, T &, Time > t, typename Signal< T, Time >::Mutex *m=NULL)
Signal< T, Time > * operator->()
virtual void setReference(const T *t, typename Signal< T, Time >::Mutex *m=NULL)
virtual void clearDependencies()
virtual void setConstant(const T &t)
virtual std::ostream & displayDependencies(std::ostream &os, const int depth=-1, std::string space="", std::string next1="", std::string next2="") const
Signals link I/O ports of entities. They can be constant-valued signals, or copy the value of a heap ...
const Signal< T, Time > & operator*() const
SignalPtr(Signal< T, Time > *ptr, std::string name="")
void setConstantDefault(const T &t)
virtual void setConstant(const T &t)
void unsetConstantDefault()
const std::string & getName() const
virtual std::ostream & writeGraph(std::ostream &os) const
virtual void plug(SignalBase< Time > *ref)
virtual const T & access(const Time &t)
The base class for signals: not to be used as such.
virtual void checkCompatibility()
virtual const Time & getTime() const
virtual const T & operator()(const Time &t)
virtual const T & accessCopy() const
SignalBase< Time > * getAbstractPtr()
const Signal< T, Time > * operator->() const
virtual void addDependency()
virtual bool isPlugged() const
virtual std::ostream & display(std::ostream &os) const
virtual Signal< T, Time > & operator=(const T &t)
virtual bool needUpdate(const Time &t) const
Signal< T, Time > * getPtr()
virtual SignalBase< Time > * getPluged() const
virtual void setFunction(boost::function2< T &, T &, Time > t, Mutex *mutexref=NULL)
Signal< T, Time > & operator*()
SignalBase< Time > * abstractTransmitter
virtual void setReference(const T *t, Mutex *mutexref=NULL)