diff options
Diffstat (limited to 'cli/runtime-source.cxx')
-rw-r--r-- | cli/runtime-source.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cli/runtime-source.cxx b/cli/runtime-source.cxx index c76b745..7ccf404 100644 --- a/cli/runtime-source.cxx +++ b/cli/runtime-source.cxx @@ -412,6 +412,25 @@ generate_runtime_source (context& ctx) << "}"; } + // Option description. + // + if (ctx.options.generate_description ()) + { + // options + // + os << "void options::" << endl + << "push_back (const option& o)" + << "{" + << "container_type::size_type n (size ());" + << "container_type::push_back (o);" + << "map_[o.name ()] = n;" + << endl + << "for (option_names::const_iterator i (o.aliases ().begin ());" << endl + << "i != o.aliases ().end (); ++i)" << endl + << "map_[*i] = n;" + << "}"; + } + bool sp (ctx.specifier); // parser class template & its specializations |