diff options
author | Mark Spruiell <mes@zeroc.com> | 2012-09-14 15:30:12 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2012-09-14 15:30:12 -0700 |
commit | c912d30d47799bbba77d0f2532704d8aaba12a4a (patch) | |
tree | 8611fdb0b73a9a78f7c319ca4bb08f1f9d2e9cd0 /cpp/include/Ice/BasicStream.h | |
parent | Fixed optional test issues (diff) | |
download | ice-c912d30d47799bbba77d0f2532704d8aaba12a4a.tar.bz2 ice-c912d30d47799bbba77d0f2532704d8aaba12a4a.tar.xz ice-c912d30d47799bbba77d0f2532704d8aaba12a4a.zip |
Python support for optionals
Diffstat (limited to 'cpp/include/Ice/BasicStream.h')
-rw-r--r-- | cpp/include/Ice/BasicStream.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cpp/include/Ice/BasicStream.h b/cpp/include/Ice/BasicStream.h index 69bfc1a2e53..fcffd268000 100644 --- a/cpp/include/Ice/BasicStream.h +++ b/cpp/include/Ice/BasicStream.h @@ -457,6 +457,19 @@ public: Ice::Int readAndCheckSeqSize(int); + void startSize() + { + _sizePos = static_cast<int>(b.size()); + write(Ice::Int(0)); + } + + void endSize() + { + assert(_sizePos >= 0); + rewrite(b.size() - _sizePos - 4, _sizePos); + _sizePos = -1; + } + void writeBlob(const std::vector<Ice::Byte>&); void readBlob(std::vector<Ice::Byte>&, Ice::Int); @@ -1126,6 +1139,8 @@ private: int _startSeq; int _minSeqSize; + int _sizePos; + static const Ice::Byte FLAG_HAS_TYPE_ID_STRING; static const Ice::Byte FLAG_HAS_TYPE_ID_INDEX; static const Ice::Byte FLAG_HAS_OPTIONAL_MEMBERS; |