Salome HOME
projects
/
modules
/
geom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge C++ part of kleontev/38044_auto_repair
[modules/geom.git]
/
src
/
GEOM
/
GEOM_Engine.hxx
diff --git
a/src/GEOM/GEOM_Engine.hxx
b/src/GEOM/GEOM_Engine.hxx
old mode 100755
(executable)
new mode 100644
(file)
index
111096e
..
7842336
--- a/
src/GEOM/GEOM_Engine.hxx
+++ b/
src/GEOM/GEOM_Engine.hxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
14 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2007-20
24 CEA, EDF
, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-27,17
+27,12
@@
#include "GEOM_Object.hxx"
#include "GEOM_DataMapOfAsciiStringTransient.hxx"
#include "GEOM_Object.hxx"
#include "GEOM_DataMapOfAsciiStringTransient.hxx"
-#include <Basics_OCCTVersion.hxx>
-
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
#include <TColStd_DataMapOfIntegerTransient.hxx>
#include <TColStd_DataMapOfIntegerTransient.hxx>
-#else
-#include <Interface_DataMapOfIntegerTransient.hxx>
-#endif
#include <Resource_DataMapOfAsciiStringAsciiString.hxx>
#include <TDocStd_Document.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <Resource_DataMapOfAsciiStringAsciiString.hxx>
#include <TDocStd_Document.hxx>
#include <TColStd_HArray1OfInteger.hxx>
+#include <TColStd_HArray1OfByte.hxx>
#include <TColStd_HSequenceOfAsciiString.hxx>
#include <TColStd_MapOfInteger.hxx>
#include <TDF_Label.hxx>
#include <TColStd_HSequenceOfAsciiString.hxx>
#include <TColStd_MapOfInteger.hxx>
#include <TDF_Label.hxx>
@@
-58,12
+53,6
@@
struct TObjectData
TCollection_AsciiString _pyName;
bool _unpublished;
};
TCollection_AsciiString _pyName;
bool _unpublished;
};
-
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
-class Handle_TColStd_HArray1OfByte;
-#else
-class Handle_TDataStd_HArray1OfByte;
-#endif
struct TVariable{
TCollection_AsciiString myVariable;
struct TVariable{
TCollection_AsciiString myVariable;
@@
-100,61
+89,56
@@
typedef std::map<int, std::list<TDF_Label> > TFreeLabelsList;
class GEOM_Engine
{
class GEOM_Engine
{
-
public:
+public:
Standard_EXPORT GEOM_Engine();
Standard_EXPORT virtual ~GEOM_Engine();
Standard_EXPORT GEOM_Engine();
Standard_EXPORT virtual ~GEOM_Engine();
- //Retu
ns the engine
+ //Retu
rns the engine
Standard_EXPORT static GEOM_Engine* GetEngine();
//Returns the OCAF document by its ID, if document doesn't exists it will be created
Standard_EXPORT static GEOM_Engine* GetEngine();
//Returns the OCAF document by its ID, if document doesn't exists it will be created
- Standard_EXPORT Handle(TDocStd_Document) GetDocument(int theDocID, bool force=true);
-
- //Returns the ID of the given OCAF document
- Standard_EXPORT int GetDocID(Handle(TDocStd_Document) theDocument);
+ Standard_EXPORT Handle(TDocStd_Document) GetDocument(bool force=true);
- //Returns the OCAF appli
ac
tion
+ //Returns the OCAF appli
ca
tion
Standard_EXPORT Handle(TDocStd_Application) GetApplication() { return _OCAFApp; }
//Returns a pointer to GEOM_BaseObject defined by a document and the entry
Standard_EXPORT Handle(TDocStd_Application) GetApplication() { return _OCAFApp; }
//Returns a pointer to GEOM_BaseObject defined by a document and the entry
- Standard_EXPORT Handle(GEOM_BaseObject) GetObject(int theDocID,
- const char* theEntry,
+ Standard_EXPORT Handle(GEOM_BaseObject) GetObject(const char* theEntry,
bool force=true);
//Adds a new object of the type theType in the OCAF document
bool force=true);
//Adds a new object of the type theType in the OCAF document
- Standard_EXPORT Handle(GEOM_BaseObject) AddBaseObject(int the
DocID, int the
Type);
+ Standard_EXPORT Handle(GEOM_BaseObject) AddBaseObject(int theType);
//Adds a new object of the type theType in the OCAF document
//Adds a new object of the type theType in the OCAF document
- Standard_EXPORT Handle(GEOM_Object) AddObject(int the
DocID, int the
Type);
+ Standard_EXPORT Handle(GEOM_Object) AddObject(int theType);
//Removes the object from the OCAF document
Standard_EXPORT bool RemoveObject(Handle(GEOM_BaseObject)& theObject);
//Removes the object from the OCAF document
Standard_EXPORT bool RemoveObject(Handle(GEOM_BaseObject)& theObject);
- //Saves the OCAF document with
ID = theDocID with
file with name theFileName
- Standard_EXPORT bool Save(
int theDocID,
const char* theFileName);
+ //Saves the OCAF document with file with name theFileName
+ Standard_EXPORT bool Save(const char* theFileName);
- //Loads the OCAF document into the application
and assigns to it an ID = theDocID
- Standard_EXPORT bool Load(
int theDocID,
const char* theFileName);
+ //Loads the OCAF document into the application
+ Standard_EXPORT bool Load(const char* theFileName);
- //Closes the document
with ID = theDocID
- Standard_EXPORT void Close(
int theDocID
);
+ //Closes the document
+ Standard_EXPORT void Close();
//Sets the number of Undos (default value = 10)
Standard_EXPORT void SetUndoLimit(int theLimit) { _UndoLimit = theLimit; }
//Sets the number of Undos (default value = 10)
Standard_EXPORT void SetUndoLimit(int theLimit) { _UndoLimit = theLimit; }
- //Applies an Undo to document
with ID = theDocID
- Standard_EXPORT void Undo(
int theDocID
);
+ //Applies an Undo to document
+ Standard_EXPORT void Undo();
- //Applies an Redo to document
with ID = theDocID
- Standard_EXPORT void Redo(
int theDocID
);
+ //Applies an Redo to document
+ Standard_EXPORT void Redo();
//Adds a new sub-shape object of the MainShape object
Standard_EXPORT Handle(GEOM_Object) AddSubShape(Handle(GEOM_Object) theMainShape,
Handle(TColStd_HArray1OfInteger) theIndices,
bool isStandaloneOperation = false);
//Adds a new sub-shape object of the MainShape object
Standard_EXPORT Handle(GEOM_Object) AddSubShape(Handle(GEOM_Object) theMainShape,
Handle(TColStd_HArray1OfInteger) theIndices,
bool isStandaloneOperation = false);
- Standard_EXPORT TCollection_AsciiString DumpPython(int theDocID,
- std::vector<TObjectData>& theObjectData,
+ Standard_EXPORT TCollection_AsciiString DumpPython(std::vector<TObjectData>& theObjectData,
TVariablesList theVariables,
bool isPublished,
bool isMultiFile,
TVariablesList theVariables,
bool isPublished,
bool isMultiFile,
@@
-164,15
+148,15
@@
class GEOM_Engine
Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) GetAllDumpNames() const;
Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) GetAllDumpNames() const;
- Standard_EXPORT int addTexture(int the
DocID, int the
Width, int theHeight,
+ Standard_EXPORT int addTexture(int theWidth, int theHeight,
const Handle(TColStd_HArray1OfByte)& theTexture,
const TCollection_AsciiString& theFileName = "");
const Handle(TColStd_HArray1OfByte)& theTexture,
const TCollection_AsciiString& theFileName = "");
- Standard_EXPORT Handle(TColStd_HArray1OfByte) getTexture(int
theDocID, int
theTextureID,
+ Standard_EXPORT Handle(TColStd_HArray1OfByte) getTexture(int theTextureID,
int& theWidth, int& theHeight,
TCollection_AsciiString& theFileName);
int& theWidth, int& theHeight,
TCollection_AsciiString& theFileName);
- Standard_EXPORT std::list<int> getAllTextures(
int theDocID
);
+ Standard_EXPORT std::list<int> getAllTextures();
static const Standard_GUID& GetTextureGUID();
static const Standard_GUID& GetTextureGUID();
@@
-180,25
+164,20
@@
class GEOM_Engine
const TCollection_AsciiString& anEntry,
Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
const TCollection_AsciiString& anEntry,
Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
- Standard_EXPORT void DocumentModified(const int theDocId, const bool isModified);
-
- Standard_EXPORT bool DocumentModified(const int theDocId);
-
- protected:
+protected:
Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);
Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);
-
private:
+private:
Handle(GEOM_Application) _OCAFApp;
Handle(GEOM_Application) _OCAFApp;
- TColStd_DataMapOfIntegerTransient _mapIDDocument;
- TColStd_MapOfInteger _mapModifiedDocs; // keeps the identifiers of the modified document ids
+ Handle(TDocStd_Document) _document;
int _UndoLimit;
GEOM_DataMapOfAsciiStringTransient _objects;
Resource_DataMapOfAsciiStringAsciiString _studyEntry2NameMap;
int _UndoLimit;
GEOM_DataMapOfAsciiStringTransient _objects;
Resource_DataMapOfAsciiStringAsciiString _studyEntry2NameMap;
-
TFreeLabelsList
_freeLabels;
+
std::list<TDF_Label>
_freeLabels;
};
#endif
};
#endif