summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/CPlusPlusUtil.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2004-09-10 00:36:54 +0000
committerMichi Henning <michi@zeroc.com>2004-09-10 00:36:54 +0000
commit350116facebc47db9e969190f30f39a09f5122fe (patch)
tree73b2e6c778079d7454aff97287c3fd38c9d3a67a /cpp/src/Slice/CPlusPlusUtil.cpp
parentminor fix (diff)
downloadice-350116facebc47db9e969190f30f39a09f5122fe.tar.bz2
ice-350116facebc47db9e969190f30f39a09f5122fe.tar.xz
ice-350116facebc47db9e969190f30f39a09f5122fe.zip
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.
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp14
1 files changed, 7 insertions, 7 deletions
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;