summaryrefslogtreecommitdiff
path: root/examples/hello/README
blob: a1fe976f0cd34cb25aad597561462693196a8b00 (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
This is a "Hello, world!" example that shows how to implement a very basic
command line interface using CLI.

The example consists of the following files:

hello.cli
  Options class definition in the CLI language.

hello.hxx
hello.ixx
hello.cxx
  Options class implementation in C++. These files are generated by the CLI 
  compiler from hello.cli using the following command line:

  cli hello.cli

driver.cxx
  Driver for the example. It first instantiates the option class which parses
  the command line. The driver then examines the options and prints the
  greeting string for each name passed as argument.

To run the example you can try the following command lines:

$ ./driver --help
$ ./driver John Jane
$ ./driver --greeting Hi --exclamations 3 John Jane