25 #ifndef WMODULEOUTPUTDATA_H
26 #define WMODULEOUTPUTDATA_H
30 #include <boost/shared_ptr.hpp>
32 #include "../common/WLogger.h"
36 #include "WModuleInputData.h"
37 #include "../common/WPrototyped.h"
38 #include "../common/WTransferable.h"
40 #include "WModuleOutputConnector.h"
46 template <
typename T >
53 typedef boost::shared_ptr< WModuleOutputData< T > >
PtrType;
79 static PtrType create( boost::shared_ptr< WModule > module, std::string name =
"", std::string description =
"" );
91 static PtrType createAndAdd( boost::shared_ptr< WModule > module, std::string name =
"", std::string description =
"" );
100 WModuleOutputData( boost::shared_ptr< WModule > module, std::string name =
"", std::string description =
"" )
103 m_data = boost::shared_ptr< T >();
148 virtual const boost::shared_ptr< WTransferable >
getRawData()
const
170 virtual bool connectable( boost::shared_ptr<WModuleConnector> con )
184 return (
m_data == boost::shared_ptr< T >() ) ? T::getPrototype() : boost::shared_static_cast<
WPrototyped >(
m_data );
194 boost::shared_ptr< T >
m_data;
197 template <
typename T >
199 std::string description )
203 return PTR(
new TYPE( module, name, description ) );
206 template <
typename T >
208 std::string description )
211 module->addConnector( c );
215 #endif // WMODULEOUTPUTDATA_H