Salome HOME
Fix crashes of Sketcher and Import/Export
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IInsertOperations.hxx
1
2 #ifndef _GEOMImpl_IInsertOperations_HXX_
3 #define _GEOMImpl_IInsertOperations_HXX_
4
5 #include "Utils_SALOME_Exception.hxx"
6 #include "GEOM_IOperations.hxx"
7 #include "GEOM_Engine.hxx"
8 #include "GEOM_Object.hxx"
9 #include <TDocStd_Document.hxx>
10 #include <TColStd_HSequenceOfAsciiString.hxx>
11 #include <TCollection_HAsciiString.hxx>
12 #include <Resource_Manager.hxx>
13
14 class GEOMImpl_IInsertOperations : public GEOM_IOperations {
15  public:
16   Standard_EXPORT GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID);
17   Standard_EXPORT ~GEOMImpl_IInsertOperations();
18
19
20   Standard_EXPORT Handle(GEOM_Object) MakeCopy (Handle(GEOM_Object) theOriginal);
21
22   Standard_EXPORT Handle(GEOM_Object) Import (const TCollection_AsciiString& theFileName,
23                                               const TCollection_AsciiString& theFormatType);
24
25   Standard_EXPORT void Export (const Handle(GEOM_Object)      theOriginal,
26                                const TCollection_AsciiString& theFileName,
27                                const TCollection_AsciiString& theFormatType);
28
29   Standard_EXPORT Standard_Boolean ImportTranslators (Handle(TColStd_HSequenceOfAsciiString)& theFormats,
30                                                       Handle(TColStd_HSequenceOfAsciiString)& thePatterns);
31
32   Standard_EXPORT Standard_Boolean ExportTranslators (Handle(TColStd_HSequenceOfAsciiString)& theFormats,
33                                                       Handle(TColStd_HSequenceOfAsciiString)& thePatterns);
34
35   Standard_EXPORT Standard_Boolean IsSupported (const Standard_Boolean isImport,
36                                                 const TCollection_AsciiString& theFormat,
37                                                 Handle(TCollection_HAsciiString)& theLibName);
38
39  private:
40   Standard_Boolean InitResMgr ();
41
42  private:
43   Handle(Resource_Manager) myResMgr;
44 };
45
46 #endif