Version: 9.15.0
SALOMEDSImpl_Driver.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2025 CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 
23 #ifndef __SALOMEDSIMPL_DRIVER_H__
24 #define __SALOMEDSIMPL_DRIVER_H__
25 
26 #include "SALOMEDSImpl_Defines.hxx"
27 #include <string>
29 #include "SALOMEDSImpl_SObject.hxx"
30 #include "SALOMEDSImpl_TMPFile.hxx"
31 
32 
34 {
35 public:
36 
37  virtual ~SALOMEDSImpl_Driver() {};
38 
39  virtual std::string GetIOR() = 0;
40 
41  virtual SALOMEDSImpl_TMPFile* Save(const SALOMEDSImpl_SComponent& theComponent,
42  const std::string& theURL,
43  long& theStreamLength,
44  bool isMultiFile) = 0;
45 
47  const std::string& theURL,
48  long& theStreamLength,
49  bool isMultiFile) = 0;
50 
51  virtual bool Load(const SALOMEDSImpl_SComponent& theComponent,
52  const unsigned char* theStream,
53  const long theStreamLength,
54  const std::string& theURL,
55  bool isMultiFile) = 0;
56 
57  virtual bool LoadASCII(const SALOMEDSImpl_SComponent& theComponent,
58  const unsigned char* theStream,
59  const long theStreamLength,
60  const std::string& theURL,
61  bool isMultiFile) = 0;
62 
63  virtual void Close(const SALOMEDSImpl_SComponent& theComponent) = 0;
64 
65  virtual std::string ComponentDataType() = 0;
66 
67  virtual std::string Version() = 0;
68 
69  virtual std::string IORToLocalPersistentID(const SALOMEDSImpl_SObject& theSObject,
70  const std::string& IORString,
71  bool isMultiFile,
72  bool isASCII) = 0;
73 
74  virtual std::string LocalPersistentIDToIOR(const SALOMEDSImpl_SObject& theSObject,
75  const std::string& aLocalPersistentID,
76  bool isMultiFile,
77  bool isASCII) = 0;
78 
79  virtual bool CanCopy(const SALOMEDSImpl_SObject& theObject) = 0;
80 
82  int& theObjectID,
83  long& theStreamLength) = 0;
84 
85  virtual bool CanPaste(const std::string& theComponentName, int theObjectID) = 0;
86 
87  virtual std::string PasteInto(const unsigned char* theStream,
88  const long theStreamLength,
89  int theObjectID,
90  const SALOMEDSImpl_SObject& theObject) = 0;
91 
92  virtual SALOMEDSImpl_TMPFile* DumpPython(bool isPublished,
93  bool isMultiFile,
94  bool& isValidScript,
95  long& theStreamLength) = 0;
96 };
97 
99 {
100 public:
101 
102  virtual SALOMEDSImpl_Driver* GetDriverByType(const std::string& theComponentType) = 0;
103 
104  virtual SALOMEDSImpl_Driver* GetDriverByIOR(const std::string& theIOR) = 0;
105 };
106 
107 #endif
#define SALOMEDSIMPL_EXPORT
Definition: SALOMEDSImpl_Defines.hxx:34
Definition: SALOMEDSImpl_Driver.hxx:99
virtual SALOMEDSImpl_Driver * GetDriverByIOR(const std::string &theIOR)=0
virtual SALOMEDSImpl_Driver * GetDriverByType(const std::string &theComponentType)=0
Definition: SALOMEDSImpl_Driver.hxx:34
virtual bool LoadASCII(const SALOMEDSImpl_SComponent &theComponent, const unsigned char *theStream, const long theStreamLength, const std::string &theURL, bool isMultiFile)=0
virtual std::string IORToLocalPersistentID(const SALOMEDSImpl_SObject &theSObject, const std::string &IORString, bool isMultiFile, bool isASCII)=0
virtual std::string Version()=0
virtual SALOMEDSImpl_TMPFile * SaveASCII(const SALOMEDSImpl_SComponent &theComponent, const std::string &theURL, long &theStreamLength, bool isMultiFile)=0
virtual SALOMEDSImpl_TMPFile * DumpPython(bool isPublished, bool isMultiFile, bool &isValidScript, long &theStreamLength)=0
virtual std::string GetIOR()=0
virtual std::string ComponentDataType()=0
virtual std::string PasteInto(const unsigned char *theStream, const long theStreamLength, int theObjectID, const SALOMEDSImpl_SObject &theObject)=0
virtual bool CanPaste(const std::string &theComponentName, int theObjectID)=0
virtual void Close(const SALOMEDSImpl_SComponent &theComponent)=0
virtual std::string LocalPersistentIDToIOR(const SALOMEDSImpl_SObject &theSObject, const std::string &aLocalPersistentID, bool isMultiFile, bool isASCII)=0
virtual ~SALOMEDSImpl_Driver()
Definition: SALOMEDSImpl_Driver.hxx:37
virtual bool Load(const SALOMEDSImpl_SComponent &theComponent, const unsigned char *theStream, const long theStreamLength, const std::string &theURL, bool isMultiFile)=0
virtual SALOMEDSImpl_TMPFile * CopyFrom(const SALOMEDSImpl_SObject &theObject, int &theObjectID, long &theStreamLength)=0
virtual SALOMEDSImpl_TMPFile * Save(const SALOMEDSImpl_SComponent &theComponent, const std::string &theURL, long &theStreamLength, bool isMultiFile)=0
virtual bool CanCopy(const SALOMEDSImpl_SObject &theObject)=0
Definition: SALOMEDSImpl_SComponent.hxx:44
Definition: SALOMEDSImpl_SObject.hxx:41
Definition: SALOMEDSImpl_TMPFile.hxx:31