diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Slice/PythonUtil.cpp | 10 | ||||
-rw-r--r-- | cpp/src/Slice/RubyUtil.cpp | 6 | ||||
-rw-r--r-- | cpp/src/slice2php/Main.cpp | 5 |
3 files changed, 21 insertions, 0 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index 59f4e98ab51..bfdf33a7b8d 100644 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -779,7 +779,17 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) _out.dec(); _out << nl << "uncheckedCast = staticmethod(uncheckedCast)"; + + // + // ice_staticId + // + _out << sp << nl << "def ice_staticId():"; + _out.inc(); + _out << nl << "return '" << scoped << "'"; _out.dec(); + _out << nl << "ice_staticId = staticmethod(ice_staticId)"; + + _out.dec(); _out << sp << nl << "_M_" << prxType << " = IcePy.defineProxy('" << scoped << "', " << prxName << ")"; } diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp index a93af8ec9fd..79a8185d2f4 100644 --- a/cpp/src/Slice/RubyUtil.cpp +++ b/cpp/src/Slice/RubyUtil.cpp @@ -581,6 +581,12 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) _out.dec(); _out << nl << "end"; + _out << nl << "def " << name << "Prx.ice_staticId()"; + _out.inc(); + _out << nl << "'" << scoped << "'"; + _out.dec(); + _out << nl << "end"; + _out.dec(); _out << nl << "end"; // End of proxy class. } diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp index 0abc9a3f25a..5cd4afc6a5c 100644 --- a/cpp/src/slice2php/Main.cpp +++ b/cpp/src/slice2php/Main.cpp @@ -373,6 +373,11 @@ CodeVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "return $proxy->ice_uncheckedCast('" << scoped << "', $facet);"; _out << eb; + _out << sp << nl << "public static function ice_staticId()"; + _out << sb; + _out << nl << "return '" << scoped << "';"; + _out << eb; + _out << eb; } |