/* Copyright (c) 1997-2004
   Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Berlin, Germany)
   http://www.math.tu-berlin.de/polymake,  mailto:polymake@math.tu-berlin.de

   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
   Free Software Foundation; either version 2, or (at your option) any
   later version: http://www.gnu.org/licenses/gpl.txt.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
*/

#ifndef _POLYMAKE_ARGV_OPTIONS_H
#define _POLYMAKE_ARGV_OPTIONS_H "$Project: polymake $$Id: argv_options.h,v 1.5 2004/06/22 16:22:43 gawrilow Exp $"

namespace pm {

struct argv_option {
   const char *name;
   bool takes_value;
   const char *value;

   operator const char* () const { return value; }
};

bool extract_options(int& argc, const char** argv, int n_fixed_args, int n_options, argv_option* options);

template <int n_options> inline
bool extract_options(int& argc, const char** argv, int n_fixed_args, argv_option(&options)[n_options]) {
   return extract_options(argc,argv,n_fixed_args,n_options,options);
}

} // end namespace pm

namespace polymake {
   using pm::argv_option;
}

#endif // _POLYMAKE_ARGV_OPTIONS_H

// Local Variables:
// mode:C++
// End:
