]> Creatis software - clitk.git/blobdiff - vv/vvToolCreator.txx
Corrected tool mechanism for windows: static data members seem to be initialized...
[clitk.git] / vv / vvToolCreator.txx
index 33fd9e040c24bd46e776f07e366dfc31e72ba1fe..47b526ce85a1af279fb82cb6298ec831815b6356 100644 (file)
@@ -33,3 +33,12 @@ void vvToolCreator<ToolType>::InsertToolInMenu(vvMainWindowBase * m) {
   vvToolCreatorBase::InsertToolInMenu(mMainWindow); 
 }
 //------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+template<class ToolType>
+vvToolCreator<ToolType>* & vvToolCreator<ToolType>::GetInstance() { 
+  if(!mSingleton)
+    mSingleton = new vvToolCreator<ToolType>;
+  return mSingleton;
+}
+//------------------------------------------------------------------------------