Commit ea44f149 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[MERGE]

parent 9d70e7e8
......@@ -24,6 +24,7 @@
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
......@@ -38,6 +39,7 @@
#include "WQtCheckBox.h"
#include "WQtModuleHeaderTreeItem.h"
#include "../../../kernel/WModuleFactory.h"
#include "../WMainWindow.h"
#include "../../../modules/data/WMData.h"
......@@ -145,6 +147,15 @@ void WQtDatasetBrowser::selectTreeItem()
{
module = ( ( WQtModuleTreeItem* ) m_treeWidget->selectedItems().at( 0 ) )->getModule();
}
// create ribbon menu entry
std::set< boost::shared_ptr< WModule > > comps = WModuleFactory::getModuleFactory()->getCompatiblePrototypes( module );
for ( std::set< boost::shared_ptr< WModule > >::iterator iter = comps.begin(); iter != comps.end(); ++iter )
{
std::cout << "Name:" << ( *iter )->getName() << std::endl;
}
// create properties
std::vector < WProperty* >props = module->getProperties()->getPropertyVector();
WQtDSBWidget* tab1 = new WQtDSBWidget( "settings" );
......
......@@ -239,7 +239,6 @@ void WKernel::doLoadDataSets( std::vector< std::string > fileNames )
WLogger::getLogger()->addLogMessage( "Compatible Modules: " + ( *iter )->getName() , "Kernel", LL_ERROR );
}*/
}
exit(0);
}
boost::shared_ptr< WDataHandler > WKernel::getDataHandler() const
......
......@@ -54,7 +54,7 @@ public:
* \param name The name of this connector.
* \param description Short description of this connector.
*/
WModuleInputData<T>( boost::shared_ptr<WModule> module, std::string name="", std::string description="" )
WModuleInputData( boost::shared_ptr<WModule> module, std::string name="", std::string description="" )
:WModuleInputConnector( module, name, description )
{
};
......@@ -62,7 +62,7 @@ public:
/**
* Destructor.
*/
virtual ~WModuleInputData<T>()
virtual ~WModuleInputData()
{
};
......@@ -108,12 +108,13 @@ public:
*/
virtual bool connectable( boost::shared_ptr<WModuleConnector> con )
{
// check whether the datatypes are compatible
// if ( T::isCompatible( con.getData() ) )
//if ( dynamic_cast<WModuleOutputData<T>* >( con.get() ) ) // NOLINT - since we really need them here
{
// NOTE: the upper cast already checked the compatibility completely. WModuleInputConnector::connectable does the
// same check again. But since we do not know what checks will be added to WModuleInputConnector::connectable in the
// future we forward the call.
return WModuleInputConnector::connectable( con );
}
return false;
};
......
......@@ -29,6 +29,8 @@
#include <boost/shared_ptr.hpp>
#include "../common/WLogger.h"
// this is necessary since we have some kind of cyclic includes
template < typename T > class WModuleInputData;
#include "WModuleInputData.hpp"
......@@ -51,7 +53,7 @@ public:
* \param name The name of this connector.
* \param description Short description of this connector.
*/
WModuleOutputData< T >( boost::shared_ptr<WModule> module, std::string name="", std::string description="" )
WModuleOutputData( boost::shared_ptr<WModule> module, std::string name="", std::string description="" )
:WModuleOutputConnector( module, name, description )
{
m_data = boost::shared_ptr<T>();
......@@ -60,7 +62,7 @@ public:
/**
* Destructor.
*/
virtual ~WModuleOutputData< T >()
virtual ~WModuleOutputData()
{
};
......@@ -96,15 +98,17 @@ public:
*/
virtual bool connectable( boost::shared_ptr<WModuleConnector> con )
{
//WLogger::getLogger()->addLogMessage( "MAGUCKN", getCanonicalName(), LL_ERROR );
//WLogger::getLogger()->addLogMessage( "Mit: " + con->getCanonicalName(), getCanonicalName(), LL_ERROR );
//if ( dynamic_cast< WModuleInputData< T >* >( con.get() ) ) // NOLINT - since we really need the dynamic cast here
//{
{
//WLogger::getLogger()->addLogMessage( "GEIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIL" + con->getCanonicalName(), getCanonicalName(), LL_ERROR );
// NOTE: the upper cast already checked the compatibility completely. WModuleOutputConnector::connectable does the
// same check again. But since we do not know what checks will be added to WModuleOutputConnector::connectable in the
// future we forward the call.
return WModuleOutputConnector::connectable( con );
//}
//return false;
}
};
protected:
......
......@@ -183,7 +183,7 @@ void WMData::moduleMain()
}
// notify
//m_output->updateData( m_dataSet );
m_output->updateData( m_dataSet );
ready();
// go to idle mode
......
......@@ -168,8 +168,8 @@ void WMMarchingCubes::connectors()
{
// initialize connectors
m_input = boost::shared_ptr<WModuleInputData< WDataSetSingle > >(
new WModuleInputData< WDataSetSingle >( shared_from_this(),
m_input = boost::shared_ptr<WModuleInputData< boost::shared_ptr< WDataSet > > >(
new WModuleInputData< boost::shared_ptr< WDataSet > >( shared_from_this(),
"in", "Dataset to compute isosurface for." )
);
......
......@@ -181,7 +181,7 @@ private:
*/
void renderMesh( WTriangleMesh* mesh );
boost::shared_ptr< WModuleInputData< WDataSetSingle > > m_input; //!< Input connector required by this module.
boost::shared_ptr< WModuleInputData< boost::shared_ptr< WDataSet > > > m_input; //!< Input connector required by this module.
static const unsigned int m_edgeTable[256]; //!< Lookup table for edges used in the construction of the isosurface.
static const int m_triTable[256][16]; //!< Lookup table for triangles used in the construction of the isosurface.
......
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