CORBA::String_var url = CORBA::string_dup(theURL.ToCString());
SALOMEDS::unlock();
aStream = _driver->Save(sco.in(), url, isMultiFile);
- SALOMEDS::lock();
theStreamLength = aStream->length();
unsigned char* aRetStream = NULL;
if(theStreamLength > 0) {
CORBA::String_var url = CORBA::string_dup(theURL.ToCString());
SALOMEDS::unlock();
aStream = _driver->SaveASCII(sco.in(), url, isMultiFile);
- SALOMEDS::lock();
theStreamLength = aStream->length();
unsigned char* aRetStream = NULL;
if(theStreamLength > 0) {
SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb);
SALOMEDS::unlock();
_driver->Close(sco.in());
- SALOMEDS::lock();
}
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);
}
CORBA::String_var pers_string = CORBA::string_dup(aLocalPersistentID.ToCString());
SALOMEDS::unlock();
CORBA::String_var IOR =_driver->LocalPersistentIDToIOR(so.in(), pers_string.in(), isMultiFile, isASCII);
- SALOMEDS::lock();
return TCollection_AsciiString(IOR);
}
return _driver->CanCopy(so.in());
}
-/*
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-*/
unsigned char* SALOMEDS_Driver_i::CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject,
int& theObjectID,
SALOMEDS::unlock();
aStream = _driver->CopyFrom(so.in(), anObjectID);
- SALOMEDS::lock();
theObjectID = anObjectID;
theStreamLength = aStream->length();
memcpy(aRetStream, aStream->NP_data(), theStreamLength);
}
-/*
- int fd = open("/dn05/salome/srn/sh_copy.brep", O_CREAT | O_WRONLY);
- cout << "Written " << write(fd, (char*)aRetStream, theStreamLength) << endl;
- close(fd);
-*/
return aRetStream;
}