From 350116facebc47db9e969190f30f39a09f5122fe Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Fri, 10 Sep 2004 00:36:54 +0000 Subject: Fixed the way keywords are escaped. A Slice keyword is now escaped only where needed, instead of everywhere. That is, Slice "while" maps to "_while", but "whilePrx". This makes the generated code a lot easier to use. Fixed a bug in the --impl code -- fully-qualified names caused syntax errors in the generated method definitions. --- cpp/src/Slice/CPlusPlusUtil.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp') diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index d933f820c9e..d3431c750f3 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -128,13 +128,13 @@ Slice::typeToString(const TypePtr& type) ClassDeclPtr cl = ClassDeclPtr::dynamicCast(type); if(cl) { - return fixKwd(cl->scoped()) + "Ptr"; + return fixKwd(cl->scoped() + "Ptr"); } ProxyPtr proxy = ProxyPtr::dynamicCast(type); if(proxy) { - return fixKwd(proxy->_class()->scoped()) + "Prx"; + return fixKwd(proxy->_class()->scoped() + "Prx"); } ContainedPtr contained = ContainedPtr::dynamicCast(type); @@ -190,13 +190,13 @@ Slice::inputTypeToString(const TypePtr& type) ClassDeclPtr cl = ClassDeclPtr::dynamicCast(type); if(cl) { - return "const " + fixKwd(cl->scoped()) + "Ptr&"; + return "const " + fixKwd(cl->scoped() + "Ptr") + "&"; } ProxyPtr proxy = ProxyPtr::dynamicCast(type); if(proxy) { - return "const " + fixKwd(proxy->_class()->scoped()) + "Prx&"; + return "const " + fixKwd(proxy->_class()->scoped() + "Prx") + "&"; } EnumPtr en = EnumPtr::dynamicCast(type); @@ -241,13 +241,13 @@ Slice::outputTypeToString(const TypePtr& type) ClassDeclPtr cl = ClassDeclPtr::dynamicCast(type); if(cl) { - return fixKwd(cl->scoped()) + "Ptr&"; + return fixKwd(cl->scoped() + "Ptr") + "&"; } ProxyPtr proxy = ProxyPtr::dynamicCast(type); if(proxy) { - return fixKwd(proxy->_class()->scoped()) + "Prx&"; + return fixKwd(proxy->_class()->scoped() + "Prx") + "&"; } ContainedPtr contained = ContainedPtr::dynamicCast(type); @@ -407,7 +407,7 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& else { out << nl << stream << deref << "read(" - << scope << "__patch__" << fixKwd(cl->name()) << "Ptr, &" << fixedParam << ");"; + << scope << "__patch__" << cl->name() << "Ptr, &" << fixedParam << ");"; } return; -- cgit v1.2.3