Commit 3490bfaf authored by Bergé's avatar Bergé

Another useless function find, maybe delete?

Try to make test for signal-ptr.h
Signed-off-by: default avatarBergé <corentin.berge@outlook.fr>
parent 3594c7ad
......@@ -61,11 +61,13 @@ namespace dynamicgraph
SignalBase<Time>* getAbstractPtr (); // throw
const SignalBase<Time>* getAbstractPtr () const; // throw
virtual void plug( SignalBase<Time>* ref );
virtual void unplug () { plug(NULL); }
//Useless function, didn't find any use of this one
/*virtual bool isPluged () const DYNAMIC_GRAPH_DEPRECATED {
/*virtual void unplug () { plug(NULL); }
virtual bool isPluged () const DYNAMIC_GRAPH_DEPRECATED {
return isPlugged ();
}*/
virtual bool isPlugged () const { return (NULL!=signalPtr); }
virtual SignalBase<Time>* getPluged () const { return signalPtr; }
virtual bool isAbstractPluged () const;
......
......@@ -11,13 +11,13 @@
#include <dynamic-graph/pool.h>
#include <iostream>
#define BOOST_TEST_MODULE signal_ptr
//#define BOOST_TEST_MODULE signal_ptr
#include <boost/test/unit_test.hpp>
#include <boost/test/output_test_stream.hpp>
/*#include <boost/test/unit_test.hpp>
#include <boost/test/output_test_stream.hpp>*/
using boost::test_tools::output_test_stream;
/*using boost::test_tools::output_test_stream;
typedef dynamicgraph::SignalPtr<double, int> sigDouble_t;
......@@ -26,7 +26,7 @@ class DummyClass
{
public:
std::string proname;
std::string proname;*/
......@@ -53,6 +53,10 @@ int main( void )
sigPtrARef.plug( & sigRef );
sigPtrBRef.plug( & sigPtrARef );
assert(sigRef.isPlugged()!=true);
sigPtrBRef.unplug();
assert(sigPtrBRef.isPlugged()!=true);
cout << "Sig = "; sigRef.get(cout); cout << std::endl;
cout << "SigPtrA = "; sigPtrARef.get(cout); cout << std::endl;
cout << "SigPtrB = "; sigPtrBRef.get(cout); cout << std::endl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment