Changeset 6253 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 02/04/05 13:31:19 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MFilter.cc
r4991 r6253 95 95 TString MFilter::GetRule() const 96 96 { 97 return "<GetRule n/a for " + fName + ">";97 return ClassName(); //"<GetRule n/a for " + fName + ">"; 98 98 } 99 99 -
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r5994 r6253 534 534 MParContainer *MParContainer::GetNewObject(const char *name, TClass *base) const 535 535 { 536 return base ? GetNewObject(name, base->GetName()) : 0; 537 } 538 539 // -------------------------------------------------------------------------- 540 // 541 // Return a new object of class 'name'. Make sure that the object 542 // derives from the class base. 543 // 544 // In case of failure return NULL 545 // 546 // The caller is responsible of deleting the object! 547 // 548 MParContainer *MParContainer::GetNewObject(const char *name, const char *base) const 549 { 536 550 TClass *cls = GetConstructor(name); 537 551 if (!cls || !base) … … 540 554 if (!cls->InheritsFrom(base)) 541 555 { 542 *fLog << " - Class doesn't inherit from " << base->GetName() << endl; 556 *fLog << err; 557 *fLog << dbginf << GetDescriptor() << " - Cannot create new instance of class '" << name << "': "; 558 *fLog << " - Class " << cls->GetName() << " doesn't inherit from " << base << endl; 543 559 return NULL; 544 560 } … … 550 566 if (!obj) 551 567 { 552 *fLog << " - Class has no default constructor." << endl; 553 *fLog << " - An abstract member functions of a base class is not overwritten." << endl; 554 return NULL; 555 } 556 557 return (MParContainer*)obj; 558 } 559 560 // -------------------------------------------------------------------------- 561 // 562 // Return a new object of class 'name'. Make sure that the object 563 // derives from the class base. 564 // 565 // In case of failure return NULL 566 // 567 // The caller is responsible of deleting the object! 568 // 569 MParContainer *MParContainer::GetNewObject(const char *name, const char *base) const 570 { 571 TClass *cls = GetConstructor(name); 572 if (!cls || !base) 573 return NULL; 574 575 if (!cls->InheritsFrom(base)) 576 { 577 *fLog << " - Class doesn't inherit from " << base << endl; 578 return NULL; 579 } 580 581 // 582 // create the parameter container of the the given class type 583 // 584 TObject *obj = (TObject*)cls->New(); 585 if (!obj) 586 { 587 *fLog << " - Class has no default constructor." << endl; 568 *fLog << err; 569 *fLog << dbginf << GetDescriptor() << " - Cannot create new instance of class '" << name << "': "; 570 *fLog << " - Class " << cls->GetName() << " has no default constructor." << endl; 588 571 *fLog << " - An abstract member functions of a base class is not overwritten." << endl; 589 572 return NULL; … … 766 749 return kFALSE; 767 750 768 *fLog << warn << "WARNING - Resource " << prefix+fName<< " found, but no " << ClassName() << "::ReadEnv." << endl;751 *fLog << warn << "WARNING - " << fName << ": Resource " << prefix << " found, but no " << ClassName() << "::ReadEnv." << endl; 769 752 return kTRUE; 770 753 }
Note:
See TracChangeset
for help on using the changeset viewer.