SALOME documentation central

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
void close (CORBA::Long fileId)
 close a file
Engines::fileBlockgetBlock (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

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

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.

Parameters:
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.

Parameters:
fileId got in return from open method
Returns:
an octet sequence. Last one is empty.

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;

Parameters:
fileName path 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:
fileId got in return from openW method
block an octet sequence to copy into opened file

Copyright © 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS