Version: 8.3.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
fileTransfer_i Class Reference

A class to manage file transfer in SALOME. More...

Inheritance diagram for fileTransfer_i:
Inheritance graph

Public Member Functions

 fileTransfer_i ()
 
virtual ~fileTransfer_i ()
 
CORBA::Long open (const char *fileName)
 open the given file More...
 
void close (CORBA::Long fileId)
 close a file More...
 
Engines::fileBlockgetBlock (CORBA::Long fileId)
 get a data block from a file More...
 
CORBA::Long openW (const char *fileName)
 open the given file in write mode (for copy) More...
 
void putBlock (CORBA::Long fileId, const Engines::fileBlock &block)
 put a data block for copy into a file More...
 

Protected Attributes

int _fileKey
 
std::map< int, FILE * > _fileAccess
 
int _ctr
 

Detailed Description

A class to manage file transfer in SALOME.

Constructor & Destructor Documentation

fileTransfer_i::fileTransfer_i ( )

Default constructor,

fileTransfer_i::~fileTransfer_i ( )
virtual

Destructor

Member Function Documentation

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;

Parameters
fileNamepath to the file to be transfered
Returns
fileId = positive integer > 0 if open OK.
void fileTransfer_i::close ( CORBA::Long  fileId)

close a file

CORBA method: close the file associated to the fileId given at open.

Parameters
fileIdgot in return from open method
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.

Parameters
fileIdgot in return from open method
Returns
an octet sequence. Last one is empty.
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;

Parameters
fileNamepath to the file to be transfered
Returns
fileId = positive integer > 0 if open OK.
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.

Parameters
fileIdgot in return from openW method
blockan octet sequence to copy into opened file