summaryrefslogtreecommitdiff
path: root/cli/inline.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-06-02 17:22:12 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-06-02 17:22:12 +0200
commited60746355044dd39acd82b8f42c4d9886914567 (patch)
treea958825cb9bca8960eafb41c373d91e22ca9e4ed /cli/inline.cxx
parent62166bfe7031522bd851eb5d7047a19182e24a45 (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/inline.cxx')
-rw-r--r--cli/inline.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/cli/inline.cxx b/cli/inline.cxx
index 0d1393d..702bd6c 100644
--- a/cli/inline.cxx
+++ b/cli/inline.cxx
@@ -32,6 +32,24 @@ namespace
<< "{"
<< "this->" << emember (o) << " = x;"
<< "}";
+
+ if (specifier && type != "bool")
+ {
+ string spec (especifier (o));
+
+ os << inl << "bool " << scope << "::" << endl
+ << spec << " () const"
+ << "{"
+ << "return this->" << especifier_member (o) << ";"
+ << "}";
+
+ if (modifier)
+ os << inl << "void " << scope << "::" << endl
+ << spec << "(bool x)"
+ << "{"
+ << "this->" << especifier_member (o) << " = x;"
+ << "}";
+ }
}
};