From 80a611d355a31e0f11e3f69339ccacf378cb3bb3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 21 Jun 2012 10:25:57 +0200 Subject: Generate "direct access" modifier in addition to "setter" --- cli/header.cxx | 6 ++++++ cli/inline.cxx | 8 ++++++++ 2 files changed, 14 insertions(+) (limited to 'cli') 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") { -- cgit v1.1