Changeset 5144 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 09/28/04 18:30:48 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MDirIter.cc
r4966 r5144 350 350 } 351 351 } 352 353 // -------------------------------------------------------------------------- 354 // 355 // Loop over all contents (files). Sort the files alphabetically. 356 // Delete the contents of this DirIter and add all sorted files 357 // to this DirIter. 358 // 359 void MDirIter::Sort() 360 { 361 MDirIter Next(*this); 362 363 TList l; 364 l.SetOwner(); 365 366 TString name; 367 while (!(name=Next()).IsNull()) 368 l.Add(new TNamed(name.Data(), "")); 369 370 l.Sort(); 371 372 fList.Delete(); 373 Close(); 374 fFilter = ""; 375 376 TIter NextN(&l); 377 TObject *o=0; 378 while ((o=NextN())) 379 AddDirectory(o->GetName()); 380 } -
trunk/MagicSoft/Mars/mbase/MDirIter.h
r4966 r5144 48 48 } 49 49 50 void Sort(); 51 50 52 Int_t AddDirectory(const char *dir, const char *filter="", Int_t recursive=0); 51 53 void Add(const MDirIter &iter);
Note:
See TracChangeset
for help on using the changeset viewer.