X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM%2FGEOM_Engine.hxx;h=ab6b8282117288344670e1d9dfc0a58292c0fe2c;hb=6d5e9822fdeb14b60c55116fa6e6417b931d3533;hp=b5ea794e38c2459fe69f68e960dfff322e48335e;hpb=732211808796539fcf1de34e06038e7fb015ece9;p=modules%2Fgeom.git diff --git a/src/GEOM/GEOM_Engine.hxx b/src/GEOM/GEOM_Engine.hxx index b5ea794e3..ab6b82821 100644 --- a/src/GEOM/GEOM_Engine.hxx +++ b/src/GEOM/GEOM_Engine.hxx @@ -1,3 +1,22 @@ +// Copyright (C) 2005 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.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #ifndef _GEOM_Engine_HXX_ #define _GEOM_Engine_HXX_ @@ -11,68 +30,69 @@ #include #include #include +#include class GEOM_Engine { public: - GEOM_Engine(); - ~GEOM_Engine() { _mapIDDocument.Clear(); _objects.Clear(); } + Standard_EXPORT GEOM_Engine(); + Standard_EXPORT virtual ~GEOM_Engine(); //Retuns the engine - static GEOM_Engine* GetEngine(); + Standard_EXPORT static GEOM_Engine* GetEngine(); //Returns the OCAF document by its ID, if document doesn't exists it will be created - Handle(TDocStd_Document) GetDocument(int theDocID); + Standard_EXPORT Handle(TDocStd_Document) GetDocument(int theDocID); //Returns the ID of the given OCAF document - int GetDocID(Handle(TDocStd_Document) theDocument); + Standard_EXPORT int GetDocID(Handle(TDocStd_Document) theDocument); //Returns the OCAF appliaction - Handle(TDocStd_Application) GetApplication() { return _OCAFApp; } + Standard_EXPORT Handle(TDocStd_Application) GetApplication() { return _OCAFApp; } //Returns a pointer to GEOM_Object defined by a document and the entry - Handle(GEOM_Object) GetObject(int theDocID, char* theEntry); + Standard_EXPORT Handle(GEOM_Object) GetObject(int theDocID, char* theEntry); //Adds a new object of the type theType in the OCAF document - Handle(GEOM_Object) AddObject(int theDocID, int theType); + Standard_EXPORT Handle(GEOM_Object) AddObject(int theDocID, int theType); //Removes the object from the OCAF document - bool RemoveObject(Handle(GEOM_Object) theObject); + Standard_EXPORT bool RemoveObject(Handle(GEOM_Object) theObject); //Saves the OCAF document with ID = theDocID with file with name theFileName - bool Save(int theDocID, char* theFileName); + Standard_EXPORT bool Save(int theDocID, char* theFileName); //Loads the OCAF document into the application and assigns to it an ID = theDocID - bool Load(int theDocID, char* theFileName); + Standard_EXPORT bool Load(int theDocID, char* theFileName); //Closes the document with ID = theDocID - void Close(int theDocID); + Standard_EXPORT void Close(int theDocID); //Sets the number of Undos (default value = 10) - void SetUndoLimit(int theLimit) { _UndoLimit = theLimit; } + Standard_EXPORT void SetUndoLimit(int theLimit) { _UndoLimit = theLimit; } //Applies an Undo to document with ID = theDocID - void Undo(int theDocID); + Standard_EXPORT void Undo(int theDocID); //Applies an Redo to document with ID = theDocID - void Redo(int theDocID); + Standard_EXPORT void Redo(int theDocID); //Adds a new sub shape object of the MainShape object - Handle(GEOM_Object) AddSubShape(Handle(GEOM_Object) theMainShape, + Standard_EXPORT Handle(GEOM_Object) AddSubShape(Handle(GEOM_Object) theMainShape, Handle(TColStd_HArray1OfInteger) theIndices, bool isStandaloneOperation = false); - TCollection_AsciiString DumpPython(int theDocID, + Standard_EXPORT TCollection_AsciiString DumpPython(int theDocID, Resource_DataMapOfAsciiStringAsciiString& theObjectNames, bool isPublished, bool& aValidScript); - const char* GetDumpName (const char* theStudyEntry) const; + Standard_EXPORT const char* GetDumpName (const char* theStudyEntry) const; - Handle(TColStd_HSequenceOfAsciiString) GetAllDumpNames() const; + Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) GetAllDumpNames() const; protected: - static void SetEngine(GEOM_Engine* theEngine); + Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine); private: @@ -82,6 +102,8 @@ class GEOM_Engine GEOM_DataMapOfAsciiStringTransient _objects; Resource_DataMapOfAsciiStringAsciiString _studyEntry2NameMap; + + TDF_Label _lastCleared; }; #endif