1 #ifndef __SALOMEDSIMPL_DRIVER_H__
2 #define __SALOMEDSIMPL_DRIVER_H__
4 #include <TCollection_AsciiString.hxx>
5 #include <SALOMEDSImpl_SComponent.hxx>
6 #include <SALOMEDSImpl_SObject.hxx>
9 class SALOMEDSImpl_Driver
13 virtual TCollection_AsciiString GetIOR() = 0;
15 virtual unsigned char* Save(const Handle(SALOMEDSImpl_SComponent)& theComponent,
16 const TCollection_AsciiString& theURL,
17 long& theStreamLength,
18 bool isMultiFile) = 0;
20 virtual unsigned char* SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent,
21 const TCollection_AsciiString& theURL,
22 long& theStreamLength,
23 bool isMultiFile) = 0;
25 virtual bool Load(const Handle(SALOMEDSImpl_SComponent)& theComponent,
26 const unsigned char* theStream,
27 const long theStreamLength,
28 const TCollection_AsciiString& theURL,
29 bool isMultiFile) = 0;
31 virtual bool LoadASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent,
32 const unsigned char* theStream,
33 const long theStreamLength,
34 const TCollection_AsciiString& theURL,
35 bool isMultiFile) = 0;
37 virtual void Close(const Handle(SALOMEDSImpl_SComponent)& theComponent) = 0;
39 virtual TCollection_AsciiString ComponentDataType() = 0;
42 virtual TCollection_AsciiString IORToLocalPersistentID(const Handle(SALOMEDSImpl_SObject)& theSObject,
43 const TCollection_AsciiString& IORString,
47 virtual TCollection_AsciiString LocalPersistentIDToIOR(const Handle(SALOMEDSImpl_SObject)& theSObject,
48 const TCollection_AsciiString& aLocalPersistentID,
52 virtual bool CanCopy(const Handle(SALOMEDSImpl_SObject)& theObject) = 0;
54 virtual unsigned char* CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject,
56 long& theStreamLength) = 0;
58 virtual bool CanPaste(const TCollection_AsciiString& theComponentName, int theObjectID) = 0;
60 virtual TCollection_AsciiString PasteInto(const unsigned char* theStream,
61 const long theStreamLength,
63 const Handle(SALOMEDSImpl_SObject)& theObject) = 0;
65 virtual unsigned char* DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy,
68 long& theStreamLength) = 0;
71 class SALOMEDSImpl_DriverFactory
75 virtual SALOMEDSImpl_Driver* GetDriverByType(const TCollection_AsciiString& theComponentType) = 0;
77 virtual SALOMEDSImpl_Driver* GetDriverByIOR(const TCollection_AsciiString& theIOR) = 0;