SALOMEDS_AttributeTextColor.cxx \
SALOMEDS_AttributeTextHighlightColor.cxx \
SALOMEDS_AttributeTreeNode.cxx \
- SALOMEDS_AttributeUserID.cxx
-
+ SALOMEDS_AttributeUserID.cxx \
+ SALOMEDS_TMPFile_i.cxx
# Executables targets
BIN = SALOMEDS_Server SALOMEDS_Client
#include "SALOMEDS_Driver_i.hxx"
+#include <SALOMEDS_TMPFile_i.hxx>
#include "utilities.h"
#include "SALOMEDS_SObject_i.hxx"
#include "SALOMEDS_SComponent_i.hxx"
{
}
-unsigned char* SALOMEDS_Driver_i::Save(const Handle(SALOMEDSImpl_SComponent)& theComponent,
- const TCollection_AsciiString& theURL,
- long& theStreamLength,
- bool isMultiFile)
+Handle(SALOMEDSImpl_TMPFile) SALOMEDS_Driver_i::Save(const Handle(SALOMEDSImpl_SComponent)& theComponent,
+ const TCollection_AsciiString& theURL,
+ long& theStreamLength,
+ bool isMultiFile)
{
SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb);
- SALOMEDS::TMPFile_var aStream;
CORBA::String_var url = CORBA::string_dup(theURL.ToCString());
+
SALOMEDS::unlock();
- aStream = _driver->Save(sco.in(), url, isMultiFile);
+ SALOMEDS::TMPFile_var aStream = _driver->Save(sco.in(), url, isMultiFile);
+ Handle(SALOMEDSImpl_TMPFile) aTMPFile(new SALOMEDS_TMPFile_i(aStream._retn()));
+ theStreamLength = aTMPFile->Size();
SALOMEDS::lock();
- theStreamLength = aStream->length();
- unsigned char* aRetStream = NULL;
- if (theStreamLength > 0) {
- aRetStream = new unsigned char[theStreamLength];
- memcpy(aRetStream, aStream->NP_data(), theStreamLength);
- }
- return aRetStream;
+
+ return aTMPFile;
}
-unsigned char* SALOMEDS_Driver_i::SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent,
- const TCollection_AsciiString& theURL,
- long& theStreamLength,
- bool isMultiFile)
+Handle(SALOMEDSImpl_TMPFile) SALOMEDS_Driver_i::SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent,
+ const TCollection_AsciiString& theURL,
+ long& theStreamLength,
+ bool isMultiFile)
{
SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb);
- SALOMEDS::TMPFile_var aStream;
CORBA::String_var url = CORBA::string_dup(theURL.ToCString());
+
SALOMEDS::unlock();
- aStream = _driver->SaveASCII(sco.in(), url, isMultiFile);
+ SALOMEDS::TMPFile_var aStream = _driver->SaveASCII(sco.in(), url, isMultiFile);
+ Handle(SALOMEDSImpl_TMPFile) aTMPFile(new SALOMEDS_TMPFile_i(aStream._retn()));
+ theStreamLength = aTMPFile->Size();
SALOMEDS::lock();
- theStreamLength = aStream->length();
- unsigned char* aRetStream = NULL;
- if (theStreamLength > 0) {
- aRetStream = new unsigned char[theStreamLength];
- memcpy(aRetStream, aStream->NP_data(), theStreamLength);
- }
- return aRetStream;
+
+ return aTMPFile;
}
bool SALOMEDS_Driver_i::Load(const Handle(SALOMEDSImpl_SComponent)& theComponent,
SALOMEDS::unlock();
bool isOk = _driver->Load(sco.in(), aStream.in(), url, isMultiFile);
SALOMEDS::lock();
+
return isOk;
}
SALOMEDS::unlock();
bool isOk = _driver->LoadASCII(sco.in(), aStream.in(), url, isMultiFile);
SALOMEDS::lock();
+
return isOk;
}
void SALOMEDS_Driver_i::Close(const Handle(SALOMEDSImpl_SComponent)& theComponent)
{
SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb);
+
SALOMEDS::unlock();
_driver->Close(sco.in());
SALOMEDS::lock();
{
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theSObject, _orb);
CORBA::String_var ior = CORBA::string_dup(IORString.ToCString());
+
SALOMEDS::unlock();
CORBA::String_var pers_string =_driver->IORToLocalPersistentID(so.in(), ior.in(), isMultiFile, isASCII);
SALOMEDS::lock();
+
return TCollection_AsciiString(pers_string);
}
bool SALOMEDS_Driver_i::CanCopy(const Handle(SALOMEDSImpl_SObject)& theObject)
{
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theObject, _orb);
+
SALOMEDS::unlock();
bool isOk = _driver->CanCopy(so.in());
SALOMEDS::lock();
+
return isOk;
}
-unsigned char* SALOMEDS_Driver_i::CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject,
- int& theObjectID,
- long& theStreamLength)
+Handle(SALOMEDSImpl_TMPFile) SALOMEDS_Driver_i::CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject,
+ int& theObjectID,
+ long& theStreamLength)
{
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theObject, _orb);
- SALOMEDS::TMPFile_var aStream;
- CORBA::Long anObjectID;
SALOMEDS::unlock();
- aStream = _driver->CopyFrom(so.in(), anObjectID);
- SALOMEDS::lock();
-
+ CORBA::Long anObjectID;
+ SALOMEDS::TMPFile_var aStream = _driver->CopyFrom(so.in(), anObjectID);
+ Handle(SALOMEDSImpl_TMPFile) aTMPFile(new SALOMEDS_TMPFile_i(aStream._retn()));
+ theStreamLength = aTMPFile->Size();
theObjectID = anObjectID;
- theStreamLength = aStream->length();
-
- unsigned char* aRetStream = NULL;
- if(theStreamLength > 0) {
- aRetStream = new unsigned char[theStreamLength];
- memcpy(aRetStream, aStream->NP_data(), theStreamLength);
- }
+ SALOMEDS::lock();
- return aRetStream;
+ return aTMPFile;
}
bool SALOMEDS_Driver_i::CanPaste(const TCollection_AsciiString& theComponentName, int theObjectID)
return TCollection_AsciiString((char*)ret_so->GetID());
}
-unsigned char* SALOMEDS_Driver_i::DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy,
- bool isPublished,
- bool& isValidScript,
- long& theStreamLength)
+Handle(SALOMEDSImpl_TMPFile) SALOMEDS_Driver_i::DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy,
+ bool isPublished,
+ bool& isValidScript,
+ long& theStreamLength)
{
SALOMEDS_Study_i * st_servant = new SALOMEDS_Study_i (theStudy, _orb);
SALOMEDS::Study_var st = SALOMEDS::Study::_narrow(st_servant->_this());
- Engines::TMPFile_var aStream;
- CORBA::Boolean aValidScript, aPublished;
- aPublished = isPublished;
Engines::Component_ptr aComponent = Engines::Component::_narrow(_driver);
+
SALOMEDS::unlock();
- aStream = aComponent->DumpPython(st.in(), aPublished, aValidScript);
- SALOMEDS::lock();
+ CORBA::Boolean aValidScript, aPublished = isPublished;
+ Engines::TMPFile_var aStream = aComponent->DumpPython(st.in(), aPublished, aValidScript);
+ Handle(SALOMEDSImpl_TMPFile) aTMPFile(new Engines_TMPFile_i(aStream._retn()));
+ theStreamLength = aTMPFile->Size();
isValidScript = aValidScript;
- theStreamLength = aStream->length();
- unsigned char* aRetStream = NULL;
-
- if(theStreamLength > 0) {
- aRetStream = new unsigned char[theStreamLength];
- memcpy(aRetStream, aStream->NP_data(), theStreamLength);
- }
+ SALOMEDS::lock();
- return aRetStream;
+ return aTMPFile;
}
//###############################################################################################################
return TCollection_AsciiString(ior);
}
- virtual unsigned char* Save(const Handle(SALOMEDSImpl_SComponent)& theComponent,
- const TCollection_AsciiString& theURL,
- long& theStreamLength,
- bool isMultiFile);
-
- virtual unsigned char* SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent,
- const TCollection_AsciiString& theURL,
- long& theStreamLength,
- bool isMultiFile);
+ virtual Handle(SALOMEDSImpl_TMPFile) Save(const Handle(SALOMEDSImpl_SComponent)& theComponent,
+ const TCollection_AsciiString& theURL,
+ long& theStreamLength,
+ bool isMultiFile);
+
+ virtual Handle(SALOMEDSImpl_TMPFile) SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent,
+ const TCollection_AsciiString& theURL,
+ long& theStreamLength,
+ bool isMultiFile);
virtual bool Load(const Handle(SALOMEDSImpl_SComponent)& theComponent,
const unsigned char* theStream,
virtual bool CanCopy(const Handle(SALOMEDSImpl_SObject)& theObject);
- virtual unsigned char* CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject,
- int& theObjectID,
- long& theStreamLength);
-
+ virtual Handle(SALOMEDSImpl_TMPFile) CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject,
+ int& theObjectID,
+ long& theStreamLength);
+
virtual bool CanPaste(const TCollection_AsciiString& theComponentName, int theObjectID);
virtual TCollection_AsciiString PasteInto(const unsigned char* theStream,
int theObjectID,
const Handle(SALOMEDSImpl_SObject)& theObject);
- virtual unsigned char* DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy,
- bool isPublished,
- bool& isValidScript,
- long& theStreamLength);
+ virtual Handle(SALOMEDSImpl_TMPFile) DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy,
+ bool isPublished,
+ bool& isValidScript,
+ long& theStreamLength);
};
#include "SALOME_NamingService.hxx"
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/
+//
+// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
+// File : SALOMEDSImpl_SObject.cxx
+// Author : Sergey RUIN
+// Module : SALOME
+
+
+#include "SALOMEDS_TMPFile_i.hxx"
+
+#include <Handle_Standard_Type.hxx>
+#include <Standard_Transient.hxx>
+
+#include <stdexcept>
+
+
+IMPLEMENT_STANDARD_HANDLE( SALOMEDS_TMPFile_i, SALOMEDSImpl_TMPFile )
+IMPLEMENT_STANDARD_RTTIEXT( SALOMEDS_TMPFile_i, SALOMEDSImpl_TMPFile )
+
+SALOMEDS_TMPFile_i
+::SALOMEDS_TMPFile_i(SALOMEDS::TMPFile* theStream):
+ myStream(theStream)
+{}
+
+size_t
+SALOMEDS_TMPFile_i
+::Size()
+{
+ if(&myStream.in())
+ return 0;
+
+ return myStream->length();
+}
+
+SALOMEDSImpl_TMPFile::TOctet&
+SALOMEDS_TMPFile_i
+::Get(size_t theIndex)
+{
+ if(&myStream.in())
+ throw std::out_of_range("SALOMEDS_TMPFile_i::Get(size_t) const - &myStream.in()");
+
+ if(theIndex < 0 || theIndex >= myStream->length())
+ throw std::out_of_range("SALOMEDS_TMPFile_i::Get(size_t) const - theIndex < 0 || theIndex >= myStream->length()");
+
+ return myStream[theIndex];
+}
+
+
+//-----------------------------------------------------------------------------
+IMPLEMENT_STANDARD_HANDLE( Engines_TMPFile_i, SALOMEDSImpl_TMPFile )
+IMPLEMENT_STANDARD_RTTIEXT( Engines_TMPFile_i, SALOMEDSImpl_TMPFile )
+
+Engines_TMPFile_i
+::Engines_TMPFile_i(Engines::TMPFile* theStream):
+ myStream(theStream)
+{}
+
+size_t
+Engines_TMPFile_i
+::Size()
+{
+ if(&myStream.in())
+ return 0;
+
+ return myStream->length();
+}
+
+SALOMEDSImpl_TMPFile::TOctet&
+Engines_TMPFile_i
+::Get(size_t theIndex)
+{
+ if(&myStream.in())
+ throw std::out_of_range("Engines_TMPFile_i::Get(size_t) const - &myStream.in()");
+
+ if(theIndex < 0 || theIndex >= myStream->length())
+ throw std::out_of_range("Engines_TMPFile_i::Get(size_t) const - theIndex < 0 || theIndex >= myStream->length()");
+
+ return myStream[theIndex];
+}
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/
+//
+
+#ifndef __SALOMEDSIMPL_TMPFILE_I_H__
+#define __SALOMEDSIMPL_TMPFILE_I_H__
+
+// IDL headers
+#include "SALOMEconfig.h"
+#include CORBA_SERVER_HEADER(SALOMEDS)
+#include CORBA_SERVER_HEADER(SALOME_Component)
+
+#include "SALOMEDSImpl_TMPFile.hxx"
+
+
+//-----------------------------------------------------------------------------
+DEFINE_STANDARD_HANDLE( SALOMEDS_TMPFile_i, SALOMEDSImpl_TMPFile );
+
+class SALOMEDS_TMPFile_i : public SALOMEDSImpl_TMPFile
+{
+public:
+ SALOMEDS_TMPFile_i(SALOMEDS::TMPFile* theStream);
+
+ virtual size_t Size();
+
+ virtual TOctet& Get(size_t);
+
+ DEFINE_STANDARD_RTTI( SALOMEDS_TMPFile_i );
+
+protected:
+ SALOMEDS::TMPFile_var myStream;
+};
+
+
+//-----------------------------------------------------------------------------
+DEFINE_STANDARD_HANDLE( Engines_TMPFile_i, SALOMEDSImpl_TMPFile );
+
+class Engines_TMPFile_i : public SALOMEDSImpl_TMPFile
+{
+public:
+ Engines_TMPFile_i(Engines::TMPFile* theStream);
+
+ virtual size_t Size();
+
+ virtual TOctet& Get(size_t);
+
+ DEFINE_STANDARD_RTTI( Engines_TMPFile_i );
+
+protected:
+ Engines::TMPFile_var myStream;
+};
+
+
+#endif
SALOMEDSImpl_StudyManager.hxx \
SALOMEDSImpl_OCAFApplication.hxx \
SALOMEDSImpl_ChildNodeIterator.hxx \
+ SALOMEDSImpl_TMPFile.hxx
LIB_CLIENT_IDL =
LIB_SERVER_IDL =
SALOMEDSImpl_SComponentIterator.cxx \
SALOMEDSImpl_StudyBuilder.cxx \
SALOMEDSImpl_Study.cxx \
- SALOMEDSImpl_StudyManager.cxx
+ SALOMEDSImpl_StudyManager.cxx \
+ SALOMEDSImpl_TMPFile.cxx
#include <TCollection_AsciiString.hxx>
#include <SALOMEDSImpl_SComponent.hxx>
#include <SALOMEDSImpl_SObject.hxx>
+#include <SALOMEDSImpl_TMPFile.hxx>
class SALOMEDSImpl_Driver
virtual TCollection_AsciiString GetIOR() = 0;
- virtual unsigned char* Save(const Handle(SALOMEDSImpl_SComponent)& theComponent,
- const TCollection_AsciiString& theURL,
- long& theStreamLength,
- bool isMultiFile) = 0;
+ virtual Handle(SALOMEDSImpl_TMPFile) Save(const Handle(SALOMEDSImpl_SComponent)& theComponent,
+ const TCollection_AsciiString& theURL,
+ long& theStreamLength,
+ bool isMultiFile) = 0;
- virtual unsigned char* SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent,
- const TCollection_AsciiString& theURL,
- long& theStreamLength,
- bool isMultiFile) = 0;
+ virtual Handle(SALOMEDSImpl_TMPFile) SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent,
+ const TCollection_AsciiString& theURL,
+ long& theStreamLength,
+ bool isMultiFile) = 0;
virtual bool Load(const Handle(SALOMEDSImpl_SComponent)& theComponent,
const unsigned char* theStream,
virtual bool CanCopy(const Handle(SALOMEDSImpl_SObject)& theObject) = 0;
- virtual unsigned char* CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject,
- int& theObjectID,
- long& theStreamLength) = 0;
-
+ virtual Handle(SALOMEDSImpl_TMPFile) CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject,
+ int& theObjectID,
+ long& theStreamLength) = 0;
+
virtual bool CanPaste(const TCollection_AsciiString& theComponentName, int theObjectID) = 0;
virtual TCollection_AsciiString PasteInto(const unsigned char* theStream,
int theObjectID,
const Handle(SALOMEDSImpl_SObject)& theObject) = 0;
- virtual unsigned char* DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy,
- bool isPublished,
- bool& isValidScript,
- long& theStreamLength) = 0;
+ virtual Handle(SALOMEDSImpl_TMPFile) DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy,
+ bool isPublished,
+ bool& isValidScript,
+ long& theStreamLength) = 0;
};
class SALOMEDSImpl_DriverFactory
bool isValidScript;
long aStreamLength = 0;
- unsigned char* aStream = aDriver->DumpPython(this, isPublished, isValidScript, aStreamLength);
+ Handle(SALOMEDSImpl_TMPFile) aStream = aDriver->DumpPython(this, isPublished, isValidScript, aStreamLength);
if ( !isValidScript )
isOk = false;
}
//Output the Python script generated by the component in the newly created file.
- fp2 << aStream;
+ fp2 << aStream->Data();
fp2.close();
- if (aStream != NULL) delete [] aStream;
-
//Add to the main script a call to RebuildData of the generated by the component the Python script
fp << "import " << aScriptName << endl;
fp << aScriptName << ".RebuildData(" << aBatchModeScript << ".myStudy)" << endl;
if (Engine != NULL)
{
- unsigned char* aStream;
+ Handle(SALOMEDSImpl_TMPFile) aStream;
long length;
if (theASCII) aStream = Engine->SaveASCII(sco,
HDFdataset *hdf_dataset = new HDFdataset("FILE_STREAM", hdf_sco_group, HDF_STRING, aHDFSize, 1);
hdf_dataset->CreateOnDisk();
- hdf_dataset->WriteOnDisk(aStream); //Save the stream in the HDF file
+ hdf_dataset->WriteOnDisk(aStream->Data()); //Save the stream in the HDF file
hdf_dataset->CloseOnDisk();
}
hdf_dataset=0; //will be deleted by hdf_sco_AuxFiles destructor
// Creation of the persistance reference attribute
Translate_IOR_to_persistentID (sco, Engine, theMultiFile, theASCII);
-
- if(aStream != NULL) delete [] aStream;
}
}
hdf_sco_group->CloseOnDisk();
Handle(SALOMEDSImpl_SObject) aSO = theSourceStudy->FindObjectID(anEntry.ToCString());
int anObjID;
long aLen;
- unsigned char* aStream = theEngine->CopyFrom(aSO, anObjID, aLen);
+ Handle(SALOMEDSImpl_TMPFile) aStream = theEngine->CopyFrom(aSO, anObjID, aLen);
TCollection_ExtendedString aResStr("");
for(a = 0; a < aLen; a++) {
- aResStr += TCollection_ExtendedString(ToExtCharacter((Standard_Character)aStream[a]));
+ aResStr += TCollection_ExtendedString(ToExtCharacter(Standard_Character(aStream->Get(a))));
}
- if(aStream != NULL) delete [] aStream;
SALOMEDSImpl_AttributeInteger::Set(aAuxTargetLabel, anObjID);
SALOMEDSImpl_AttributeName::Set(aAuxTargetLabel, aResStr);
continue;
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/
+//
+// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
+// File : SALOMEDSImpl_SObject.cxx
+// Author : Sergey RUIN
+// Module : SALOME
+
+
+#include "SALOMEDSImpl_TMPFile.hxx"
+
+#include <Handle_Standard_Type.hxx>
+#include <Standard_Transient.hxx>
+
+
+IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_TMPFile, MMgt_TShared )
+IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_TMPFile, MMgt_TShared )
+
+SALOMEDSImpl_TMPFile::TOctet*
+SALOMEDSImpl_TMPFile
+::Data()
+{
+ return &Get(0);
+}
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/
+//
+
+#ifndef __SALOMEDSIMPL_TMPFILE_H__
+#define __SALOMEDSIMPL_TMPFILE_H__
+
+//Handle definition
+#include <MMgt_TShared.hxx>
+#include <Handle_MMgt_TShared.hxx>
+#include <Standard_DefineHandle.hxx>
+
+
+DEFINE_STANDARD_HANDLE( SALOMEDSImpl_TMPFile, MMgt_TShared );
+
+
+struct SALOMEDSImpl_TMPFile : public MMgt_TShared
+{
+ typedef unsigned char TOctet;
+
+ virtual size_t Size() = 0;
+
+ virtual TOctet* Data();
+
+ virtual TOctet& Get(size_t) = 0;
+
+ DEFINE_STANDARD_RTTI( SALOMEDSImpl_TMPFile );
+};
+
+
+#endif