1 // Copyright (c) 1996 James Clark, 1999 Matthias Clasen
2 // See the file COPYING for copying permission.
4 #ifndef Options_INCLUDED
5 #define Options_INCLUDED 1
11 namespace SP_NAMESPACE {
14 // This is a mildly C++ified version of getopt().
15 // (extended to include getopt_long() functionality.)
16 // It never prints any message.
30 Options(int argc, T *const *, const Vector<LongOption<T> > &);
31 // Returns false if there are no more options.
33 T *arg() const { return arg_; } // optarg
34 T opt() const { return opt_; } // optopt
35 int ind() const { return ind_; } // optind
36 int longIndex() const { return optInd_; } // longindex
39 bool searchLong(const T *);
46 Vector<LongOption<T> > opts_;
54 #endif /* not Options_INCLUDED */
56 #ifdef SP_DEFINE_TEMPLATES
57 #include "Options.cxx"