summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/RubyUtil.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2007-06-21 16:12:45 -0700
committerMark Spruiell <mes@zeroc.com>2007-06-21 16:12:45 -0700
commitd9de8a8ecb5ab03263696aa89cf3546be0ef93ed (patch)
treee5cb0275241018e28e04d2bb834463cf0dd3a1e8 /cpp/src/Slice/RubyUtil.cpp
parentbug 2157 - removing clone/ice_hash (diff)
downloadice-d9de8a8ecb5ab03263696aa89cf3546be0ef93ed.tar.bz2
ice-d9de8a8ecb5ab03263696aa89cf3546be0ef93ed.tar.xz
ice-d9de8a8ecb5ab03263696aa89cf3546be0ef93ed.zip
bug 2157 - deprecating LocalObject mapping
Diffstat (limited to 'cpp/src/Slice/RubyUtil.cpp')
-rw-r--r--cpp/src/Slice/RubyUtil.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp
index f0c664629f8..bd995ce21aa 100644
--- a/cpp/src/Slice/RubyUtil.cpp
+++ b/cpp/src/Slice/RubyUtil.cpp
@@ -182,9 +182,13 @@ Slice::Ruby::CodeVisitor::visitClassDecl(const ClassDeclPtr& p)
string name = "T_" + fixIdent(p->name(), IdentToUpper);
_out << sp << nl << "if not defined?(" << getAbsolute(p, IdentToUpper, "T_") << ')';
_out.inc();
- _out << nl << name << " = ::Ice::__declareClass('" << scoped << "')";
- if(!p->isLocal())
+ if(p->isLocal())
{
+ _out << nl << name << " = ::Ice::__declareLocalClass('" << scoped << "')";
+ }
+ else
+ {
+ _out << nl << name << " = ::Ice::__declareClass('" << scoped << "')";
_out << nl << name << "Prx = ::Ice::__declareProxy('" << scoped << "')";
}
_out.dec();
@@ -562,9 +566,13 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
//
_out << sp << nl << "if not defined?(" << getAbsolute(p, IdentToUpper, "T_") << ')';
_out.inc();
- _out << nl << "T_" << name << " = ::Ice::__declareClass('" << scoped << "')";
- if(!p->isLocal())
+ if(p->isLocal())
+ {
+ _out << nl << "T_" << name << " = ::Ice::__declareLocalClass('" << scoped << "')";
+ }
+ else
{
+ _out << nl << "T_" << name << " = ::Ice::__declareClass('" << scoped << "')";
_out << nl << "T_" << name << "Prx = ::Ice::__declareProxy('" << scoped << "')";
}
_out.dec();