diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2008-02-12 13:12:06 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2008-02-12 13:12:06 -0330 |
commit | 3af302d7e122640425a50cfa085d15e1384b1501 (patch) | |
tree | 82dfc425dc3e731a2569e82e5aaf3c4bd4a524a3 /cpp/src | |
parent | Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff) | |
download | ice-3af302d7e122640425a50cfa085d15e1384b1501.tar.bz2 ice-3af302d7e122640425a50cfa085d15e1384b1501.tar.xz ice-3af302d7e122640425a50cfa085d15e1384b1501.zip |
Bug 2582 - Added ice_staticId
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Slice/PythonUtil.cpp | 9 | ||||
-rw-r--r-- | cpp/src/Slice/RubyUtil.cpp | 12 |
2 files changed, 21 insertions, 0 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index 75ed5d400b8..517fabbbdf5 100644 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -526,6 +526,15 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) _out.inc(); _out << nl << "return '" << scoped << "'"; _out.dec(); + + // + // ice_staticId + // + _out << sp << nl << "def ice_staticId():"; + _out.inc(); + _out << nl << "return '" << scoped << "'"; + _out.dec(); + _out << nl << "ice_staticId = staticmethod(ice_staticId)"; } if(!ops.empty()) diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp index 3322899a24e..2f861a8e283 100644 --- a/cpp/src/Slice/RubyUtil.cpp +++ b/cpp/src/Slice/RubyUtil.cpp @@ -407,6 +407,12 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "class " << name; _out.inc(); _out << nl << "include " << name << "_mixin"; + _out << nl; + _out << nl << "def " << name << ".ice_staticId()"; + _out.inc(); + _out << nl << "'" << scoped << "'"; + _out.dec(); + _out << nl << "end"; _out.dec(); _out << nl << "end"; } @@ -422,6 +428,12 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) } _out.inc(); _out << nl << "include " << name << "_mixin"; + _out << nl; + _out << nl << "def " << name << ".ice_staticId()"; + _out.inc(); + _out << nl << "'" << scoped << "'"; + _out.dec(); + _out << nl << "end"; // // initialize |