]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Registerring of operators changed to cross platform maner.
authoradv <adv@opencascade.com>
Wed, 11 Sep 2013 07:11:55 +0000 (07:11 +0000)
committeradv <adv@opencascade.com>
Wed, 11 Sep 2013 07:11:55 +0000 (07:11 +0000)
src/HYDROData/HYDROOperations_Factory.cxx

index c4fff685724e5dbd3441769175467ea4c8b0d78c..c9c069665e61d50a20800ad941c35bcc0a407787 100644 (file)
@@ -38,7 +38,10 @@ ImageComposer_Operator* HYDROOperations_Factory::Operator(const QString theName)
 void HYDROOperations_Factory::Register(
   ImageComposer_Operator* theOperator)
 {
-  FACTORY->myOps[QString(typeid(*theOperator).name())] = theOperator;
+  if ( !theOperator )
+    return;
+
+  FACTORY->myOps[ theOperator->name() ] = theOperator;
 }
 
 HYDROOperations_Factory::HYDROOperations_Factory()
@@ -66,8 +69,8 @@ Handle(HYDROData_Image) HYDROOperations_Factory::CreateImage(
     Handle(HYDROData_Image)::DownCast(theDoc->CreateObject(KIND_IMAGE));
   // get data from operation
   if (theOperator) {
-    anImage->SetOperatorName(QString(typeid(*theOperator).name()));
-    anImage->SetArgs(theOperator->getBinArgs());
+    anImage->SetOperatorName( theOperator->name() );
+    anImage->SetArgs( theOperator->getBinArgs() );
   }
   return anImage;
 }