Back to index

salome-geom  6.5.0
GEOMImpl_IInsertOperations.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef _GEOMImpl_IInsertOperations_HXX_
00024 #define _GEOMImpl_IInsertOperations_HXX_
00025 
00026 #include "GEOM_IOperations.hxx"
00027 #include "GEOM_Engine.hxx"
00028 #include "GEOM_Object.hxx"
00029 
00030 #include <Basics_OCCTVersion.hxx>
00031 
00032 #include "Utils_SALOME_Exception.hxx"
00033 
00034 #include <TDocStd_Document.hxx>
00035 #include <TColStd_HSequenceOfAsciiString.hxx>
00036 #include <TCollection_HAsciiString.hxx>
00037 #include <Resource_Manager.hxx>
00038 
00039 #include <list>
00040 
00041 #if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
00042 class Handle_TColStd_HArray1OfByte;
00043 #else
00044 class Handle_TDataStd_HArray1OfByte;
00045 #endif
00046 
00047 class GEOMImpl_IInsertOperations : public GEOM_IOperations {
00048  public:
00049   Standard_EXPORT GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID);
00050   Standard_EXPORT ~GEOMImpl_IInsertOperations();
00051 
00052 
00053   Standard_EXPORT Handle(GEOM_Object) MakeCopy (Handle(GEOM_Object) theOriginal);
00054 
00055   Standard_EXPORT Handle(GEOM_Object) Import (const TCollection_AsciiString& theFileName,
00056                                               const TCollection_AsciiString& theFormatType);
00057 
00058   Standard_EXPORT void Export (const Handle(GEOM_Object)      theOriginal,
00059                                const TCollection_AsciiString& theFileName,
00060                                const TCollection_AsciiString& theFormatType);
00061 
00062   Standard_EXPORT Standard_Boolean ImportTranslators (Handle(TColStd_HSequenceOfAsciiString)& theFormats,
00063                                                       Handle(TColStd_HSequenceOfAsciiString)& thePatterns);
00064 
00065   Standard_EXPORT Standard_Boolean ExportTranslators (Handle(TColStd_HSequenceOfAsciiString)& theFormats,
00066                                                       Handle(TColStd_HSequenceOfAsciiString)& thePatterns);
00067 
00068   Standard_EXPORT Standard_Boolean IsSupported (const Standard_Boolean isImport,
00069                                                 const TCollection_AsciiString& theFormat,
00070                                                 Handle(TCollection_HAsciiString)& theLibName);
00071 
00072   Standard_EXPORT int LoadTexture(const TCollection_AsciiString& theTextureFile);
00073 
00074   Standard_EXPORT int AddTexture(int theWidth, int theHeight,
00075 #if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
00076                                  const Handle(TColStd_HArray1OfByte)& theTexture);
00077 #else
00078                                  const Handle(TDataStd_HArray1OfByte)& theTexture);
00079 #endif
00080 
00081 #if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
00082   Standard_EXPORT Handle(TColStd_HArray1OfByte) GetTexture(int theTextureId,
00083 #else
00084   Standard_EXPORT Handle(TDataStd_HArray1OfByte) GetTexture(int theTextureId,
00085 #endif
00086                                                             int& theWidth, int& theHeight);
00087 
00088   Standard_EXPORT std::list<int> GetAllTextures();
00089 
00090  private:
00091   Standard_Boolean InitResMgr ();
00092 
00093  private:
00094   Handle(Resource_Manager) myResMgr;
00095   Handle(Resource_Manager) myResMgrUser;
00096 };
00097 
00098 #endif