Changeset 2669 in Sophya for trunk/SophyaPI/PIext/nobjmgr.cc
- Timestamp:
- Apr 15, 2005, 3:01:05 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/nobjmgr.cc
r2651 r2669 1205 1205 1206 1206 /* --Methode-- */ 1207 void NamedObjMgr::SaveListObjects(vector<string> &liste) 1208 // Les n-1 premiers elements (liste[0 -> n-2]) contiennent 1209 // les noms des objects a mettre dans le fichier ppf 1210 // dont le nom est le dernier argument (liste[n-1]) 1211 { 1212 ZSync(*myMutex); 1213 1214 if(liste.size()<2) { 1215 cerr<<"NamedObjMgr::SaveListObjects()/Error not enough argument"<<endl; 1216 return; 1217 } 1218 1219 // open ppf file 1220 string ppfname = liste[liste.size()-1]; 1221 POutPersist* pout=NULL; 1222 try { 1223 pout = new POutPersist(ppfname); 1224 } catch(IOExc iox) { 1225 cerr<<"NamedObjMgr::SaveObjects()/Error Exception - Msg= "<<iox.Msg()<<endl; 1226 return; 1227 } 1228 1229 // put objects in ppf file 1230 for(int i=0;i<liste.size()-1;i++) { 1231 bool keeppath = (liste[i][0] == '/') ? true : false; 1232 SaveObj_P(liste[i], (*pout), keeppath); 1233 } 1234 1235 // close ppf file 1236 delete pout; 1237 1238 return; 1239 } 1240 1241 /* --Methode-- */ 1207 1242 void NamedObjMgr::SaveAll(string const& flnm) 1208 1243 {
Note:
See TracChangeset
for help on using the changeset viewer.