diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-05-10 17:54:18 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-05-10 17:54:18 +0200 |
commit | 443293aaf09eca7c3b88d621d056c4effee2c248 (patch) | |
tree | a35c7b2354295b5b73462c0806e04e2deef58171 /tests/inheritance/test.cli | |
parent | 4f9022f24c4591391637121c7274d9855b37bd93 (diff) |
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.
Diffstat (limited to 'tests/inheritance/test.cli')
-rw-r--r-- | tests/inheritance/test.cli | 26 |
1 files changed, 26 insertions, 0 deletions
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 <boris@codesynthesis.com> +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : MIT; see accompanying LICENSE file + +include <string>; + +class base1 = 0 +{ + bool --very-long-flag {"Long flag."}; +}; + +class base2 +{ + std::string -s {"<str>", "Short string."}; +}; + +class interm: base1 +{ + int -i = 1 {"<num>", "Integer."}; +}; + +class options: interm, base2 +{ + std::string --string {"<str>", "Long string."}; +}; |