diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-21 10:25:57 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-21 10:25:57 +0200 |
commit | 80a611d355a31e0f11e3f69339ccacf378cb3bb3 (patch) | |
tree | 1093043381f631d57d3fd555bc88f2ce92b77748 | |
parent | 9465db62c36d98b40cfc1048dfdec571b93565e7 (diff) |
Generate "direct access" modifier in addition to "setter"
-rw-r--r-- | cli/header.cxx | 6 | ||||
-rw-r--r-- | cli/inline.cxx | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/cli/header.cxx b/cli/header.cxx index bfef712..26c23b8 100644 --- a/cli/header.cxx +++ b/cli/header.cxx @@ -24,9 +24,15 @@ namespace << endl; if (modifier) + { + os << type << "&" << endl + << name << " ();" + << endl; + os << "void" << endl << name << " (const " << type << "&);" << endl; + } if (specifier && type != "bool") { diff --git a/cli/inline.cxx b/cli/inline.cxx index 0638f30..bb54962 100644 --- a/cli/inline.cxx +++ b/cli/inline.cxx @@ -27,11 +27,19 @@ namespace << "}"; if (modifier) + { + os << inl << type << "& " << scope << "::" << endl + << name << " ()" + << "{" + << "return this->" << emember (o) << ";" + << "}"; + os << inl << "void " << scope << "::" << endl << name << "(const " << type << "& x)" << "{" << "this->" << emember (o) << " = x;" << "}"; + } if (specifier && type != "bool") { |