diff --git a/include/dynamic-graph/signal-base.h b/include/dynamic-graph/signal-base.h index ab379d74ebe5aa209096681127fd13dc5c9ac010..950cd0c7a0d5bc064978a7b27dc7b3475bd4d38e 100644 --- a/include/dynamic-graph/signal-base.h +++ b/include/dynamic-graph/signal-base.h @@ -152,7 +152,7 @@ namespace dynamicgraph "(while trying to unplug %s).",this->getName ().c_str ()); } - virtual bool isPluged () const + virtual bool isPlugged () const { return false; } diff --git a/include/dynamic-graph/signal-ptr.h b/include/dynamic-graph/signal-ptr.h index 4c6909c65d84c38db93c45a190ff51fe268812a0..8547ee38ccf438270a819d4abe1a222ea936d419 100644 --- a/include/dynamic-graph/signal-ptr.h +++ b/include/dynamic-graph/signal-ptr.h @@ -73,7 +73,12 @@ namespace dynamicgraph const SignalBase<Time>* getAbstractPtr () const; // throw virtual void plug( SignalBase<Time>* ref ); virtual void unplug () { plug(NULL); } - virtual bool isPluged () const { return (NULL!=signalPtr); } + virtual bool isPluged () const { + std::cerr << "The method isPluged is deprecated."; + std::cerr << " Please use isPlugged instead" << std::endl; + return isPlugged (); + } + virtual bool isPlugged () const { return (NULL!=signalPtr); } virtual SignalBase<Time>* getPluged () const { return signalPtr; } virtual bool isAbstractPluged () const; virtual const Time& getTime () const; @@ -83,7 +88,7 @@ namespace dynamicgraph inline const Signal<T,Time>* operator-> () const { return getPtr (); } inline Signal<T,Time>& operator* () { return *getPtr (); } inline const Signal<T,Time>& operator* () const { return *getPtr (); } - inline operator bool () const { return isPluged (); } + inline operator bool () const { return isPlugged (); } public: /* --- INHERITANCE --- */ diff --git a/include/dynamic-graph/signal-ptr.t.cpp b/include/dynamic-graph/signal-ptr.t.cpp index 5f9da340275ea65d854605e5ed19ae2716b5faa0..6862e7ee91a18d888c6634c2409b3f625e16a08d 100644 --- a/include/dynamic-graph/signal-ptr.t.cpp +++ b/include/dynamic-graph/signal-ptr.t.cpp @@ -38,7 +38,7 @@ namespace dynamicgraph getPtr () { dgTDEBUGIN(25); - if(! isPluged () ) + if(! isPlugged () ) DG_THROW ExceptionSignal( ExceptionSignal::NOT_INITIALIZED, "In SignalPtr: SIN ptr not set.", " (in signal <%s>)",getName ().c_str ()); @@ -50,10 +50,10 @@ namespace dynamicgraph const Signal<T,Time>* SignalPtr<T,Time>:: getPtr () const { - dgTDEBUGIN(25) << SignalBase<Time>::name <<"("<< isPluged () <<")" + dgTDEBUGIN(25) << SignalBase<Time>::name <<"("<< isPlugged () <<")" << this << "->"<<signalPtr <<std::endl; dgTDEBUGIN(25); - if(! isPluged () ) + if(! isPlugged () ) { DG_THROW ExceptionSignal( ExceptionSignal::NOT_INITIALIZED, "In SignalPtr: SIN ptr not set.", " (in signal <%s>)",getName ().c_str ()); } @@ -142,7 +142,7 @@ namespace dynamicgraph void SignalPtr<T,Time>:: checkCompatibility () { - if( isPluged()&&(!autoref ()) ) + if( isPlugged()&&(!autoref ()) ) { getPtr()->checkCompatibility(); } else if( isAbstractPluged()&&(!autoref ()) ) { abstractTransmitter->checkCompatibility(); } @@ -177,7 +177,7 @@ namespace dynamicgraph access( const Time & t ) { dgTDEBUGIN(15); - if( modeNoThrow&&(! isPluged ())&&Signal<T,Time>::copyInit ) + if( modeNoThrow&&(! isPlugged ())&&Signal<T,Time>::copyInit ) { dgTDEBUGOUT(15); return Signal<T,Time>::accessCopy (); @@ -203,7 +203,7 @@ namespace dynamicgraph const T& SignalPtr<T,Time>:: accessCopy () const { - if( modeNoThrow&&(! isPluged ())&&Signal<T,Time>::copyInit ) + if( modeNoThrow&&(! isPlugged ())&&Signal<T,Time>::copyInit ) return Signal<T,Time>::accessCopy (); else if( autoref () ) return Signal<T,Time>::accessCopy (); else if( transmitAbstract ) return *transmitAbstractData; @@ -233,7 +233,7 @@ namespace dynamicgraph std::ostream& SignalPtr<T,Time>:: display( std::ostream& os ) const { - dgTDEBUGIN(25) << SignalBase<Time>::name << this << "||" << isPluged () << "||"<<signalPtr; + dgTDEBUGIN(25) << SignalBase<Time>::name << this << "||" << isPlugged () << "||"<<signalPtr; { Signal<T,Time>::display(os); } if( (isAbstractPluged ())&&(!autoref ()) )