case SALOME::BigObjTransferProtocol::SSDCopyFileSystem:
return SALOME::SSD_COPY_FILE_SYSTEM_PROTOCOL_STR;
default:
- throw std::runtime_error("FromIntToBigObjOnDiskProtocol unrecognized protocol ! should be in [0,1] !");
+ throw std::runtime_error("BigObjOnDiskProtocolToStr unrecognized protocol ! should be in [0,1] !");
}
}
return SALOME::BigObjTransferProtocol::SharedFileSystem;
}
std::istringstream iss(protocol.substr(1,1)); iss.exceptions(std::istringstream::failbit | std::istringstream::badbit);
- char iproxyprot = 0;
+ short iproxyprot = 0;
iss >> iproxyprot;
return FromIntToBigObjOnDiskProtocol( iproxyprot );
}
-std::string SALOME::GetBigObjOnDiskDirectory()
+std::string SALOME::GetBigObjOnDiskDirectoryCoarse()
{
return SALOME_FILE_BIG_OBJ_DIR;
}
BigObjTransferProtocol BASICS_EXPORT BigObjOnDiskProtocolFromStr(const std::string& protocol);
BigObjTransferProtocol BASICS_EXPORT FromIntToBigObjOnDiskProtocol(char protocol);
BigObjTransferProtocol BASICS_EXPORT GetBigObjOnDiskProtocolAndDirectory(std::string& directory);
- std::string BASICS_EXPORT GetBigObjOnDiskDirectory();
+ std::string BASICS_EXPORT GetBigObjOnDiskDirectoryCoarse();
void BASICS_EXPORT SetBigObjOnDiskDirectory(const std::string& directory);
bool BASICS_EXPORT BigObjOnDiskDirectoryDefined();
void BASICS_EXPORT SetNumberOfRetry(int nbRetry);
%rename (HeatMarcel) HeatMarcelSwig;
%rename (GetBigObjOnDiskThreshold) GetBigObjOnDiskThresholdSwig;
%rename (SetBigObjOnDiskThreshold) SetBigObjOnDiskThresholdSwig;
-%rename (GetBigObjOnDiskDirectory) GetBigObjOnDiskDirectorySwig;
%rename (GetBigObjOnDiskProtocolAndDirectory) GetBigObjOnDiskProtocolAndDirectorySwig;
%rename (BigObjOnDiskProtocolFromStr) BigObjOnDiskProtocolFromStrSwig;
%rename (BigObjOnDiskProtocolToStr) BigObjOnDiskProtocolToStrSwig;
return SALOME::SetBigObjOnDiskThreshold(newThreshold);
}
-std::string GetBigObjOnDiskDirectorySwig()
-{
- return SALOME::GetBigObjOnDiskDirectory();
-}
-
void SetBigObjOnDiskDirectorySwig(const std::string& directory)
{
return SALOME::SetBigObjOnDiskDirectory(directory);
std::ostringstream envInfo;
std::for_each( _override_env.begin(), _override_env.end(), [&envInfo](const std::pair<std::string,std::string>& p) { envInfo << p.first << " = " << p.second << " "; } );
INFOS("[GiveContainer] container " << containerNameInNS << " override " << envInfo.str());
- cont->set_big_obj_on_disk_directory( SALOME::GetBigObjOnDiskDirectory().c_str() );
+ cont->set_big_obj_on_disk_directory( SALOME::GetBigObjOnDiskDirectoryCoarse().c_str() );
cont->set_big_obj_on_disk_threshold( SALOME::GetBigObjOnDiskThreshold() );
cont->set_number_of_retry( SALOME::GetNumberOfRetry() );
Engines::FieldsDict envCorba;
def __init__(self, fileName):
self._file_name = fileName
- def getFileName(self, value):
+ def getFileName(self):
return self._file_name
@abc.abstractmethod
protocol, directory = KernelBasis.GetBigObjOnDiskProtocolAndDirectory()
if not directory:
raise RuntimeError("An object of size higher than limit detected and no directory specified to dump it in file !")
- return protocol, os.path.expanduser( os.path.expandvars( KernelBasis.GetBigObjOnDiskDirectory() ) )
+ return protocol, os.path.expanduser( os.path.expandvars( directory ) )
def GetBigObjectFileName():
"""
return self._filename
def __dumpIntoFile(self, objSerialized):
- DumpInFile( objSerialized, self._filename )
+ DumpInFile( objSerialized, self._filename.getFileName() )
def get(self, visitor = None):
return self._filename.get(visitor)