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;
58 typedef boost::shared_ptr< WModuleOutputData< T > >
SPtr;
63 typedef boost::shared_ptr< const WModuleOutputData< T > >
ConstSPtr;
89 static PtrType create( boost::shared_ptr< WModule > module, std::string name =
"", std::string description =
"" );
101 static PtrType createAndAdd( boost::shared_ptr< WModule > module, std::string name =
"", std::string description =
"" );
110 WModuleOutputData( boost::shared_ptr< WModule > module, std::string name =
"", std::string description =
"" )
113 m_data = boost::shared_ptr< T >();
158 virtual const boost::shared_ptr< WTransferable >
getRawData()
const
180 virtual bool connectable( boost::shared_ptr<WModuleConnector> con )
194 return (
m_data == boost::shared_ptr< T >() ) ? T::getPrototype() : boost::static_pointer_cast<
WPrototyped >(
m_data );
202 boost::shared_ptr< T >
m_data;
205 template <
typename T >
207 std::string description )
211 return PTR(
new TYPE( module, name, description ) );
214 template <
typename T >
216 std::string description )
219 module->addConnector( c );
223 #endif // WMODULEOUTPUTDATA_H