Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dynamicgraph::SignalPtr< T, Time > Class Template Reference

This is the only type of signal that can be plugged to, using the plug () command. More...

#include <fwd.hh>

Inheritance diagram for dynamicgraph::SignalPtr< T, Time >:
Inheritance graph
[legend]

Public Member Functions

virtual const T & access (const Time &t)
 
virtual const T & accessCopy () const
 
virtual void checkCompatibility ()
 
virtual std::ostream & display (std::ostream &os) const
 
virtual std::ostream & displayDependencies (std::ostream &os, const int depth=-1, std::string space="", std::string next1="", std::string next2="") const
 
SignalBase< Time > * getAbstractPtr ()
 
const SignalBase< Time > * getAbstractPtr () const
 
virtual SignalBase< Time > * getPluged () const
 
Signal< T, Time > * getPtr ()
 
const Signal< T, Time > * getPtr () const
 
virtual const Time & getTime () const
 
virtual bool isAbstractPluged () const
 
virtual bool isPlugged () const
 
virtual bool needUpdate (const Time &t) const
 
 operator bool () const
 
virtual const T & operator() (const Time &t)
 
Signal< T, Time > & operator* ()
 
const Signal< T, Time > & operator* () const
 
Signal< T, Time > * operator-> ()
 
const Signal< T, Time > * operator-> () const
 
virtual Signal< T, Time > & operator= (const T &t)
 
virtual void plug (SignalBase< Time > *ref)
 
virtual void setConstant (const T &t)
 
void setConstantDefault (const T &t)
 
virtual void setConstantDefault ()
 
virtual void setFunction (boost::function2< T &, T &, Time > t, typename Signal< T, Time >::Mutex *m=NULL)
 
virtual void setReference (const T *t, typename Signal< T, Time >::Mutex *m=NULL)
 
 SignalPtr (Signal< T, Time > *ptr, std::string name="")
 
virtual void unplug ()
 
void unsetConstantDefault ()
 
virtual std::ostream & writeGraph (std::ostream &os) const
 
virtual ~SignalPtr ()
 
- Public Member Functions inherited from dynamicgraph::Signal< T, Time >
virtual void get (std::ostream &value) const
 
virtual void getClassName (std::string &aClassName) const
 
bool getKeepReference ()
 
 operator const T & () const
 
virtual void recompute (const Time &t)
 
virtual void set (std::istringstream &value)
 
virtual void setFunction (boost::function2< T &, T &, Time > t, Mutex *mutexref=NULL)
 
void setKeepReference (const bool &b)
 
virtual void setReference (const T *t, Mutex *mutexref=NULL)
 
virtual void setReferenceNonConstant (T *t, Mutex *mutexref=NULL)
 
 Signal (std::string name)
 
virtual void trace (std::ostream &os) const
 
virtual ~Signal ()
 
- Public Member Functions inherited from dynamicgraph::SignalBase< Time >
 SignalBase (std::string name="")
 
virtual ~SignalBase ()
 
virtual void setTime (const Time &t)
 
const bool & getReady () const
 
const std::string & getName () const
 
void getClassName (std::string &aClassName) const
 
virtual void setPeriodTime (const Time &)
 
virtual Time getPeriodTime () const
 
virtual void addDependency (const SignalBase< Time > &)
 
virtual void removeDependency (const SignalBase< Time > &)
 
void setReady (const bool sready=true)
 
std::string shortName () const
 
virtual void ExtractNodeAndLocalNames (std::string &LocalName, std::string &NodeName) const
 

Protected Member Functions

virtual void addDependency ()
 
bool autoref () const
 
virtual void clearDependencies ()
 
virtual void removeDependency ()
 

Protected Attributes

SignalBase< Time > * abstractTransmitter
 
bool modeNoThrow
 
Signal< T, Time > * signalPtr
 
bool transmitAbstract
 
T * transmitAbstractData
 
- Protected Attributes inherited from dynamicgraph::Signal< T, Time >
bool copyInit
 
bool keepReference
 
MutexproviderMutex
 
SignalType signalType
 
T * Tcopy
 
Tcopy1
 
Tcopy2
 
boost::function2< T &, T &, Time > Tfunction
 
const T * Treference
 
T * TreferenceNonConst
 
- Protected Attributes inherited from dynamicgraph::SignalBase< Time >
std::string name
 
bool ready
 
Time signalTime
 

Additional Inherited Members

- Public Types inherited from dynamicgraph::Signal< T, Time >
typedef int * Mutex
 
typedef int * MutexError
 
- Protected Types inherited from dynamicgraph::Signal< T, Time >
enum  SignalType { CONSTANT, REFERENCE, REFERENCE_NON_CONST, FUNCTION }
 
- Static Protected Attributes inherited from dynamicgraph::Signal< T, Time >
static const bool KEEP_REFERENCE_DEFAULT = false
 
static const SignalType SIGNAL_TYPE_DEFAULT = CONSTANT
 

Detailed Description

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

This is the only type of signal that can be plugged to, using the plug () command.

In that sense, when plugged into, it acts as a "pointer" to the input signal, hence the name. Operator -> is also overloaded and can be used to access the pointed signal.

If the signal provided as a parameter of the plug operation cannot be casted in type T, but is compatible then the class holds a reference to an abstract object.

Definition at line 54 of file fwd.hh.

Constructor & Destructor Documentation

◆ SignalPtr()

template<class T, class Time>
dynamicgraph::SignalPtr< T, Time >::SignalPtr ( Signal< T, Time > *  ptr,
std::string  name = "" 
)
inline

Definition at line 41 of file signal-ptr.h.

◆ ~SignalPtr()

template<class T, class Time>
virtual dynamicgraph::SignalPtr< T, Time >::~SignalPtr ( )
inlinevirtual

Definition at line 48 of file signal-ptr.h.

Member Function Documentation

◆ access()

template<class T , class Time>
const T & dynamicgraph::SignalPtr< T, Time >::access ( const Time &  t)
virtual

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

Definition at line 145 of file signal-ptr.t.cpp.

◆ accessCopy()

template<class T , class Time >
const T & dynamicgraph::SignalPtr< T, Time >::accessCopy ( ) const
virtual

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

Definition at line 164 of file signal-ptr.t.cpp.

◆ addDependency()

template<class T, class Time>
virtual void dynamicgraph::SignalPtr< T, Time >::addDependency ( )
inlineprotectedvirtual

Definition at line 134 of file signal-ptr.h.

◆ autoref()

template<class T, class Time>
bool dynamicgraph::SignalPtr< T, Time >::autoref ( ) const
inlineprotected

Definition at line 38 of file signal-ptr.h.

◆ checkCompatibility()

template<class T , class Time >
void dynamicgraph::SignalPtr< T, Time >::checkCompatibility ( )
virtual

checkCompatibility is used to get the object contained in the signal. This used to verify if a dynamic cast is possible or not.

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

Definition at line 114 of file signal-ptr.t.cpp.

◆ clearDependencies()

template<class T, class Time>
virtual void dynamicgraph::SignalPtr< T, Time >::clearDependencies ( )
inlineprotectedvirtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 137 of file signal-ptr.h.

◆ display()

template<class T , class Time >
std::ostream & dynamicgraph::SignalPtr< T, Time >::display ( std::ostream &  os) const
virtual

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

Definition at line 191 of file signal-ptr.t.cpp.

◆ displayDependencies()

template<class T , class Time >
std::ostream & dynamicgraph::SignalPtr< T, Time >::displayDependencies ( std::ostream &  os,
const int  depth = -1,
std::string  space = "",
std::string  next1 = "",
std::string  next2 = "" 
) const
virtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 210 of file signal-ptr.t.cpp.

◆ getAbstractPtr() [1/2]

template<class T , class Time >
SignalBase< Time > * dynamicgraph::SignalPtr< T, Time >::getAbstractPtr ( )

Definition at line 46 of file signal-ptr.t.cpp.

◆ getAbstractPtr() [2/2]

template<class T , class Time >
const SignalBase< Time > * dynamicgraph::SignalPtr< T, Time >::getAbstractPtr ( ) const

Definition at line 59 of file signal-ptr.t.cpp.

◆ getPluged()

template<class T, class Time>
virtual SignalBase<Time>* dynamicgraph::SignalPtr< T, Time >::getPluged ( ) const
inlinevirtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 61 of file signal-ptr.h.

◆ getPtr() [1/2]

template<class T , class Time >
Signal< T, Time > * dynamicgraph::SignalPtr< T, Time >::getPtr ( )

Definition at line 21 of file signal-ptr.t.cpp.

◆ getPtr() [2/2]

template<class T , class Time >
const Signal< T, Time > * dynamicgraph::SignalPtr< T, Time >::getPtr ( ) const

Definition at line 32 of file signal-ptr.t.cpp.

◆ getTime()

template<class T , class Time >
const Time & dynamicgraph::SignalPtr< T, Time >::getTime ( ) const
virtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 132 of file signal-ptr.t.cpp.

◆ isAbstractPluged()

template<class T , class Time >
bool dynamicgraph::SignalPtr< T, Time >::isAbstractPluged ( ) const
virtual

Definition at line 16 of file signal-ptr.t.cpp.

◆ isPlugged()

template<class T, class Time>
virtual bool dynamicgraph::SignalPtr< T, Time >::isPlugged ( ) const
inlinevirtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 60 of file signal-ptr.h.

◆ needUpdate()

template<class T , class Time>
bool dynamicgraph::SignalPtr< T, Time >::needUpdate ( const Time &  t) const
virtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 124 of file signal-ptr.t.cpp.

◆ operator bool()

template<class T, class Time>
dynamicgraph::SignalPtr< T, Time >::operator bool ( ) const
inline

Definition at line 70 of file signal-ptr.h.

◆ operator()()

template<class T , class Time>
const T & dynamicgraph::SignalPtr< T, Time >::operator() ( const Time &  t)
virtual

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

Definition at line 140 of file signal-ptr.t.cpp.

◆ operator*() [1/2]

template<class T, class Time>
Signal<T, Time>& dynamicgraph::SignalPtr< T, Time >::operator* ( )
inline

Definition at line 68 of file signal-ptr.h.

◆ operator*() [2/2]

template<class T, class Time>
const Signal<T, Time>& dynamicgraph::SignalPtr< T, Time >::operator* ( ) const
inline

Definition at line 69 of file signal-ptr.h.

◆ operator->() [1/2]

template<class T, class Time>
Signal<T, Time>* dynamicgraph::SignalPtr< T, Time >::operator-> ( )
inline

Definition at line 66 of file signal-ptr.h.

◆ operator->() [2/2]

template<class T, class Time>
const Signal<T, Time>* dynamicgraph::SignalPtr< T, Time >::operator-> ( ) const
inline

Definition at line 67 of file signal-ptr.h.

◆ operator=()

template<class T, class Time>
virtual Signal<T, Time>& dynamicgraph::SignalPtr< T, Time >::operator= ( const T &  t)
inlinevirtual

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

Definition at line 121 of file signal-ptr.h.

◆ plug()

template<class T , class Time>
void dynamicgraph::SignalPtr< T, Time >::plug ( SignalBase< Time > *  ref)
virtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 72 of file signal-ptr.t.cpp.

◆ removeDependency()

template<class T, class Time>
virtual void dynamicgraph::SignalPtr< T, Time >::removeDependency ( )
inlineprotectedvirtual

Definition at line 136 of file signal-ptr.h.

◆ setConstant()

template<class T, class Time>
virtual void dynamicgraph::SignalPtr< T, Time >::setConstant ( const T &  t)
inlinevirtual

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

Definition at line 101 of file signal-ptr.h.

◆ setConstantDefault() [1/2]

template<class T, class Time>
void dynamicgraph::SignalPtr< T, Time >::setConstantDefault ( const T &  t)
inline

Definition at line 87 of file signal-ptr.h.

◆ setConstantDefault() [2/2]

template<class T, class Time>
virtual void dynamicgraph::SignalPtr< T, Time >::setConstantDefault ( )
inlinevirtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 91 of file signal-ptr.h.

◆ setFunction()

template<class T, class Time>
virtual void dynamicgraph::SignalPtr< T, Time >::setFunction ( boost::function2< T &, T &, Time >  t,
typename Signal< T, Time >::Mutex m = NULL 
)
inlinevirtual

Definition at line 110 of file signal-ptr.h.

◆ setReference()

template<class T, class Time>
virtual void dynamicgraph::SignalPtr< T, Time >::setReference ( const T *  t,
typename Signal< T, Time >::Mutex m = NULL 
)
inlinevirtual

Definition at line 105 of file signal-ptr.h.

◆ unplug()

template<class T, class Time>
virtual void dynamicgraph::SignalPtr< T, Time >::unplug ( )
inlinevirtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 58 of file signal-ptr.h.

◆ unsetConstantDefault()

template<class T, class Time>
void dynamicgraph::SignalPtr< T, Time >::unsetConstantDefault ( )
inline

Definition at line 92 of file signal-ptr.h.

◆ writeGraph()

template<class T , class Time >
std::ostream & dynamicgraph::SignalPtr< T, Time >::writeGraph ( std::ostream &  os) const
virtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 175 of file signal-ptr.t.cpp.

Member Data Documentation

◆ abstractTransmitter

template<class T, class Time>
SignalBase<Time>* dynamicgraph::SignalPtr< T, Time >::abstractTransmitter
protected

Definition at line 35 of file signal-ptr.h.

◆ modeNoThrow

template<class T, class Time>
bool dynamicgraph::SignalPtr< T, Time >::modeNoThrow
protected

Definition at line 33 of file signal-ptr.h.

◆ signalPtr

template<class T, class Time>
Signal<T, Time>* dynamicgraph::SignalPtr< T, Time >::signalPtr
protected

Definition at line 32 of file signal-ptr.h.

◆ transmitAbstract

template<class T, class Time>
bool dynamicgraph::SignalPtr< T, Time >::transmitAbstract
protected

Definition at line 34 of file signal-ptr.h.

◆ transmitAbstractData

template<class T, class Time>
T* dynamicgraph::SignalPtr< T, Time >::transmitAbstractData
protected

Definition at line 36 of file signal-ptr.h.


The documentation for this class was generated from the following files:


dynamic-graph
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Sun Jun 25 2023 02:06:03