summaryrefslogtreecommitdiff
path: root/cli/options.cli
blob: 1127553045ef4fc543fadd75e66b68e8c14d6e68 (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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// 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."
  };

  bool --generate-cxx
  {
    ""
  };

  bool --generate-man
  {
    ""
  };

  bool --generate-html
  {
    ""
  };

  bool --stdout
  {
    ""
  };

  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 --html-suffix = ".html"
  {
    "<suffix>",
    "Use <suffix> instead of the default '.html' to construct the name of
     the generated HTML 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.",
    ""
  };
};