Ignore:
Timestamp:
07/13/03 19:01:14 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MArgs.cc

    r2267 r2275  
    4444}
    4545
    46 MArgs::MArgs(int argc, const char **argv) : fArgc(argc), fArgv()
     46MArgs::MArgs(int argc, const char **argv) : fArgc(argc)
    4747{
    4848    fName = argv[0];
    4949
    50     fArgv.SetOwner();
     50    fArgv = new TList;
     51    fArgv->SetOwner();
    5152
    5253    for (int i=1; i<argc; i++)
     
    5455        MArgsEntry &o = *new MArgsEntry(argv[i]);
    5556        dynamic_cast<TString&>(o) = o.Strip(TString::kBoth);
    56         fArgv.Add(&o);
     57        fArgv->Add(&o);
    5758    }
     59}
     60
     61MArgs::~MArgs()
     62{
     63    delete fArgv;
    5864}
    5965
     
    6167{
    6268    gLog << all << underline << fName << ":" << endl;
    63     fArgv.Print();
     69    fArgv->Print();
    6470}
    6571
     
    7682TString MArgs::GetString(const TString name) const
    7783{
    78     TIter Next(&fArgv);
     84    TIter Next(fArgv);
    7985    TString *s = NULL;
    8086    while ((s=dynamic_cast<TString*>(Next())))
     
    98104    const TString name = n.Strip(TString::kBoth);
    99105
    100     TIter Next(&fArgv);
     106    TIter Next(fArgv);
    101107    TString *s = NULL;
    102108    while ((s=dynamic_cast<TString*>(Next())))
     
    104110        {
    105111            TString str = s->Data()+s->Index(name)+name.Length();
    106             delete fArgv.Remove(dynamic_cast<TObject*>(s));
     112            delete fArgv->Remove(dynamic_cast<TObject*>(s));
    107113            return str;
    108114        }
     
    124130    Int_t num = 0;
    125131
    126     TIter Next(&fArgv);
     132    TIter Next(fArgv);
    127133    TString *s = NULL;
    128134    while ((s=dynamic_cast<TString*>(Next())))
     
    142148    Int_t num = 0;
    143149
    144     TIter Next(&fArgv);
     150    TIter Next(fArgv);
    145151    TString *s = NULL;
    146152    while ((s=dynamic_cast<TString*>(Next())))
     
    155161    const TString name = n.Strip(TString::kBoth);
    156162
    157     TIter Next(&fArgv);
     163    TIter Next(fArgv);
    158164    TString *s = NULL;
    159165    while ((s=dynamic_cast<TString*>(Next())))
     
    167173    const TString name = n.Strip(TString::kBoth);
    168174
    169     TIter Next(&fArgv);
     175    TIter Next(fArgv);
    170176    TString *s = NULL;
    171177    while ((s=dynamic_cast<TString*>(Next())))
  • trunk/MagicSoft/Mars/mbase/MArgs.h

    r2273 r2275  
    2727{
    2828private:
    29     Int_t fArgc;
    30     TList fArgv;
     29    Int_t  fArgc;
     30    TList *fArgv; //->
    3131
    3232public:
    3333    MArgs(int argc, const char **argv);
     34    ~MArgs();
    3435
    3536    void Print(const Option_t *o="") const;
Note: See TracChangeset for help on using the changeset viewer.