diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-06-02 17:22:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-06-02 17:22:12 +0200 |
commit | ed60746355044dd39acd82b8f42c4d9886914567 (patch) | |
tree | a958825cb9bca8960eafb41c373d91e22ca9e4ed /cli/source.cxx | |
parent | 62166bfe7031522bd851eb5d7047a19182e24a45 (diff) |
Implement generation of specifier functions (--generate-specifier)
These functions determine whether the option was specified on the command
line. New test: specifier.
Diffstat (limited to 'cli/source.cxx')
-rw-r--r-- | cli/source.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cli/source.cxx b/cli/source.cxx index 70a7fc9..c9273f4 100644 --- a/cli/source.cxx +++ b/cli/source.cxx @@ -58,6 +58,10 @@ namespace } else os << " ()"; + + if (specifier && o.type ().name () != "bool") + os << "," << endl + << " " << especifier_member (o) << " (false)"; } private: @@ -86,7 +90,13 @@ namespace { os << "_cli_" << scope << "_map_[\"" << *i << "\"] = " << endl << "&::cli::thunk< " << scope << ", " << type << ", " << - "&" << scope << "::" << member << " >;"; + "&" << scope << "::" << member; + + if (specifier && type != "bool") + os << "," << endl + << " &" << scope << "::" << especifier_member (o); + + os << " >;"; } } }; |