A class to manage file transfer in SALOME. More...
Public Member Functions | |
fileTransfer_i () | |
virtual | ~fileTransfer_i () |
CORBA::Long | open (const char *fileName) |
open the given file | |
void | close (CORBA::Long fileId) |
close a file | |
Engines::fileBlock * | getBlock (CORBA::Long fileId) |
get a data block from a file | |
CORBA::Long | openW (const char *fileName) |
open the given file in write mode (for copy) | |
void | putBlock (CORBA::Long fileId, const Engines::fileBlock &block) |
put a data block for copy into a file | |
Protected Attributes | |
int | _fileKey |
std::map< int, FILE * > | _fileAccess |
int | _ctr |
A class to manage file transfer in SALOME.
fileTransfer_i::fileTransfer_i | ( | ) |
Default constructor,
fileTransfer_i::~fileTransfer_i | ( | ) | [virtual] |
Destructor
CORBA::Long fileTransfer_i::open | ( | const char * | fileName | ) |
open the given file
CORBA method: try to open the file. If the file is readable, return a positive integer else return 0;
fileName | path to the file to be transfered |
Reimplemented in Salome_file_i.
void fileTransfer_i::close | ( | CORBA::Long | fileId | ) |
close a file
CORBA method: close the file associated to the fileId given at open.
fileId | got in return from open method |
Reimplemented in Salome_file_i.
Engines::fileBlock * fileTransfer_i::getBlock | ( | CORBA::Long | fileId | ) |
get a data block from a file
CORBA method: get a block of data from the file associated to the fileId given at open.
fileId | got in return from open method |
Reimplemented in Salome_file_i.
CORBA::Long fileTransfer_i::openW | ( | const char * | fileName | ) |
open the given file in write mode (for copy)
CORBA method: try to open the file. If the file is writable, return a positive integer else return 0;
fileName | path to the file to be transfered |
void fileTransfer_i::putBlock | ( | CORBA::Long | fileId, | |
const Engines::fileBlock & | block | |||
) |
put a data block for copy into a file
CORBA method: put a block of data into the file associated to the fileId given at openW.
fileId | got in return from openW method | |
block | an octet sequence to copy into opened file |