Commit 44890c80 authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

SCHNApps : CMakeLists debug

parent e739fd2a
...@@ -19,7 +19,7 @@ find_package(QGLViewer REQUIRED) ...@@ -19,7 +19,7 @@ find_package(QGLViewer REQUIRED)
#======SCHNApps=======# #======SCHNApps=======#
SET(SCHNApps_ROOT_DIR ${CGoGN_ROOT_DIR}/SCHNApps) SET(SCHNApps_ROOT_DIR ${CGoGN_ROOT_DIR}/SCHNApps)
SET(EXECUTABLE_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/bin) SET(EXECUTABLE_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/plugins/lib) SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/Plugins)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/Release Release) ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/Release Release)
IF (NOT WIN32) IF (NOT WIN32)
......
...@@ -34,7 +34,7 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug ) ...@@ -34,7 +34,7 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
TARGET_LINK_LIBRARIES( FirstPluginD TARGET_LINK_LIBRARIES( FirstPluginD
${CGoGN_LIBS_D} ${CGoGN_LIBS_D}
${COMMON_LIBS} ${COMMON_LIBS}
${QGLVIEWER_INCLUDE_LIBRARY} ${QGLVIEWER_LIBRARIES}
) )
ADD_DEPENDENCIES( FirstPluginD SCHNAppsD ) ADD_DEPENDENCIES( FirstPluginD SCHNAppsD )
...@@ -59,7 +59,7 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug ) ...@@ -59,7 +59,7 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
TARGET_LINK_LIBRARIES( FirstPlugin TARGET_LINK_LIBRARIES( FirstPlugin
${CGoGN_LIBS_R} ${CGoGN_LIBS_R}
${COMMON_LIBS} ${COMMON_LIBS}
${QGLVIEWER_INCLUDE_LIBRARY} ${QGLVIEWER_LIBRARIES}
) )
ADD_DEPENDENCIES( FirstPlugin SCHNApps ) ADD_DEPENDENCIES( FirstPlugin SCHNApps )
......
...@@ -21,7 +21,6 @@ PluginDialog::PluginDialog(Window *parent, PluginHash *activePlugins) : ...@@ -21,7 +21,6 @@ PluginDialog::PluginDialog(Window *parent, PluginHash *activePlugins) :
parentWindow(parent), parentWindow(parent),
init(true) init(true)
{ {
// if(!xmlFile.exists()) // if(!xmlFile.exists())
// { // {
// System::Error::code= System::Error::NO_PLUGIN_PATH_FILE; // System::Error::code= System::Error::NO_PLUGIN_PATH_FILE;
......
...@@ -561,9 +561,7 @@ Plugin *Window::loadPlugin(QString pluginPath) ...@@ -561,9 +561,7 @@ Plugin *Window::loadPlugin(QString pluginPath)
{ {
Plugin *plugin = qobject_cast<Plugin *>(pluginObject); Plugin *plugin = qobject_cast<Plugin *>(pluginObject);
QString pluginName = QFileInfo(pluginPath).fileName(); QString pluginName = QFileInfo(pluginPath).baseName().remove(0, 3);
pluginName.remove(0, 3);
pluginName.remove(pluginName.lastIndexOf(".so"), 3);
//we set the plugin with correct parameters (name, filepath) //we set the plugin with correct parameters (name, filepath)
plugin->setWindow(this); plugin->setWindow(this);
...@@ -573,10 +571,8 @@ Plugin *Window::loadPlugin(QString pluginPath) ...@@ -573,10 +571,8 @@ Plugin *Window::loadPlugin(QString pluginPath)
//then we call its activate() methods //then we call its activate() methods
if (plugin->activate(m_initialization)) if (plugin->activate(m_initialization))
{ {
//if it succeeded we reference this plugin //if it succeeded we reference this plugin
h_plugin.insert(pluginName, plugin); h_plugin.insert(pluginName, plugin);
//method success //method success
return plugin; return plugin;
} }
...@@ -617,7 +613,6 @@ void Window::unloadPlugin(QString pluginName) ...@@ -617,7 +613,6 @@ void Window::unloadPlugin(QString pluginName)
} }
} }
Plugin *Window::checkPluginDependencie(QString name, Plugin *dependantPlugin) Plugin *Window::checkPluginDependencie(QString name, Plugin *dependantPlugin)
{ {
//if the plugin is referenced and found //if the plugin is referenced and found
......
...@@ -39,37 +39,41 @@ int GenericMap::m_nbInstances = 0; ...@@ -39,37 +39,41 @@ int GenericMap::m_nbInstances = 0;
GenericMap::GenericMap() : m_nbThreads(1) GenericMap::GenericMap() : m_nbThreads(1)
{ {
if(m_attributes_registry_map == NULL) if(m_attributes_registry_map == NULL)
{
std::cout << "INITIALIZE REGISTRY MAP" << std::endl;
m_attributes_registry_map = new std::map<std::string, RegisteredBaseAttribute*>; m_attributes_registry_map = new std::map<std::string, RegisteredBaseAttribute*>;
m_nbInstances++; // register all known types
registerAttribute<Dart>("Dart");
// register all known types registerAttribute<Mark>("Mark");
registerAttribute<Dart>("Dart");
registerAttribute<Mark>("Mark");
registerAttribute<long>("long"); registerAttribute<long>("long");
registerAttribute<int>("int"); registerAttribute<int>("int");
registerAttribute<short>("short"); registerAttribute<short>("short");
registerAttribute<char>("char"); registerAttribute<char>("char");
registerAttribute<unsigned long>("unsigned long"); registerAttribute<unsigned long>("unsigned long");
registerAttribute<unsigned int>("unsigned int"); registerAttribute<unsigned int>("unsigned int");
registerAttribute<unsigned short>("unsigned short"); registerAttribute<unsigned short>("unsigned short");
registerAttribute<unsigned char>("unsigned char"); registerAttribute<unsigned char>("unsigned char");
registerAttribute<Geom::Vec2f>(Geom::Vec2f::CGoGNnameOfType()); registerAttribute<Geom::Vec2f>(Geom::Vec2f::CGoGNnameOfType());
registerAttribute<Geom::Vec3f>(Geom::Vec3f::CGoGNnameOfType()); registerAttribute<Geom::Vec3f>(Geom::Vec3f::CGoGNnameOfType());
registerAttribute<Geom::Vec4f>(Geom::Vec4f::CGoGNnameOfType()); registerAttribute<Geom::Vec4f>(Geom::Vec4f::CGoGNnameOfType());
registerAttribute<Geom::Vec2d>(Geom::Vec2d::CGoGNnameOfType()); registerAttribute<Geom::Vec2d>(Geom::Vec2d::CGoGNnameOfType());
registerAttribute<Geom::Vec3d>(Geom::Vec3d::CGoGNnameOfType()); registerAttribute<Geom::Vec3d>(Geom::Vec3d::CGoGNnameOfType());
registerAttribute<Geom::Vec4d>(Geom::Vec4d::CGoGNnameOfType()); registerAttribute<Geom::Vec4d>(Geom::Vec4d::CGoGNnameOfType());
registerAttribute<Geom::Matrix33f>(Geom::Matrix33f::CGoGNnameOfType()); registerAttribute<Geom::Matrix33f>(Geom::Matrix33f::CGoGNnameOfType());
registerAttribute<Geom::Matrix44f>(Geom::Matrix44f::CGoGNnameOfType()); registerAttribute<Geom::Matrix44f>(Geom::Matrix44f::CGoGNnameOfType());
registerAttribute<Geom::Matrix33d>(Geom::Matrix33d::CGoGNnameOfType()); registerAttribute<Geom::Matrix33d>(Geom::Matrix33d::CGoGNnameOfType());
registerAttribute<Geom::Matrix44d>(Geom::Matrix44d::CGoGNnameOfType()); registerAttribute<Geom::Matrix44d>(Geom::Matrix44d::CGoGNnameOfType());
}
m_nbInstances++;
for(unsigned int i = 0; i < NB_ORBITS; ++i) for(unsigned int i = 0; i < NB_ORBITS; ++i)
{ {
...@@ -108,7 +112,6 @@ GenericMap::~GenericMap() ...@@ -108,7 +112,6 @@ GenericMap::~GenericMap()
m_attribs[i].clear(true) ; m_attribs[i].clear(true) ;
} }
for(std::multimap<AttributeMultiVectorGen*, AttributeHandlerGen*>::iterator it = attributeHandlers.begin(); it != attributeHandlers.end(); ++it) for(std::multimap<AttributeMultiVectorGen*, AttributeHandlerGen*>::iterator it = attributeHandlers.begin(); it != attributeHandlers.end(); ++it)
(*it).second->setInvalid() ; (*it).second->setInvalid() ;
attributeHandlers.clear() ; attributeHandlers.clear() ;
...@@ -126,7 +129,7 @@ GenericMap::~GenericMap() ...@@ -126,7 +129,7 @@ GenericMap::~GenericMap()
// clean type registry if necessary // clean type registry if necessary
m_nbInstances--; m_nbInstances--;
if (m_nbInstances<=0) if (m_nbInstances <= 0)
{ {
for (std::map<std::string, RegisteredBaseAttribute*>::iterator it = m_attributes_registry_map->begin(); it != m_attributes_registry_map->end(); ++it) for (std::map<std::string, RegisteredBaseAttribute*>::iterator it = m_attributes_registry_map->begin(); it != m_attributes_registry_map->end(); ++it)
delete it->second; delete it->second;
......
Supports Markdown
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