Version: 9.16.0
SALOMEDS_Driver_i.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 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 __SALOMEDS_DRIVER_I_H__
24#define __SALOMEDS_DRIVER_I_H__
25
26#include <SALOMEconfig.h>
27
28#include <omniORB4/CORBA.h>
32
33#include CORBA_SERVER_HEADER(SALOMEDS)
34#include CORBA_SERVER_HEADER(SALOME_Component)
35
37{
38protected:
39 SALOMEDS::Driver_var _driver;
40 Engines::EngineComponent_var _engine;
41 CORBA::ORB_var _orb;
42
43public:
44 SALOMEDS_Driver_i(Engines::EngineComponent_ptr theEngine, CORBA::ORB_ptr theORB);
45 SALOMEDS_Driver_i(SALOMEDS::Driver_ptr theDriver, CORBA::ORB_ptr theORB);
47
48 virtual std::string GetIOR();
49
50 virtual SALOMEDSImpl_TMPFile* Save(const SALOMEDSImpl_SComponent& theComponent,
51 const std::string& theURL,
52 long& theStreamLength,
53 bool isMultiFile);
54
55 virtual SALOMEDSImpl_TMPFile* SaveASCII(const SALOMEDSImpl_SComponent& theComponent,
56 const std::string& theURL,
57 long& theStreamLength,
58 bool isMultiFile);
59
60 virtual bool Load(const SALOMEDSImpl_SComponent& theComponent,
61 const unsigned char* theStream,
62 const long theStreamLength,
63 const std::string& theURL,
64 bool isMultiFile);
65
66 virtual bool LoadASCII(const SALOMEDSImpl_SComponent& theComponent,
67 const unsigned char* theStream,
68 const long theStreamLength,
69 const std::string& theURL,
70 bool isMultiFile);
71
72 virtual void Close(const SALOMEDSImpl_SComponent& theComponent);
73
74 virtual std::string ComponentDataType();
75
76 virtual std::string Version();
77
78 virtual std::string IORToLocalPersistentID(const SALOMEDSImpl_SObject& theSObject,
79 const std::string& IORString,
80 bool isMultiFile,
81 bool isASCII);
82
83 virtual std::string LocalPersistentIDToIOR(const SALOMEDSImpl_SObject& theSObject,
84 const std::string& aLocalPersistentID,
85 bool isMultiFile,
86 bool isASCII);
87
88 virtual bool CanCopy(const SALOMEDSImpl_SObject& theObject);
89
90 virtual SALOMEDSImpl_TMPFile* CopyFrom(const SALOMEDSImpl_SObject& theObject,
91 int& theObjectID,
92 long& theStreamLength);
93
94 virtual bool CanPaste(const std::string& theComponentName, int theObjectID);
95
96 virtual std::string PasteInto(const unsigned char* theStream,
97 const long theStreamLength,
98 int theObjectID,
99 const SALOMEDSImpl_SObject& theObject);
100
101 virtual SALOMEDSImpl_TMPFile* DumpPython(bool isPublished,
102 bool isMultiFile,
103 bool& isValidScript,
104 long& theStreamLength);
105};
106
109
111{
112protected:
113 CORBA::ORB_var _orb;
115
116public:
117
118 SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB, bool isNSAvail = true);
119
121
123
125
126 virtual SALOMEDSImpl_Driver* GetDriverByType(const std::string& theComponentType);
127
128 virtual SALOMEDSImpl_Driver* GetDriverByIOR(const std::string& theIOR);
129};
130
131#endif
#define Standard_EXPORT
Definition: DF_definitions.hxx:53
Definition: SALOMEDSImpl_Driver.hxx:99
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 std::string GetIOR()=0
virtual std::string ComponentDataType()=0
virtual SALOMEDSImpl_TMPFile * CopyFrom(const SALOMEDSImpl_SObject &theObject, int &theObjectID, long &theStreamLength)=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 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 LocalPersistentIDToIOR(const SALOMEDSImpl_SObject &theSObject, const std::string &aLocalPersistentID, bool isMultiFile, bool isASCII)=0
virtual bool Load(const SALOMEDSImpl_SComponent &theComponent, const unsigned char *theStream, const long theStreamLength, const std::string &theURL, bool isMultiFile)=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: SALOMEDS_Driver_i.hxx:111
virtual SALOMEDSImpl_Driver * GetDriverByType(const std::string &theComponentType)
Definition: SALOMEDS_Driver_i.cxx:367
SALOME_NamingService_Abstract * getNS() const
Definition: SALOMEDS_Driver_i.hxx:122
virtual ~SALOMEDS_DriverFactory_i()
Definition: SALOMEDS_Driver_i.cxx:362
virtual SALOMEDSImpl_Driver * GetDriverByIOR(const std::string &theIOR)
Definition: SALOMEDS_Driver_i.cxx:397
SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB, bool isNSAvail=true)
Definition: SALOMEDS_Driver_i.cxx:351
SALOME_NamingService_Abstract * _name_service
Definition: SALOMEDS_Driver_i.hxx:114
CORBA::ORB_var _orb
Definition: SALOMEDS_Driver_i.hxx:113
Definition: SALOMEDS_Driver_i.hxx:37
SALOMEDS::Driver_var _driver
Definition: SALOMEDS_Driver_i.hxx:39
CORBA::ORB_var _orb
Definition: SALOMEDS_Driver_i.hxx:41
Engines::EngineComponent_var _engine
Definition: SALOMEDS_Driver_i.hxx:40
Definition: SALOME_NamingService_Abstract.hxx:46
Definition: SALOMEDSImpl_TMPFile.hxx:31