Changeset 1493 for trunk/MagicSoft/Mars/mfilter
- Timestamp:
- 08/09/02 09:13:10 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mfilter
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfilter/MF.cc
r1483 r1493 87 87 ClassImp(MF); 88 88 89 static const TString gsDefName = "MF"; 90 static const TString gsDefTitle = "Filter setup by a text-rule"; 91 92 // -------------------------------------------------------------------------- 93 // 94 // Default Constructor. Don't use. 95 // 96 MF::MF() : fFilter(NULL) 97 { 98 fName = gsDefName.Data(); 99 fTitle = gsDefTitle.Data(); 100 } 101 89 102 // -------------------------------------------------------------------------- 90 103 // … … 94 107 MF::MF(const char *text, const char *name, const char *title) 95 108 { 96 fName = name ? name : "MF";97 fTitle = title ? title : "Filter using a text";109 fName = name ? name : gsDefName.Data(); 110 fTitle = title ? title : gsDefTitle.Data(); 98 111 99 112 *fLog << inf << "Trying to resolve filter rule..." << endl; … … 372 385 void MF::StreamPrimitive(ofstream &out) const 373 386 { 374 out << " MF " << GetUniqueName() << ""; 375 } 376 387 out << " MF " << GetUniqueName(); 388 389 if (!fFilter) 390 { 391 out << ";" << endl; 392 return; 393 } 394 395 out << "(\"" << fFilter->GetRule() << "\""; 396 if (fName!=gsDefName || fTitle!=gsDefTitle) 397 { 398 out << "(\"" << fName << "\""; 399 if (fTitle!=gsDefTitle) 400 out << ", \"" << fTitle << "\""; 401 } 402 out << ");" << endl; 403 404 } 405 -
trunk/MagicSoft/Mars/mfilter/MF.h
r1481 r1493 27 27 28 28 public: 29 MF(); 29 30 MF(const char *text, const char *name=NULL, const char *title=NULL); 30 31 ~MF(); -
trunk/MagicSoft/Mars/mfilter/MFDataMember.cc
r1483 r1493 113 113 TString ret = fData.GetRule(); 114 114 ret += fFilterType==kELowerThan?"<":">"; 115 ret += fValue; 116 return ret; 115 116 TString str; 117 str += fValue; 118 119 return ret+str.Strip(TString::kBoth); 117 120 } 118 121 -
trunk/MagicSoft/Mars/mfilter/MFilterList.cc
r1486 r1493 28 28 // // 29 29 ///////////////////////////////////////////////////////////////////////////// 30 31 30 #include "MFilterList.h" 32 31 … … 38 37 #include "MLogManip.h" 39 38 39 #include "MIter.h" 40 40 41 ClassImp(MFilterList); 42 43 static const TString gsDefName = "MFilterList"; 44 static const TString gsDefTitle = "List combining filters logically."; 41 45 42 46 // -------------------------------------------------------------------------- … … 57 61 MFilterList::MFilterList(const char *type, const char *name, const char *title) 58 62 { 59 fName = name ? name : "MFilterList";60 fTitle = title ? title : "List combining filters logically.";63 fName = name ? name : gsDefName.Data(); 64 fTitle = title ? title : gsDefTitle.Data(); 61 65 62 66 fFilterType = kEAnd; … … 277 281 } 278 282 279 out << fName << "\", \"" << fName << "\", \"" << fTitle << "\");" << endl << endl; 280 281 TIter Next(&fFilters); 282 283 TObject *cont = NULL; 283 out << "\""; 284 285 if (fName!=gsDefName || fTitle!=gsDefTitle) 286 { 287 out << ", \"" << fName << "\""; 288 if (fTitle!=gsDefTitle) 289 out << ", \"" << fTitle << "\""; 290 } 291 out << ");" << endl << endl; 292 293 MIter Next(&fFilters); 294 295 MParContainer *cont = NULL; 284 296 while ((cont=Next())) 285 297 { … … 287 299 288 300 out << " " << ToLower(fName) << ".AddToList(&"; 289 out << ToLower(cont->GetName()) << ");" << endl << endl;301 out << cont->GetUniqueName() << ");" << endl << endl; 290 302 } 291 303 }
Note:
See TracChangeset
for help on using the changeset viewer.