SALOME documentation central

Engines::Parallel_Salome_file Interface Reference

Interface of a Parallel_Salome_file This interface is used by parallel components and containers. It adds methods to enable to choose on which node of the parallel component the file has to be received. More...

Inheritance diagram for Engines::Parallel_Salome_file:
Inheritance graph

Public Member Functions

void setFileNode (in string file_name, in long node_nbr) raises (SALOME::SALOME_Exception)
long getFileNode (in string file_name) raises (SALOME::SALOME_Exception)
Engines::Container updateFile (in Engines::file new_file)
void recvFiles_node () raises (SALOME::SALOME_Exception)
void load (in string hdf5_file) raises (SALOME::SALOME_Exception)
 Load a Salome_file from a hdf5 file.
void save (in string hdf5_file) raises (SALOME::SALOME_Exception)
 Save a Salome_file into a hdf5_file.
void save_all (in string hdf5_file) raises (SALOME::SALOME_Exception)
 Save a Salome_file into a hdf5_file.
void setLocalFile (in string comp_file_name) raises (SALOME::SALOME_Exception)
 Add a Local file to the Salome_file.
void setDistributedFile (in string comp_file_name) raises (SALOME::SALOME_Exception)
 Add a Distributed file to the Salome_file.
void connect (in Engines::Salome_file source_Salome_file) raises (SALOME::SALOME_Exception)
 Connect a Salome_file with another Salome_file.
void connectDistributedFile (in string file_name, in Engines::Salome_file source_Salome_file) raises (SALOME::SALOME_Exception)
 Connect the managed file file_name to a Salome_file.
void setDistributedSourceFile (in string file_name, in string source_file_name) raises (SALOME::SALOME_Exception)
 Connect the file_name with a Distributed file_name.
void recvFiles () raises (SALOME::SALOME_Exception)
 Get all the distributed files managed by the Salome_file and check all the local files.
void removeFile (in string file_name) raises (SALOME::SALOME_Exception)
 Remove a file of the Salome_file.
void removeFiles ()
 Remove all the files of the Salome_file.
Engines::files getFilesInfos ()
 Get the list of the files managed by the Salome_file.
Engines::file getFileInfos (in string file_name) raises (SALOME::SALOME_Exception)
 Get a file managed by the Salome_file.
Engines::SfState getSalome_fileState ()
 Return the state of the Salome_file.
void setContainer (in Engines::Container container)
 Set the container where files are.
long open (in string fileName)
 Open the file transfer.
long openW (in string fileName)
 Open the file transfer in write mode for file fileName.
void close (in long fileId)
 Close the file transfer.
fileBlock getBlock (in long fileId)
 Get a file data block.
void putBlock (in long fileId, in fileBlock block)
 Put a file data block.

Detailed Description

Interface of a Parallel_Salome_file This interface is used by parallel components and containers. It adds methods to enable to choose on which node of the parallel component the file has to be received.


Member Function Documentation

void Engines::Parallel_Salome_file::setFileNode ( in string  file_name,
in long  node_nbr 
) raises (SALOME::SALOME_Exception)

Set a number of node for the file. Default is the node 0.

Parameters:
file_name name of the file.
node_nbr node number where the file is.
Exceptions:
raised if the file doesn't exist.
long Engines::Parallel_Salome_file::getFileNode ( in string  file_name  )  raises (SALOME::SALOME_Exception)

Get the number of the node that actually managed the file.

Parameters:
file_name name of managed file.
Returns:
node number of the file
Exceptions:
raised if the file doesn't exist.
Engines::Container Engines::Parallel_Salome_file::updateFile ( in Engines::file  new_file  ) 

This method update the state of file for the Parallel_Salome_file.

Parameters:
new_file the new state of file.
void Engines::Parallel_Salome_file::recvFiles_node (  )  raises (SALOME::SALOME_Exception)

This method is used by the parallel implementation of recvFiles.

Exceptions:
raised if the file cannot be ok.
void Engines::Salome_file::load ( in string  hdf5_file  )  raises (SALOME::SALOME_Exception) [inherited]

Load a Salome_file from a hdf5 file.

Parameters:
hdf5_file name (with path) of the hdf5_file.
Exceptions:
contains informations of errors if the loading doesn't succeed.
void Engines::Salome_file::save ( in string  hdf5_file  )  raises (SALOME::SALOME_Exception) [inherited]

Save a Salome_file into a hdf5_file.

Parameters:
hdf5_file name (with path) of the hdf5_file.
Exceptions:
contains informations of errors if the save doesn't succeed.
void Engines::Salome_file::save_all ( in string  hdf5_file  )  raises (SALOME::SALOME_Exception) [inherited]

Save a Salome_file into a hdf5_file.

All files that are managed are saved into the hdf5_file

Parameters:
hdf5_file name (with path) of the hdf5_file.
Exceptions:
contains informations of errors if the save doesn't succeed.
void Engines::Salome_file::setLocalFile ( in string  comp_file_name  )  raises (SALOME::SALOME_Exception) [inherited]

Add a Local file to the Salome_file.

Parameters:
file_name name of the file with the path.
Exceptions:
raised if the file is already added into the Salome_file.
void Engines::Salome_file::setDistributedFile ( in string  comp_file_name  )  raises (SALOME::SALOME_Exception) [inherited]

Add a Distributed file to the Salome_file.

Parameters:
comp_file_name name of the file with the path.
Exceptions:
raised if the file is already added into the Salome_file.
void Engines::Salome_file::connect ( in Engines::Salome_file  source_Salome_file  )  raises (SALOME::SALOME_Exception) [inherited]

Connect a Salome_file with another Salome_file.

It works only if the Salome_file managed only one file

Parameters:
source_Salome_file Salome_file that managed the distributed version of the file.
Exceptions:
raised if there is more or less than one file.
void Engines::Salome_file::connectDistributedFile ( in string  file_name,
in Engines::Salome_file  source_Salome_file 
) raises (SALOME::SALOME_Exception) [inherited]

Connect the managed file file_name to a Salome_file.

Parameters:
file_name name of the file without the path.
source_Salome_file Salome_file that managed the distributed version of the file.
Exceptions:
raised if the file doesn't exist.
void Engines::Salome_file::setDistributedSourceFile ( in string  file_name,
in string  source_file_name 
) raises (SALOME::SALOME_Exception) [inherited]

Connect the file_name with a Distributed file_name.

Parameters:
file_name name of the file without the path.
source_file_name It's the name of the file managed by the distributed source Salome_file.
Exceptions:
raised if the file doesn't exist.
void Engines::Salome_file::recvFiles (  )  raises (SALOME::SALOME_Exception) [inherited]

Get all the distributed files managed by the Salome_file and check all the local files.

Exceptions:
raised if some of the files are not ok.
void Engines::Salome_file::removeFile ( in string  file_name  )  raises (SALOME::SALOME_Exception) [inherited]

Remove a file of the Salome_file.

Parameters:
file_name name of the file.
Exceptions:
raised if the file doesn't exist.
void Engines::Salome_file::removeFiles (  )  [inherited]

Remove all the files of the Salome_file.

Engines::files Engines::Salome_file::getFilesInfos (  )  [inherited]

Get the list of the files managed by the Salome_file.

The list can be empty.

Engines::file Engines::Salome_file::getFileInfos ( in string  file_name  )  raises (SALOME::SALOME_Exception) [inherited]

Get a file managed by the Salome_file.

Parameters:
file_name the name of the file.
Returns:
CORBA file reference.
Exceptions:
raised if the file doesn't exist.
Engines::SfState Engines::Salome_file::getSalome_fileState (  )  [inherited]

Return the state of the Salome_file.

void Engines::Salome_file::setContainer ( in Engines::Container  container  )  [inherited]

Set the container where files are.

Parameters:
container container CORBA's reference.
long Engines::fileTransfer::open ( in string  fileName  )  [inherited]

Open the file transfer.

open method returns a key (fileId) that identifies the structure (ex: C FILE), associated to the original file on the server. The structure is created by a container for transfer of files availables on the computer which runs the container. Each open gives a unique fileId, to allow concurrent reads of the same File.

long Engines::fileTransfer::openW ( in string  fileName  )  [inherited]

Open the file transfer in write mode for file fileName.

Parameters:
fileName the file to copy into with putBlock
Returns:
the id to use with putBlock
void Engines::fileTransfer::close ( in long  fileId  )  [inherited]

Close the file transfer.

when the file transfer is finished, close method releases structures created by open method, identified by fileId.

fileBlock Engines::fileTransfer::getBlock ( in long  fileId  )  [inherited]

Get a file data block.

Get successive blocks of octets from the original file. The last block is empty, and identifies the end of file.

void Engines::fileTransfer::putBlock ( in long  fileId,
in fileBlock  block 
) [inherited]

Put a file data block.

Parameters:
fileId identification of the file obtained by openW
block a data block to copy into the file identified by fileId

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