OpenWalnut
1.4.0
|
Class implementing a simple module since WModuleConnector itself is not usable for proper testing itself because it is has pure virtual methods, i.e. More...
#include <WModuleConnector_test.h>
Public Member Functions | |
WModuleImpl (std::string n="?") | |
Constructor. | |
virtual | ~WModuleImpl () |
Destructor. | |
virtual boost::shared_ptr < WModule > | factory () const |
Create instance of this module class. | |
virtual const std::string | getName () const |
Returns name of this module. | |
const std::string | getDescription () const |
Returns description of module. | |
virtual void | connectors () |
Set up connectors. | |
Protected Member Functions | |
virtual void | moduleMain () |
Entry point after loading the module. | |
virtual void | notifyConnectionEstablished (boost::shared_ptr< WModuleConnector >, boost::shared_ptr< WModuleConnector >) |
Notifier called whenever a connection got established. | |
virtual void | notifyConnectionClosed (boost::shared_ptr< WModuleConnector >, boost::shared_ptr< WModuleConnector >) |
Notifier called whenever a connection got closed. | |
virtual void | notifyDataChange (boost::shared_ptr< WModuleConnector >, boost::shared_ptr< WModuleConnector > output) |
Notifier called whenever a changed data was propagated to one of this modules connectors. | |
Protected Attributes | |
std::string | n |
temporary name string | |
Private Attributes | |
int | data |
The data lastly submitted. | |
boost::shared_ptr < WModuleInputData < WTestTransferableBase > > | m_input |
Input connection. | |
boost::shared_ptr < WModuleInputData < WTestTransferableDerived > > | m_inputDerived |
Input connection with a derived class as transferable. | |
boost::shared_ptr < WModuleOutputData < WTestTransferableBase > > | m_output |
Output connection. | |
boost::shared_ptr < WModuleOutputData < WTestTransferableDerived > > | m_outputDerived |
Output connection with a derived class as transferable. | |
Friends | |
class | WModuleConnectorTest |
Class implementing a simple module since WModuleConnector itself is not usable for proper testing itself because it is has pure virtual methods, i.e.
is abstract.
Definition at line 180 of file WModuleConnector_test.h.
WModuleImpl::WModuleImpl | ( | std::string | n = "?" | ) | [inline, explicit] |
Constructor.
n | a string to test with (sets initial value). |
Definition at line 190 of file WModuleConnector_test.h.
References n.
Referenced by factory().
virtual WModuleImpl::~WModuleImpl | ( | ) | [inline, virtual] |
Destructor.
Definition at line 198 of file WModuleConnector_test.h.
virtual void WModuleImpl::connectors | ( | ) | [inline, virtual] |
Set up connectors.
Reimplemented from WModule.
Definition at line 235 of file WModuleConnector_test.h.
References WModule::addConnector(), m_input, m_inputDerived, m_output, and m_outputDerived.
virtual boost::shared_ptr< WModule > WModuleImpl::factory | ( | ) | const [inline, virtual] |
Create instance of this module class.
Implements WModule.
Definition at line 207 of file WModuleConnector_test.h.
References WModuleImpl().
const std::string WModuleImpl::getDescription | ( | ) | const [inline, virtual] |
Returns description of module.
Implements WPrototyped.
Definition at line 227 of file WModuleConnector_test.h.
virtual const std::string WModuleImpl::getName | ( | ) | const [inline, virtual] |
Returns name of this module.
Implements WPrototyped.
Definition at line 217 of file WModuleConnector_test.h.
virtual void WModuleImpl::moduleMain | ( | ) | [inline, protected, virtual] |
Entry point after loading the module.
Runs in separate thread.
Implements WModule.
Definition at line 270 of file WModuleConnector_test.h.
References WThreadedRunner::m_shutdownFlag, and WThreadedRunner::sleep().
virtual void WModuleImpl::notifyConnectionClosed | ( | boost::shared_ptr< WModuleConnector > | , |
boost::shared_ptr< WModuleConnector > | |||
) | [inline, protected, virtual] |
Notifier called whenever a connection got closed.
Reimplemented from WModule.
Definition at line 293 of file WModuleConnector_test.h.
virtual void WModuleImpl::notifyConnectionEstablished | ( | boost::shared_ptr< WModuleConnector > | , |
boost::shared_ptr< WModuleConnector > | |||
) | [inline, protected, virtual] |
Notifier called whenever a connection got established.
Reimplemented from WModule.
Definition at line 283 of file WModuleConnector_test.h.
virtual void WModuleImpl::notifyDataChange | ( | boost::shared_ptr< WModuleConnector > | , |
boost::shared_ptr< WModuleConnector > | output | ||
) | [inline, protected, virtual] |
Notifier called whenever a changed data was propagated to one of this modules connectors.
param input the local connector receiving the event.
output | the remote connector propagating the event. |
Reimplemented from WModule.
Definition at line 306 of file WModuleConnector_test.h.
References data, and WModuleOutputData< T >::getData().
int WModuleImpl::data [private] |
The data lastly submitted.
Definition at line 331 of file WModuleConnector_test.h.
Referenced by notifyDataChange().
boost::shared_ptr< WModuleInputData< WTestTransferableBase > > WModuleImpl::m_input [private] |
Input connection.
Definition at line 336 of file WModuleConnector_test.h.
Referenced by connectors().
boost::shared_ptr< WModuleInputData< WTestTransferableDerived > > WModuleImpl::m_inputDerived [private] |
Input connection with a derived class as transferable.
Definition at line 341 of file WModuleConnector_test.h.
Referenced by connectors().
boost::shared_ptr< WModuleOutputData< WTestTransferableBase > > WModuleImpl::m_output [private] |
Output connection.
Definition at line 346 of file WModuleConnector_test.h.
Referenced by connectors().
boost::shared_ptr< WModuleOutputData< WTestTransferableDerived > > WModuleImpl::m_outputDerived [private] |
Output connection with a derived class as transferable.
Definition at line 351 of file WModuleConnector_test.h.
Referenced by connectors().
std::string WModuleImpl::n [protected] |
temporary name string
Definition at line 267 of file WModuleConnector_test.h.
Referenced by WModuleImpl().