bool isExist;
QString aComment = VISU::Storable::FindValue(aMap,"myComment",&isExist);
if ( isExist ) {
- TCallbackMap::const_iterator i = VisuStoreMap.find(aComment.latin1());
- if(MYDEBUG) MESSAGE("Storable::Create - "<<aComment.latin1()<<" "<<(i != VisuStoreMap.end()));
- if(i == VisuStoreMap.end()) return NULL;
- return (i->second)(theSObject,thePrefix,aMap);
+ TCallbackMap::const_iterator anIter = VisuStoreMap.find(aComment.latin1());
+ if(MYDEBUG) MESSAGE("Storable::Create - "<<aComment.latin1()<<" "<<(anIter != VisuStoreMap.end()));
+ if(anIter == VisuStoreMap.end())
+ return NULL;
+ return (anIter->second)(theSObject, thePrefix, aMap);
}
- }catch(std::logic_error& exc){
+ }catch(std::exception& exc){
INFOS("Follow exception was occured :\n"<<exc.what());
}catch(...){
INFOS("Unknown exception was occured!");
Storable
::FindValue(const TRestoringMap& theMap,
const std::string& theArg,
- bool* isFind)
+ bool* theIsFind)
{
- TRestoringMap::const_iterator i = theMap.find(theArg);
- if(i == theMap.end()) {
+ TRestoringMap::const_iterator anIter = theMap.find(theArg);
+ if(anIter == theMap.end()) {
if(MYDEBUG) MESSAGE("Storable::Init >> there is no value for "<<theArg);
- if(isFind != NULL) *isFind = false;
+ if(theIsFind != NULL)
+ *theIsFind = false;
//throw std::logic_error(string("Storable::Init >> there is no value for ") + theArg);
static QString BAD_VALUE("NULL");
return BAD_VALUE;
}
- if(isFind != NULL) *isFind = true;
- return i->second;
+ if(theIsFind != NULL)
+ *theIsFind = true;
+ return anIter->second;
}
}
if(MYDEBUG)
MESSAGE("Result_i::Restore - aFileName = " << myFileInfo.filePath() << "; " << myFileInfo.isFile());
-
+
const char* aPathLatin = myFileInfo.filePath().latin1();
if (HDFascii::isASCII(aPathLatin)) {
MESSAGE("ConvertFromASCIIToHDF(" << aPathLatin << ")");
MESSAGE("ConvertFromASCIIToHDF() DONE : " << aResultPath);
char* aHDFFileName = new char[strlen(aResultPath) + 19];
sprintf(aHDFFileName, "%shdf_from_ascii.hdf", aResultPath);
-
+
if (IsMultifile()) { // set this file as new - temporary
static QString aCommand;
aCommand.sprintf(" %s %s%s",aHDFFileName, aResultPath, myFileInfo.baseName().latin1());
- aCommand = QDir::convertSeparators( aCommand );
- aCommand.prepend( MOVE_COMMAND );
-
+ aCommand = QDir::convertSeparators( aCommand );
+ aCommand.prepend( MOVE_COMMAND );
+
if (system(aCommand.latin1()) == -1) {
if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - Can't execute the command :" << aCommand);
return NULL;
} else { // change current temporary file to the new: with hdf-format
static QString aCommand;
aCommand.sprintf(" %s %s\0",aHDFFileName, myFileInfo.filePath().latin1());
- aCommand = QDir::convertSeparators( aCommand );
- aCommand.prepend( MOVE_COMMAND );
-
- if (system(aCommand.latin1()) == -1) {
+ aCommand = QDir::convertSeparators( aCommand );
+ aCommand.prepend( MOVE_COMMAND );
+
+ if (system(aCommand.latin1()) == -1) {
if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - Can't execute the command :" << aCommand);
return NULL;
} else {