dynamicgraph::SignalTimeDependent< T, Time > Class Template Reference

A type of signal that enforces a time dependency between other signals, making sure its inputs are up to date on access, using a incrementing time tick as reference. It works this way: for a given SignalTimeDependent S, the user manually adds dependent signals through the use of the addDependency function. On access (calling the signal S operator () or access(Time) function), if the dependent signals are not up-to-date, i.e. if their [last update] time is less than the current time, their value will be access ()'ed to bring them up-to-date. Thus, the value of dependent signals can be accessed quickly and repeatedly through the accessCopy () function. More...

#include <dynamic-graph/signal-time-dependent.h>

Inheritance diagram for dynamicgraph::SignalTimeDependent< T, Time >:
[legend]
Collaboration diagram for dynamicgraph::SignalTimeDependent< T, Time >:
[legend]

List of all members.

Public Member Functions

 SignalTimeDependent (std::string name="")
 SignalTimeDependent (const SignalArray_const< Time > &arr, std::string name="")
 SignalTimeDependent (boost::function2< T &, T &, Time > t, const SignalArray_const< Time > &sig, std::string name="")
virtual ~SignalTimeDependent ()
const T & operator() (const Time &t1)
const T & access (const Time &t1)
virtual void addDependency (const SignalBase< Time > &signal)
virtual void removeDependency (const SignalBase< Time > &signal)
virtual void clearDependencies ()
std::ostream & writeGraph (std::ostream &os) const
std::ostream & displayDependencies (std::ostream &os, const int depth=-1, std::string space="", std::string next1="", std::string next2="") const
virtual bool needUpdate (const Time &t) const
virtual void setPeriodTime (const Time &p)
virtual Time getPeriodTime () const

Detailed Description

template<class T, class Time>
class dynamicgraph::SignalTimeDependent< T, Time >

A type of signal that enforces a time dependency between other signals, making sure its inputs are up to date on access, using a incrementing time tick as reference. It works this way: for a given SignalTimeDependent S, the user manually adds dependent signals through the use of the addDependency function. On access (calling the signal S operator () or access(Time) function), if the dependent signals are not up-to-date, i.e. if their [last update] time is less than the current time, their value will be access ()'ed to bring them up-to-date. Thus, the value of dependent signals can be accessed quickly and repeatedly through the accessCopy () function.


Constructor & Destructor Documentation

template<class T , class Time >
dynamicgraph::SignalTimeDependent< T, Time >::SignalTimeDependent ( std::string  name = "")
template<class T , class Time>
dynamicgraph::SignalTimeDependent< T, Time >::SignalTimeDependent ( const SignalArray_const< Time > &  arr,
std::string  name = "" 
)
template<class T, class Time>
dynamicgraph::SignalTimeDependent< T, Time >::SignalTimeDependent ( boost::function2< T &, T &, Time >  t,
const SignalArray_const< Time > &  sig,
std::string  name = "" 
)
template<class T, class Time>
virtual dynamicgraph::SignalTimeDependent< T, Time >::~SignalTimeDependent ( ) [inline, virtual]

Member Function Documentation

template<class T , class Time>
void dynamicgraph::SignalTimeDependent< T, Time >::addDependency ( const SignalBase< Time > &  signal) [virtual]
template<class T , class Time >
void dynamicgraph::SignalTimeDependent< T, Time >::clearDependencies ( ) [virtual]
template<class T, class Time>
std::ostream& dynamicgraph::SignalTimeDependent< T, Time >::displayDependencies ( std::ostream &  os,
const int  depth = -1,
std::string  space = "",
std::string  next1 = "",
std::string  next2 = "" 
) const [inline]
template<class T , class Time >
Time dynamicgraph::SignalTimeDependent< T, Time >::getPeriodTime ( ) const [virtual]
template<class T , class Time>
bool dynamicgraph::SignalTimeDependent< T, Time >::needUpdate ( const Time &  t) const [virtual]
template<class T, class Time>
const T& dynamicgraph::SignalTimeDependent< T, Time >::operator() ( const Time &  t1) [inline, virtual]

Reimplemented from dynamicgraph::Signal< T, Time >.

template<class T , class Time>
void dynamicgraph::SignalTimeDependent< T, Time >::removeDependency ( const SignalBase< Time > &  signal) [virtual]
template<class T , class Time>
void dynamicgraph::SignalTimeDependent< T, Time >::setPeriodTime ( const Time &  p) [virtual]
template<class T, class Time>
std::ostream& dynamicgraph::SignalTimeDependent< T, Time >::writeGraph ( std::ostream &  os) const [inline, virtual]