From 443293aaf09eca7c3b88d621d056c4effee2c248 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 10 May 2012 17:54:18 +0200 Subject: Implement option class inheritance For now multiple, non-virtual inheritance is supported. An option class can now also be declared abstract using the class c = 0 {...}; syntax. New option, --exclude-base, controls whether base class information is present in usage and documentation. --- doc/cli.1 | 3 +++ doc/cli.xhtml | 3 +++ doc/language.txt | 12 +++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/cli.1 b/doc/cli.1 index 3c4e64c..67c397d 100644 --- a/doc/cli.1 +++ b/doc/cli.1 @@ -105,6 +105,9 @@ Indent option descriptions \fIlen\fP characters when printing usage\. This is useful when you have multiple options classes, potentially in separate files, and would like their usage to have the same indentation level\. +.IP "\fB--exclude-base\fP" +Exclude base class information from usage and documentation\. + .IP "\fB--cli-namespace\fP \fIns\fP" Generate the CLI support types in the \fIns\fP namespace (\fBcli\fP by default)\. The namespace can be nested, for example \fBdetails::cli\fP\. If diff --git a/doc/cli.xhtml b/doc/cli.xhtml index 58ff1f2..fdcde80 100644 --- a/doc/cli.xhtml +++ b/doc/cli.xhtml @@ -128,6 +128,9 @@ is useful when you have multiple options classes, potentially in separate files, and would like their usage to have the same indentation level. +
--exclude-base
+
Exclude base class information from usage and documentation.
+
--cli-namespace ns
Generate the CLI support types in the ns namespace (cli by default). The namespace can be nested, for diff --git a/doc/language.txt b/doc/language.txt index 0a5ee5f..445d743 100644 --- a/doc/language.txt +++ b/doc/language.txt @@ -42,7 +42,17 @@ namespace-body: decl-seq(opt) class-def: - "class" identifier "{" option-def-seq(opt) "};" + "class" identifier inheritance-spec(opt) abstract-spec(opt) "{" option-def-seq(opt) "};" + +inheritance-spec: + ":" base-seq + +base-seq: + qualified-name + base-seq "," qualified-name + +abstract-spec: + "=" "0" option-def-seq: option-def -- cgit v1.1