// VISU OBJECT : interactive object for VISU entities implementation
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// VISU OBJECT : interactive object for VISU entities implementation
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
// IDL headers
#include "SALOMEconfig.h"
#include CORBA_SERVER_HEADER(VISU_Gen)
#include CORBA_SERVER_HEADER(MED)
#include CORBA_SERVER_HEADER(SALOMEDS)
#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
// IDL headers
#include "SALOMEconfig.h"
#include CORBA_SERVER_HEADER(VISU_Gen)
#include CORBA_SERVER_HEADER(MED)
#include CORBA_SERVER_HEADER(SALOMEDS)
#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
#include "SALOME_NamingService.hxx"
#include "SALOME_LifeCycleCORBA.hxx"
#include "Utils_CorbaException.hxx"
#include "utilities.h"
#include "SALOME_NamingService.hxx"
#include "SALOME_LifeCycleCORBA.hxx"
#include "Utils_CorbaException.hxx"
#include "utilities.h"
std::string ToString();
virtual const char* GetComment() const = 0;
typedef std::map<std::string,QString> TRestoringMap;
std::string ToString();
virtual const char* GetComment() const = 0;
typedef std::map<std::string,QString> TRestoringMap;
- typedef std::map<string,TStorableEngine> TCallbackMap;
- static void Registry(const char* theComment, TStorableEngine theEngine)
- throw(std::logic_error&);
- static Storable* Create(SALOMEDS::SObject_ptr, const std::string& thePrefix, const std::string& theString)
- throw(std::runtime_error&);
- static const QString& FindValue(const TRestoringMap& theMap, const std::string& theArg, bool* isFind = NULL)
- throw(std::logic_error&);
+ typedef std::map<std::string,TStorableEngine> TCallbackMap;
+ static void Registry(const char* theComment, TStorableEngine theEngine);
+ static Storable* Create(SALOMEDS::SObject_ptr, const std::string& thePrefix, const std::string& theString);
+ static QString FindValue(const TRestoringMap& theMap, const std::string& theArg, bool* isFind = NULL);
static void StrToMap(const QString& theStr, VISU::Storable::TRestoringMap& theMap);
static SALOMEDS::SObject_ptr GetResultSO(SALOMEDS::SObject_ptr theSObject);
static void DataToStream(std::ostringstream& theStr, const QString& theName, const QString& theVal);
static void StrToMap(const QString& theStr, VISU::Storable::TRestoringMap& theMap);
static SALOMEDS::SObject_ptr GetResultSO(SALOMEDS::SObject_ptr theSObject);
static void DataToStream(std::ostringstream& theStr, const QString& theName, const QString& theVal);
+ //===========================================================================
+ class RemovableObject_i : public virtual POA_VISU::RemovableObject,
+ public virtual Storable
+ {
+ public:
+ virtual void RemoveFromStudy() = 0;
+ };
//===========================================================================
const CORBA::Boolean IsMultifile();
//===========================================================================
const CORBA::Boolean IsMultifile();
- const char* theIOR, const char* theName,
+ const char* theIOR, const char* theName,
+ const char* thePersistentRef, const char* theComment,
+ CORBA::Boolean theCreateNew = true);
+
+ std::string CreateAttributes(_PTR(Study) theStudyDocument,
+ const char* theFatherEntry, const char* theRefFatherEntry,
+ const char* theIOR, const char* theName,
const char* thePersistentRef, const char* theComment,
CORBA::Boolean theCreateNew = true);
std::string FindEntryWithComment(SALOMEDS::Study_ptr theStudyDocument, const char* theStartEntry,
const char* theComment, int IsAllLevels = true);
const char* thePersistentRef, const char* theComment,
CORBA::Boolean theCreateNew = true);
std::string FindEntryWithComment(SALOMEDS::Study_ptr theStudyDocument, const char* theStartEntry,
const char* theComment, int IsAllLevels = true);
+
+ SALOMEDS::SObject_var GetSObject(_PTR(SObject));
+ _PTR(SObject) GetClientSObject(SALOMEDS::SObject_var, _PTR(Study));
+
+ SALOMEDS::Study_var GetDSStudy(_PTR(Study));
+
+ void RemoveFromStudy(SALOMEDS::SObject_ptr theSObject,
+ bool theIsAttrOnly = true,
+ bool theDestroySubObjects = false);
+ void RemoveFromStudy(_PTR(SObject) theSObject,
+ bool theIsAttrOnly = true,
+ bool theDestroySubObjects = false);