Version: 9.15.0
fileRef_i Class Reference

#include <SALOME_FileRef_i.hxx>

Inheritance diagram for fileRef_i:

Public Member Functions

 fileRef_i ()
 Default constructor, not for use. More...
 
 fileRef_i (Engines::Container_ptr container, const char *origFileName)
 Constructor to use. More...
 
virtual ~fileRef_i ()
 Destructor. More...
 
char * origFileName ()
 CORBA method: More...
 
char * refMachine ()
 CORBA method: More...
 
Engines::Container_ptr getContainer ()
 CORBA method: More...
 
CORBA::Boolean addRef (const char *machine, const char *fileName)
 CORBA method: after a file transfer on a client computer, registers hostname of client and file path of the copied file. More...
 
char * getRef (const char *machine)
 CORBA method: check if a copy of the file referenced by fileRef is available on the client computer. More...
 

Protected Attributes

Engines::Container_var _container
 
std::string _origFileName
 
std::string _machine
 
std::map< std::string, std::string > _copies
 

Constructor & Destructor Documentation

◆ fileRef_i() [1/2]

fileRef_i::fileRef_i ( )

Default constructor, not for use.

◆ fileRef_i() [2/2]

fileRef_i::fileRef_i ( Engines::Container_ptr  container,
const char *  origFileName 
)

◆ ~fileRef_i()

fileRef_i::~fileRef_i ( )
virtual

Destructor.

References MESSAGE.

Member Function Documentation

◆ addRef()

CORBA::Boolean fileRef_i::addRef ( const char *  machine,
const char *  fileName 
)

CORBA method: after a file transfer on a client computer, registers hostname of client and file path of the copied file.

Parameters
machineclient hostname
fileNameabsolute path of the transferred file on client computer

References _copies, and MESSAGE.

Referenced by fileRef_i().

◆ getContainer()

Engines::Container_ptr fileRef_i::getContainer ( )

◆ getRef()

char * fileRef_i::getRef ( const char *  machine)

CORBA method: check if a copy of the file referenced by fileRef is available on the client computer.

Parameters
machinehostname of the client computer
Returns
path of the copy on the client computer, if the copy exists, else empty string

References _copies, _machine, _origFileName, and MESSAGE.

◆ origFileName()

char * fileRef_i::origFileName ( )

CORBA method:

Returns
the file name (absolute path) on the computer which runs the container server

References _origFileName, and MESSAGE.

Referenced by fileRef_i().

◆ refMachine()

char * fileRef_i::refMachine ( )

CORBA method:

Returns
the hostname of the computer which runs the container server

References _machine, and MESSAGE.

Field Documentation

◆ _container

Engines::Container_var fileRef_i::_container
protected

◆ _copies

std::map<std::string, std::string> fileRef_i::_copies
protected

Referenced by addRef(), and getRef().

◆ _machine

std::string fileRef_i::_machine
protected

Referenced by fileRef_i(), getRef(), and refMachine().

◆ _origFileName

std::string fileRef_i::_origFileName
protected

Referenced by fileRef_i(), getRef(), and origFileName().