Ignore:
Timestamp:
07/29/09 15:15:59 (15 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

    r9442 r9482  
    506506    return rc;
    507507}
     508
     509// --------------------------------------------------------------------------
     510//
     511// Return all arguments and options in the order as they are stored
     512// in memory.
     513//
     514TString MArgs::GetCommandLine() const
     515{
     516    TString rc;
     517
     518    TIter Next(&fArgv);
     519    TString *s = NULL;
     520    while ((s=dynamic_cast<TString*>(Next())))
     521    {
     522        rc += *s;
     523        rc += " ";
     524    }
     525
     526    return rc.Strip(TString::kBoth);
     527}
  • trunk/MagicSoft/Mars/mbase/MArgs.h

    r9442 r9482  
    3131
    3232    MArgsEntry *GetArgument(Int_t i) const;
     33    MArgsEntry *GeOption(Int_t i) const;
    3334
    3435public:
     
    7071    Bool_t   RemoveArgument(Int_t i);
    7172
     73    TString  GetCommandLine() const;
     74
     75    static TString GetCommandLine(int argc, char **argv) { return MArgs(argc, argv).GetCommandLine(); }
     76
    7277    ClassDef(MArgs, 0)  //Class to parse command line arguments
    7378};
Note: See TracChangeset for help on using the changeset viewer.