From: san Date: Thu, 2 Jun 2005 12:43:04 +0000 (+0000) Subject: engineIOR() made pure virtual, to avoid serious logical errors X-Git-Tag: T3_0_0_a1~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2438610d7f53292c351d6a76e96d7dad8b307585;p=modules%2Fgui.git engineIOR() made pure virtual, to avoid serious logical errors --- diff --git a/src/SalomeApp/SalomeApp_Module.cxx b/src/SalomeApp/SalomeApp_Module.cxx index d1cc44ba1..4eb303e59 100644 --- a/src/SalomeApp/SalomeApp_Module.cxx +++ b/src/SalomeApp/SalomeApp_Module.cxx @@ -65,15 +65,6 @@ void SalomeApp_Module::viewManagers( QStringList& ) const { } -QString SalomeApp_Module::engineIOR() const -{ - // Return an empty string by default, to avoid any "default behavior". - // It means that SALOMEDS persistence is not used by a module by default. - // Each module can override this method to return either its actual engine's IOR, - // or simple the result returned by SalomeApp_Application::defaultEngineIOR() - return QString( "" ); -} - SalomeApp_Application* SalomeApp_Module::getApp() const { return (SalomeApp_Application*)application(); diff --git a/src/SalomeApp/SalomeApp_Module.h b/src/SalomeApp/SalomeApp_Module.h index 8be396c33..0668c193a 100644 --- a/src/SalomeApp/SalomeApp_Module.h +++ b/src/SalomeApp/SalomeApp_Module.h @@ -44,7 +44,15 @@ public: virtual void initialize( CAM_Application* ); virtual void windows( QMap& ) const; virtual void viewManagers( QStringList& ) const; - virtual QString engineIOR() const; + + // engineIOR() should be a pure virtual method, to avoid logical errors! + // + // Implementation in derived classes can return the following values: + // "" (empty string) - means that this is a light module, default engine should be used for interaction with SALOMEDS persistence + // "-1" - means that this is a light module, SALOMEDS persistence is not used at all + // module`s engine IOR - means that this is a standard SALOME module with a CORBA engine + // + virtual QString engineIOR() const = 0; virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& );