summaryrefslogtreecommitdiff
path: root/cli/man.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-05-10 17:54:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-05-10 17:54:18 +0200
commit443293aaf09eca7c3b88d621d056c4effee2c248 (patch)
treea35c7b2354295b5b73462c0806e04e2deef58171 /cli/man.cxx
parent4f9022f24c4591391637121c7274d9855b37bd93 (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 'cli/man.cxx')
-rw-r--r--cli/man.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/cli/man.cxx b/cli/man.cxx
index 93c6920..ac5d9b1 100644
--- a/cli/man.cxx
+++ b/cli/man.cxx
@@ -120,6 +120,9 @@ namespace
class_ (context& c)
: context (c), option_ (c)
{
+ *this >> inherits_base_ >> base_ >> inherits_base_;
+ base_ >> names_option_;
+
names_option_ >> option_;
}
@@ -137,13 +140,18 @@ namespace
return;
}
+ if (!options.exclude_base ())
+ inherits (c, inherits_base_);
+
names (c, names_option_);
}
private:
- bool generated_;
option option_;
traversal::names names_option_;
+
+ traversal::class_ base_;
+ traversal::inherits inherits_base_;
};
}