summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-07-06 00:18:03 +0200
committerBenoit Foucher <benoit@zeroc.com>2017-07-06 00:18:03 +0200
commit54d8f3fb0d3d53f851051980f1bc941c4e39a60f (patch)
tree0d8259f0cd48b3ba0a3792556821aa41d6f718a7 /cpp/src/slice2cpp/Gen.cpp
parentFixed ICE-8223 - renamed cloneImpl to _iceCloneImpl (diff)
downloadice-54d8f3fb0d3d53f851051980f1bc941c4e39a60f.tar.bz2
ice-54d8f3fb0d3d53f851051980f1bc941c4e39a60f.tar.xz
ice-54d8f3fb0d3d53f851051980f1bc941c4e39a60f.zip
Added Ice::UserException::ice_getSlicedData and Ice::UnkownSlicedValue::ice_id methods
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index f017ad66b4b..81b0ef1dcc5 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -1193,7 +1193,11 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(preserved && !basePreserved)
{
- H << sp << nl << "virtual void _write(::Ice::OutputStream*) const;";
+ H << sp;
+ H << nl << "virtual ::Ice::SlicedDataPtr ice_getSlicedData() const;";
+
+ H << sp;
+ H << nl << "virtual void _write(::Ice::OutputStream*) const;";
H << nl << "virtual void _read(::Ice::InputStream*);";
string baseName = base ? fixKwd(base->scoped()) : string("::Ice::UserException");
@@ -1215,6 +1219,12 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
H << sp << nl << "::Ice::SlicedDataPtr _slicedData;";
+ C << sp;
+ C << nl << "::Ice::SlicedDataPtr" << nl << scoped.substr(2) << "::ice_getSlicedData() const";
+ C << sb;
+ C << nl << "return _slicedData;";
+ C << eb;
+
C << sp << nl << "void" << nl << scoped.substr(2) << "::_write(::Ice::OutputStream* ostr) const";
C << sb;
C << nl << "ostr->startException(_slicedData);";
@@ -5576,11 +5586,20 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(preserved && !basePreserved)
{
- H << sp << nl << _dllMemberExport << "virtual void _write(::Ice::OutputStream*) const override;";
+ H << sp;
+ H << nl << _dllMemberExport << "virtual ::std::shared_ptr<::Ice::SlicedData> ice_getSlicedData() const override;";
+ H << sp;
+ H << nl << _dllMemberExport << "virtual void _write(::Ice::OutputStream*) const override;";
H << nl << _dllMemberExport << "virtual void _read(::Ice::InputStream*) override;";
H << sp << nl << "::std::shared_ptr<::Ice::SlicedData> _slicedData;";
+ C << sp;
+ C << nl << "::std::shared_ptr<::Ice::SlicedData>" << nl << scoped.substr(2) << "::ice_getSlicedData() const";
+ C << sb;
+ C << nl << "return _slicedData;";
+ C << eb;
+
C << sp << nl << "void" << nl << scoped.substr(2) << "::_write(::Ice::OutputStream* ostr) const";
C << sb;
C << nl << "ostr->startException(_slicedData);";