Version: 9.12.0
Parallel_Salome_file_i Class Reference

#include <Parallel_Salome_file_i.hxx>

Inheritance diagram for Parallel_Salome_file_i:

Public Member Functions

 Parallel_Salome_file_i (CORBA::ORB_ptr orb, const char *ior, int rank)
 
virtual ~Parallel_Salome_file_i ()
 
virtual void setFileNode (const char *file_name, CORBA::Long node)
 
virtual CORBA::Long getFileNode (const char *file_name)
 
virtual Engines::Container_ptr updateFile (const Engines::file &file)
 
virtual void load (const char *hdf5_file)
 CORBA method. More...
 
virtual void save (const char *hdf5_file)
 CORBA method. More...
 
virtual void save_all (const char *hdf5_file)
 CORBA method. More...
 
virtual void connect (Engines::Salome_file_ptr source_Salome_file)
 CORBA method. More...
 
virtual void connectDistributedFile (const char *file_name, Engines::Salome_file_ptr source_Salome_file)
 CORBA method. More...
 
virtual void setDistributedSourceFile (const char *file_name, const char *source_file_name)
 CORBA method. More...
 
virtual void recvFiles ()
 CORBA method. More...
 
virtual void recvFiles_node ()
 
virtual void setContainer (Engines::Container_ptr container)
 
virtual bool getParallelDistributedFile (std::string file_name)
 
virtual void setLocalFile (const char *comp_file_name)
 CORBA method. More...
 
virtual void setDistributedFile (const char *comp_file_name)
 CORBA method. More...
 
virtual void removeFile (const char *file_name)
 CORBA method. More...
 
virtual void removeFiles ()
 CORBA method. More...
 
virtual Engines::filesgetFilesInfos ()
 CORBA method. More...
 
virtual Engines::filegetFileInfos (const char *file_name)
 CORBA method. More...
 
virtual Engines::SfStategetSalome_fileState ()
 CORBA method. More...
 
virtual CORBA::Long open (const char *file_name)
 CORBA method: try to open the file given. More...
 
virtual void close (CORBA::Long fileId)
 CORBA method: close the file associated to the fileId given at open. More...
 
virtual Engines::fileBlockgetBlock (CORBA::Long fileId)
 
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...
 
virtual PortableServer::POA_ptr _default_POA ()
 Get default POA for the servant object. More...
 
virtual void Register ()
 Increment reference counter. More...
 
virtual void UnRegister ()
 Decrement reference counter. More...
 
virtual void Destroy ()
 Decrement reference counter. More...
 

Protected Types

typedef std::map< int, FILE * > _t_fileAccess
 
typedef std::map< std::string, Engines::file_t_fileManaged
 
typedef std::map< std::string, Engines::Salome_file_var > _t_fileDistributedSource
 

Protected Member Functions

virtual bool checkLocalFile (std::string file_name)
 local C++ method : This method is used by revFiles to check if a local managed file is ok. More...
 
virtual bool getDistributedFile (std::string file_name)
 local C++ method : this method is used by recvFiles to get a distributed file from is distributed source. More...
 

Protected Attributes

int _fileId
 
long _path_max
 
_t_fileAccess _fileAccess
 
_t_fileManaged _fileManaged
 
_t_fileDistributedSource _fileDistributedSource
 
Engines::SfState _state
 
Engines::Container_ptr _container
 
Engines::Salome_file_var _default_source_Salome_file
 
int _fileKey
 
int _ctr
 
PortableServer::POA_var myPOA
 
int myRefCounter
 

Private Attributes

Engines::Parallel_Salome_file_var proxy
 
Engines::PaCO_Parallel_Salome_file * parallel_file
 

Member Typedef Documentation

◆ _t_fileAccess

typedef std::map<int, FILE*> Salome_file_i::_t_fileAccess
protectedinherited

◆ _t_fileDistributedSource

typedef std::map<std::string, Engines::Salome_file_var> Salome_file_i::_t_fileDistributedSource
protectedinherited

◆ _t_fileManaged

typedef std::map<std::string, Engines::file> Salome_file_i::_t_fileManaged
protectedinherited

Constructor & Destructor Documentation

◆ Parallel_Salome_file_i()

Parallel_Salome_file_i::Parallel_Salome_file_i ( CORBA::ORB_ptr  orb,
const char *  ior,
int  rank 
)

◆ ~Parallel_Salome_file_i()

Parallel_Salome_file_i::~Parallel_Salome_file_i ( )
virtual

Member Function Documentation

◆ _default_POA()

PortableServer::POA_ptr SALOME::GenericObj_i::_default_POA ( )
virtualinherited

Get default POA for the servant object.

This function is implicitly called from "_this()" function. Default POA can be set via the constructor.

Returns
reference to the default POA for the servant

Reimplemented in SALOMEDS_UseCaseIterator_i, SALOMEDS_UseCaseBuilder_i, SALOMEDS_SObject_i, SALOMEDS_SComponentIterator_i, SALOMEDS_GenericAttribute_i, and SALOMEDS_ChildIterator_i.

References SALOME::GenericObj_i::myPOA.

◆ checkLocalFile()

bool Salome_file_i::checkLocalFile ( std::string  file_name)
protectedvirtualinherited

local C++ method : This method is used by revFiles to check if a local managed file is ok.

Parameters
fileNamename of the file

References Salome_file_i::_fileManaged, INFOS, and ORBConfigFile::path.

Referenced by Salome_file_i::recvFiles(), and recvFiles_node().

◆ close()

void Salome_file_i::close ( CORBA::Long  fileId)
virtualinherited

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

Parameters
fileIdgot in return from open method

References Salome_file_i::_fileAccess, INFOS, and MESSAGE.

Referenced by Salome_file_i::load().

◆ connect()

void Parallel_Salome_file_i::connect ( Engines::Salome_file_ptr  source_Salome_file)
virtual

◆ connectDistributedFile()

void Parallel_Salome_file_i::connectDistributedFile ( const char *  file_name,
Engines::Salome_file_ptr  source_Salome_file 
)
virtual

◆ Destroy()

void SALOME::GenericObj_i::Destroy ( )
virtualinherited

Decrement reference counter.

Deprecated:
Use UnRegister() instead.

References MESSAGE, and SALOME::GenericObj_i::UnRegister().

◆ getBlock()

Engines::fileBlock * Salome_file_i::getBlock ( CORBA::Long  fileId)
virtualinherited

◆ getDistributedFile()

bool Salome_file_i::getDistributedFile ( std::string  file_name)
protectedvirtualinherited

local C++ method : this method is used by recvFiles to get a distributed file from is distributed source.

If there is no source_file_name for the file, it tries to get the file from the source. In this case, the source distributed file has to managed only one file to be able to the send the file.

Parameters
fileNamename of the file

References Salome_file_i::_fileDistributedSource, Salome_file_i::_fileManaged, ASSERT, INFOS, MESSAGE, and ORBConfigFile::path.

Referenced by Salome_file_i::recvFiles(), and recvFiles_node().

◆ getFileInfos()

Engines::file * Salome_file_i::getFileInfos ( const char *  file_name)
virtualinherited

◆ getFileNode()

CORBA::Long Parallel_Salome_file_i::getFileNode ( const char *  file_name)
virtual

◆ getFilesInfos()

Engines::files * Salome_file_i::getFilesInfos ( )
virtualinherited

CORBA method.

See also
Engines::Salome_file::getFilesInfos

References Salome_file_i::_fileManaged.

Referenced by main().

◆ getParallelDistributedFile()

bool Parallel_Salome_file_i::getParallelDistributedFile ( std::string  file_name)
virtual

◆ getSalome_fileState()

Engines::SfState * Salome_file_i::getSalome_fileState ( )
virtualinherited

CORBA method.

See also
Engines::Salome_file::getSalome_fileState

References Salome_file_i::_state.

Referenced by main().

◆ load()

void Parallel_Salome_file_i::load ( const char *  hdf5_file)
virtual

◆ open()

CORBA::Long Salome_file_i::open ( const char *  file_name)
virtualinherited

CORBA method: try to open the file given.

If the file is readable, return a positive integer else return 0;

Parameters
fileNamefile name to be transferred
Returns
fileId = positive integer > 0 if open OK.

References Salome_file_i::_fileAccess, Salome_file_i::_fileId, Salome_file_i::_fileManaged, INFOS, MESSAGE, and ORBConfigFile::path.

Referenced by Salome_file_i::load().

◆ openW()

CORBA::Long fileTransfer_i::openW ( const char *  fileName)
inherited

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 transferred
Returns
fileId = positive integer > 0 if open OK.

References fileTransfer_i::_ctr, fileTransfer_i::_fileAccess, fileTransfer_i::_fileKey, INFOS, and MESSAGE.

◆ putBlock()

void fileTransfer_i::putBlock ( CORBA::Long  fileId,
const Engines::fileBlock block 
)
inherited

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

References fileTransfer_i::_fileAccess, INFOS, MESSAGE, and SCRUTE.

◆ recvFiles()

◆ recvFiles_node()

◆ Register()

void SALOME::GenericObj_i::Register ( )
virtualinherited

Increment reference counter.

References IS_OBJ_IN_QUESTION, MESSAGE, and SALOME::GenericObj_i::myRefCounter.

◆ removeFile()

void Salome_file_i::removeFile ( const char *  file_name)
virtualinherited

CORBA method.

See also
Engines::Salome_file::removeFile

References MESSAGE.

◆ removeFiles()

void Salome_file_i::removeFiles ( )
virtualinherited

CORBA method.

See also
Engines::Salome_file::removeFiles

References MESSAGE.

◆ save()

void Parallel_Salome_file_i::save ( const char *  hdf5_file)
virtual

◆ save_all()

void Parallel_Salome_file_i::save_all ( const char *  hdf5_file)
virtual

◆ setContainer()

void Parallel_Salome_file_i::setContainer ( Engines::Container_ptr  container)
virtual

◆ setDistributedFile()

◆ setDistributedSourceFile()

void Parallel_Salome_file_i::setDistributedSourceFile ( const char *  file_name,
const char *  source_file_name 
)
virtual

◆ setFileNode()

void Parallel_Salome_file_i::setFileNode ( const char *  file_name,
CORBA::Long  node 
)
virtual

◆ setLocalFile()

◆ UnRegister()

void SALOME::GenericObj_i::UnRegister ( )
virtualinherited

Decrement reference counter.

As soon as reference counter goes to zero, the object is automatically deactivated.

References IS_OBJ_IN_QUESTION, MESSAGE, SALOME::GenericObj_i::myPOA, and SALOME::GenericObj_i::myRefCounter.

Referenced by SALOME::GenericObj_i::Destroy(), and SALOME_PyNode.Generic::Destroy().

◆ updateFile()

Engines::Container_ptr Parallel_Salome_file_i::updateFile ( const Engines::file file)
virtual

Field Documentation

◆ _container

◆ _ctr

int fileTransfer_i::_ctr
protectedinherited

◆ _default_source_Salome_file

Engines::Salome_file_var Salome_file_i::_default_source_Salome_file
protectedinherited

◆ _fileAccess

_t_fileAccess Salome_file_i::_fileAccess
protectedinherited

◆ _fileDistributedSource

◆ _fileId

int Salome_file_i::_fileId
protectedinherited

◆ _fileKey

int fileTransfer_i::_fileKey
protectedinherited

◆ _fileManaged

◆ _path_max

◆ _state

◆ myPOA

◆ myRefCounter

int SALOME::GenericObj_i::myRefCounter
protectedinherited

◆ parallel_file

Engines::PaCO_Parallel_Salome_file* Parallel_Salome_file_i::parallel_file
private

◆ proxy