#include <string>
#include <vector>
#include <msp/strings/lexicalcast.h>
+#include "noncopyable.h"
namespace Msp {
arguments and their associated help texts. An application may override this by
providing its own option with the same name.
*/
-class GetOpt
+class GetOpt: private NonCopyable
{
public:
enum ArgType
unsigned process_short(const char *const *);
public:
- /** Generates a single line that describes known options and arguments. */
- std::string generate_usage(const std::string &) const;
+ /** Generates a single line that describes known options and arguments. If
+ compact is true, the options list is replaced with a placeholder. This
+ provides cleaner output if full help text is printed. */
+ std::string generate_usage(const std::string &, bool compact = false) const;
/** Generates help for known options and arguments in tabular format, one
item per line. The returned string will have a linefeed at the end. */