Commit 43229ec0 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[STYLE]

parent aa8cad4f
......@@ -41,7 +41,7 @@
/**
* initialize static member.
*/
bool WException::noBacktrace=false;
bool WException::noBacktrace = false;
WException::WException( const std::string& msg ): exception()
{
......@@ -165,3 +165,8 @@ std::string WException::getBacktrace() const
return o.str();
}
void WException::disableBacktrace()
{
noBacktrace = true;
}
......@@ -76,10 +76,7 @@ public:
* Function disables backtraces. Please note that the backtrace can not be reactivated to avoid people from dis/enabling them
* at will.
*/
static void disableBacktrace()
{
noBacktrace=true;
}
static void disableBacktrace();
protected:
/**
......
......@@ -64,7 +64,7 @@ void WModuleInputConnector::connectSignals( boost::shared_ptr<WModuleConnector>
// connector does not set this information.
// NOTE: con will be an WModuleOutputConnector
m_DataChangedConnection = con->subscribeSignal( DATA_CHANGED,
boost::bind( &WModuleInputConnector::notifyDataChange, this, _1, _2 )
boost::bind( &WModuleInputConnector::notifyDataChange, this, _1, _2 )
);
}
......
......@@ -86,7 +86,8 @@ protected:
* \param con the connector that requests connection.
*
*/
// If you want to add additional signals an output connector should subscribe FROM an input connector, overwrite connectSignals
// If you want to add additional signals an output connector should subscribe FROM an input connector, overwrite
// connectSignals
// virtual void connectSignals( boost::shared_ptr<WModuleConnector> con );
/**
......
......@@ -87,21 +87,6 @@ public:
);
// add it to the list of connectors. Please note, that a connector NOT added via addConnector will not work as expected.
addConnector( m_Output );
/*
m_Input= boost::shared_ptr<WModuleInputConnector >(
new WModuleInputConnector ( shared_from_this(), "in1", "desc1" )
);
// add it to the list of connectors. Please note, that a connector NOT added via addConnector will not work as expected.
addConnector( m_Input );
m_Output= boost::shared_ptr<WModuleOutputConnector >(
new WModuleOutputConnector ( shared_from_this(), "out1", "desc2" )
);
// add it to the list of connectors. Please note, that a connector NOT added via addConnector will not work as expected.
addConnector( m_Output );
WModule::connectors();
*/
}
protected:
......@@ -141,7 +126,8 @@ protected:
// just copy the data
data=*( boost::shared_dynamic_cast<WModuleOutputData<int> >( output )->getData() ) + 1;
//std::cout << "change to " << data << " in " << input->getCanonicalName() << " from " << output->getCanonicalName() << std::endl;
// std::cout << "change to " << data << " in " << input->getCanonicalName() << " from " << output->getCanonicalName()
// << std::endl;
}
private:
......@@ -155,7 +141,7 @@ private:
* Input connection.
*/
boost::shared_ptr<WModuleInputData<int> > m_Input;
/**
* Output connection.
*/
......@@ -397,12 +383,12 @@ public:
initConnections();
// set some data, propagate change
int d=5;
int d = 5;
TS_ASSERT_THROWS_NOTHING( m1->m_Output->updateData( boost::shared_ptr<int>( &d ) ) );
// got the data transferred?
TS_ASSERT( *(m1->m_Output->getData()) == d );
TS_ASSERT( *(m2->m_Input->getData()) == d );
TS_ASSERT( *( m1->m_Output->getData() ) == d );
TS_ASSERT( *( m2->m_Input->getData() ) == d );
TS_ASSERT( m2->data == d + 1 );
}
......@@ -420,8 +406,7 @@ public:
// try to get data from an unconnected connector
TS_ASSERT_THROWS( m3->m_Input->getData(), WModuleConnectorUnconnected );
// try to get uninitialized data:
// should return an "NULL" Pointer
// try to get uninitialized data -> should return an "NULL" Pointer
TS_ASSERT( m2->m_Input->getData() == boost::shared_ptr<int>() );
}
};
......
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