From: adv Date: Wed, 11 Sep 2013 07:11:55 +0000 (+0000) Subject: Registerring of operators changed to cross platform maner. X-Git-Tag: BR_hydro_v_0_1~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dc66d0122d32a15397b49a1578436f360b6c85e1;p=modules%2Fhydro.git Registerring of operators changed to cross platform maner. --- diff --git a/src/HYDROData/HYDROOperations_Factory.cxx b/src/HYDROData/HYDROOperations_Factory.cxx index c4fff685..c9c06966 100644 --- a/src/HYDROData/HYDROOperations_Factory.cxx +++ b/src/HYDROData/HYDROOperations_Factory.cxx @@ -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; }