summaryrefslogtreecommitdiff
path: root/cli/header.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/header.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/header.cxx')
-rw-r--r--cli/header.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/cli/header.cxx b/cli/header.cxx
index ad11aa7..e43c0af 100644
--- a/cli/header.cxx
+++ b/cli/header.cxx
@@ -27,6 +27,20 @@ namespace
os << "void" << endl
<< name << " (const " << type << "&);"
<< endl;
+
+ if (specifier && type != "bool")
+ {
+ string spec (especifier (o));
+
+ os << "bool" << endl
+ << spec << " () const;"
+ << endl;
+
+ if (modifier)
+ os << "void" << endl
+ << spec << " (bool);"
+ << endl;
+ }
}
};
@@ -43,6 +57,9 @@ namespace
string type (o.type ().name ());
os << type << " " << member << ";";
+
+ if (specifier && type != "bool")
+ os << "bool " << especifier_member (o) << ";";
}
};