diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-10-04 11:38:44 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-10-04 11:38:44 +0200 |
commit | 6caffa6a23befba0d7a7e4f39e08928ba317866a (patch) | |
tree | f9cbcd6c9226dee050e67e7dbd23ae4f830725aa /cli/source.cxx | |
parent | cfb91e263c22f6f81ae05a2027a2befac6d41e06 (diff) |
Add support for option name aliases and string literals
Diffstat (limited to 'cli/source.cxx')
-rw-r--r-- | cli/source.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/cli/source.cxx b/cli/source.cxx index e9e4365..afac17e 100644 --- a/cli/source.cxx +++ b/cli/source.cxx @@ -65,14 +65,21 @@ namespace virtual void traverse (type& o) { - string name (ename (o)); + using semantics::names; + + string member (emember (o)); string type (o.type ().name ()); string scope (escape (o.scope ().name ())); string map ("_cli_" + scope + "_map_"); - os << "_cli_" << scope << "_map_[\"" << o.name () << "\"] = " << endl - << "&::cli::thunk<" << scope << ", " << type << ", " << - "&" << scope << "::" << emember (o) << ">;"; + names& n (o.named ()); + + for (names::name_iterator i (n.name_begin ()); i != n.name_end (); ++i) + { + os << "_cli_" << scope << "_map_[\"" << *i << "\"] = " << endl + << "&::cli::thunk<" << scope << ", " << type << ", " << + "&" << scope << "::" << member << ">;"; + } } }; |