Changeset 2701 in Sophya for trunk/SophyaPI/PIext/nobjmgr.cc
- Timestamp:
- Apr 27, 2005, 1:55:00 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/nobjmgr.cc
r2677 r2701 1047 1047 { 1048 1048 ZSync(*myMutex); 1049 #ifdef SANS_EVOLPLANCK 1049 1050 bool ok = true; 1050 1051 PPersist* obj=NULL; 1051 1052 1052 1053 PInPersist* ppin=NULL; 1053 #ifdef SANS_EVOLPLANCK1054 1054 TRY{ 1055 1055 ppin = new PInPersist(flnm); … … 1058 1058 } CATCH(merr) 1059 1059 { printf("NamedObjMgr::ReadAll()/Error Exception= %ld (%s) \n", 1060 (long)merr, PeidaExc(merr)); ok = false; } ENDTRY; 1061 #else 1062 try { 1063 ppin = new PInPersist(flnm); 1064 if (ppin->NbNameTags() < 1) obj = ppin->ReadObject(); 1065 else obj = NULL; 1066 } 1067 catch (IOExc iox) { 1068 cerr << "NamedObjMgr::ReadAll()/Error Exception - Msg= " << iox.Msg() << endl; 1069 ok = false; 1070 } 1071 #endif 1060 (long)merr, PeidaExc(merr)); ok = false; } 1061 ENDTRY; 1072 1062 if (!ok) return; 1073 1063 if (obj) { … … 1077 1067 else ReadObj((*ppin), -1); 1078 1068 delete ppin; 1069 #else 1070 try { 1071 PInPersist pis(flnm); 1072 if (pis.NbNameTags() >= 1) { 1073 if (pis.NbNameTags() < pis.NbTopLevelObjects()) { 1074 cout << "NamedObjMgr::ReadAll()/Warning File " << flnm << " NbNameTags=" 1075 << pis.NbNameTags() << " < NbTopLevelObjects= " 1076 << pis.NbTopLevelObjects() << endl; 1077 cout << " ... Reading " << pis.NbNameTags() << " objects at NameTags " ; 1078 } 1079 ReadObj(pis, -1); 1080 return; 1081 } 1082 1083 string nom = servnobjm->FileName2Name(flnm); 1084 int kn = 1; 1085 for(int ii=0; ii<pis.NbTopLevelObjects(); ii++) { 1086 PPersist* obj = pis.ReadObject(); 1087 if (!obj) continue; 1088 AddObj_P(obj->DataObj(), nom, false); 1089 kn++; 1090 nom += (string)MuTyV(kn); 1091 } 1092 } 1093 catch (IOExc& iox) { 1094 cerr << "NamedObjMgr::ReadAll()/Error Exception - Msg= " << iox.Msg() << endl; 1095 } 1096 #endif 1079 1097 return; 1080 1098 }
Note:
See TracChangeset
for help on using the changeset viewer.