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. --- tests/inheritance/test.cli | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/inheritance/test.cli (limited to 'tests/inheritance/test.cli') diff --git a/tests/inheritance/test.cli b/tests/inheritance/test.cli new file mode 100644 index 0000000..481a771 --- /dev/null +++ b/tests/inheritance/test.cli @@ -0,0 +1,26 @@ +// file : tests/inheritance/test.cli +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : MIT; see accompanying LICENSE file + +include ; + +class base1 = 0 +{ + bool --very-long-flag {"Long flag."}; +}; + +class base2 +{ + std::string -s {"", "Short string."}; +}; + +class interm: base1 +{ + int -i = 1 {"", "Integer."}; +}; + +class options: interm, base2 +{ + std::string --string {"", "Long string."}; +}; -- cgit v1.1