summaryrefslogtreecommitdiff
path: root/cpp/include/Ice/InputStream.h
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-03-23 15:29:25 +0100
committerBenoit Foucher <benoit@zeroc.com>2017-03-23 15:29:25 +0100
commit1597a75419cd8049252cfbca6fce6ae95ef8b2c7 (patch)
tree2b2c858df1dbe68c1d576cae06c4713fd2ad5c40 /cpp/include/Ice/InputStream.h
parentUse Ice\None with PHP namespace mapping (diff)
downloadice-1597a75419cd8049252cfbca6fce6ae95ef8b2c7.tar.bz2
ice-1597a75419cd8049252cfbca6fce6ae95ef8b2c7.tar.xz
ice-1597a75419cd8049252cfbca6fce6ae95ef8b2c7.zip
Fix for ICE-7125 - Added support for Ice.ClassGraphDepthMax
Diffstat (limited to 'cpp/include/Ice/InputStream.h')
-rw-r--r--cpp/include/Ice/InputStream.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/cpp/include/Ice/InputStream.h b/cpp/include/Ice/InputStream.h
index 4684d0eda69..363f41767ed 100644
--- a/cpp/include/Ice/InputStream.h
+++ b/cpp/include/Ice/InputStream.h
@@ -138,6 +138,8 @@ public:
void setTraceSlicing(bool);
+ void setClassGraphDepthMax(size_t);
+
void* getClosure() const;
void* setClosure(void*);
@@ -738,8 +740,10 @@ private:
protected:
- EncapsDecoder(InputStream* stream, Encaps* encaps, bool sliceValues, const Ice::ValueFactoryManagerPtr& f) :
- _stream(stream), _encaps(encaps), _sliceValues(sliceValues), _valueFactoryManager(f), _typeIdIndex(0)
+ EncapsDecoder(InputStream* stream, Encaps* encaps, bool sliceValues, size_t classGraphDepthMax,
+ const Ice::ValueFactoryManagerPtr& f) :
+ _stream(stream), _encaps(encaps), _sliceValues(sliceValues), _classGraphDepthMax(classGraphDepthMax),
+ _classGraphDepth(0), _valueFactoryManager(f), _typeIdIndex(0)
{
}
@@ -756,6 +760,7 @@ private:
{
PatchFunc patchFunc;
void* patchAddr;
+ size_t classGraphDepth;
};
typedef std::vector<PatchEntry> PatchList;
typedef std::map<Int, PatchList> PatchMap;
@@ -763,6 +768,8 @@ private:
InputStream* _stream;
Encaps* _encaps;
const bool _sliceValues;
+ const size_t _classGraphDepthMax;
+ size_t _classGraphDepth;
Ice::ValueFactoryManagerPtr _valueFactoryManager;
// Encapsulation attributes for object un-marshalling
@@ -781,8 +788,10 @@ private:
{
public:
- EncapsDecoder10(InputStream* stream, Encaps* encaps, bool sliceValues, const Ice::ValueFactoryManagerPtr& f) :
- EncapsDecoder(stream, encaps, sliceValues, f), _sliceType(NoSlice)
+ EncapsDecoder10(InputStream* stream, Encaps* encaps, bool sliceValues, size_t classGraphDepthMax,
+ const Ice::ValueFactoryManagerPtr& f) :
+ EncapsDecoder(stream, encaps, sliceValues, classGraphDepthMax, f),
+ _sliceType(NoSlice)
{
}
@@ -814,8 +823,10 @@ private:
{
public:
- EncapsDecoder11(InputStream* stream, Encaps* encaps, bool sliceValues, const Ice::ValueFactoryManagerPtr& f) :
- EncapsDecoder(stream, encaps, sliceValues, f), _preAllocatedInstanceData(0), _current(0), _valueIdIndex(1)
+ EncapsDecoder11(InputStream* stream, Encaps* encaps, bool sliceValues, size_t classGraphDepthMax,
+ const Ice::ValueFactoryManagerPtr& f) :
+ EncapsDecoder(stream, encaps, sliceValues, classGraphDepthMax, f),
+ _preAllocatedInstanceData(0), _current(0), _valueIdIndex(1)
{
}
@@ -956,6 +967,8 @@ private:
bool _traceSlicing;
+ size_t _classGraphDepthMax;
+
void* _closure;
bool _sliceValues;