summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-07-05 12:10:49 +0200
committerBenoit Foucher <benoit@zeroc.com>2017-07-05 12:10:49 +0200
commite706fb2ceb23b1ee3c225f6d9569c58359b4ee72 (patch)
tree56d6d90d0a079d89ee7b2ab1c1013055cdca6e29 /cpp/src/slice2cpp/Gen.cpp
parentICE-8218 - Windows OpenSSL test build failure with parallel builds (diff)
downloadice-e706fb2ceb23b1ee3c225f6d9569c58359b4ee72.tar.bz2
ice-e706fb2ceb23b1ee3c225f6d9569c58359b4ee72.tar.xz
ice-e706fb2ceb23b1ee3c225f6d9569c58359b4ee72.zip
Fixed ICE-8217 - added ice_getSlicedData method to Ice values and Ice::SlicedData::clear method to break cyclic references
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 990ddd57d47..f017ad66b4b 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -2691,6 +2691,8 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
if(preserved && !basePreserved)
{
+ H << sp << nl << "virtual ::Ice::SlicedDataPtr ice_getSlicedData() const;";
+
H << sp;
H << nl << "virtual void _iceWrite(::Ice::OutputStream*) const;";
H << nl << "virtual void _iceRead(::Ice::InputStream*);";
@@ -2707,6 +2709,12 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
if(preserved && !basePreserved)
{
C << sp;
+ C << nl << "::Ice::SlicedDataPtr" << nl << scoped.substr(2) << "::ice_getSlicedData() const";
+ C << sb;
+ C << nl << "return _iceSlicedData;";
+ C << eb;
+
+ C << sp;
C << nl << "void" << nl << scoped.substr(2) << "::_iceWrite(::Ice::OutputStream* ostr) const";
C << sb;
C << nl << "ostr->startValue(_iceSlicedData);";
@@ -7314,6 +7322,14 @@ Slice::Gen::Cpp11ValueVisitor::visitClassDefEnd(const ClassDefPtr& p)
if(preserved && !basePreserved)
{
+ H << sp << nl << "virtual ::std::shared_ptr<::Ice::SlicedData> ice_getSlicedData() const override;";
+
+ C << sp;
+ C << nl << "::std::shared_ptr<::Ice::SlicedData>" << nl << scoped.substr(2) << "::ice_getSlicedData() const";
+ C << sb;
+ C << nl << "return _iceSlicedData;";
+ C << eb;
+
H << sp;
H << nl << "virtual void _iceWrite(::Ice::OutputStream*) const override;";
H << nl << "virtual void _iceRead(::Ice::InputStream*) override;";