summaryrefslogtreecommitdiff
path: root/cli/options.cli
blob: 3216e088047d4fe05632a19624d67f6fd78ac33b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// file      : cli/options.cli
// author    : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2009 Code Synthesis Tools CC
// license   : MIT; see accompanying LICENSE file

// NOTE: Make sure you have a working CLI compiler around
// before modifying this file.
//

include <map>;
include <string>;
include <vector>;
include <cstddef>;

class options
{
  bool --help {"Print usage information and exit."};
  bool --version {"Print version and exit."};

  std::string --output-dir | -o
  {
    "<dir>",
    "Write generated files to <dir>."
  };

  bool --suppress-inline
  {
    "Generate all functions non-inline."
  };

  bool --suppress-usage
  {
    "Suppress generation of usage printing code."
  };

  std::size_t --option-length = 0
  {
    "<len>",
    "Indent option description <len> characters when printing usage."
  };

  std::string --hxx-suffix = ".hxx"
  {
    "<suffix>",
    "Use <suffix> instead of the default '.hxx' to construct the name of
     the generated header file."
  };

  std::string --ixx-suffix = ".ixx"
  {
    "<suffix>",
    "Use <suffix> instead of the default '.ixx' to construct the name of
     the generated inline file."
  };

  std::string --cxx-suffix = ".cxx"
  {
    "<suffix>",
    "Use <suffix> instead of the default '.cxx' to construct the name of
     the generated source file."
  };

  std::string --option-prefix = "-"
  {
    "<prefix>",
    "Use <prefix> instead of the default '-' as an option prefix."
  };

  std::string --option-separator = "--"
  {
    "<sep>",
    "Use <sep> instead of the default '--' as an optional separator between
     options and arguments."
  };

  bool --include-with-brackets
  {
    "Use angle brackets (<>) instead of quotes (\"\") in generated #include
     directives."
  };

  std::string --include-prefix
  {
    "<prefix>",
    "Add <prefix> to generated #include directive paths."
  };

  std::string --guard-prefix
  {
    "<prefix>",
    "Add <prefix> to generated header inclusion guards."
  };

  std::map<std::string, std::string> --reserved-name
  {
    "<name>=<rep>",
    "Add <name> to the list of names that should not be used as identifiers.
     The name can optionally be followed by '=' and the <rep> replacement
     name that should be used instead.",
    ""
  };
};