Activity for Sanford Freedman

  • Sanford Freedman Sanford Freedman created ticket #22

    Make return value of TCLAP::ValueArg<T>::getValue const

  • Sanford Freedman Sanford Freedman posted a comment on discussion Open Discussion

    A simple example would be any application expecting a filename. If a user accedentically had a '-' at the start of a filename argument, then they were probably attempting to use a flag instead. While an application can easily catch this, having the command line parser directly catch it is cleaner and results in a more sensible error/usage message. For instance, the error mesage when doing a 'ls -dummy' is: ls: option requires an argument -- 'y' Try 'ls --help' for more information. instead of something...

  • Sanford Freedman Sanford Freedman modified a comment on discussion Open Discussion

    The UnlabeledValueArg arg type currently matches against arguments starting with a '-'. Could either a new class or an optional parameter be added to indicate an argument should not be allowed to start with an '-'? For instance, namespace TCLAP{ template<typename T> class UnlabeledStringValueArg : public UnlabeledValueArg<T>{ public: using UnlabeledValueArg<T>::UnlabeledValueArg; virtual bool processArg(int* i, std::vector<std::string>& args){ if(args[*i][0] == '-') return(false); return(UnlabeledValueArg<T>::processArg(i,...

  • Sanford Freedman Sanford Freedman posted a comment on discussion Open Discussion

    The UnlabeledValueArg arg type currently matches against parameters starting with a '-'. Could either a new class or an optional parameter be added to inidcate an argument should not be allowed to start with an '-'? For instance, namespace TCLAP{ template<typename T> class UnlabeledStringValueArg : public UnlabeledValueArg<T>{ public: using UnlabeledValueArg<T>::UnlabeledValueArg; virtual bool processArg(int* i, std::vector<std::string>& args){ if(args[*i][0] == '-') return(false); return(UnlabeledValueArg<T>::processArg(i,...

1