diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-03-29 17:30:19 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-03-29 17:30:19 +0000 |
commit | dc15f759734848a12e9cf55110c2f34dd510f91d (patch) | |
tree | 54d16f67b41576f98d40933cd6f235868970f520 /cpp/src/Ice/BasicStream.cpp | |
parent | Include fixes (diff) | |
download | ice-dc15f759734848a12e9cf55110c2f34dd510f91d.tar.bz2 ice-dc15f759734848a12e9cf55110c2f34dd510f91d.tar.xz ice-dc15f759734848a12e9cf55110c2f34dd510f91d.zip |
Added support for wstring slice metadata
Diffstat (limited to 'cpp/src/Ice/BasicStream.cpp')
-rw-r--r-- | cpp/src/Ice/BasicStream.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index fe9737f7dea..cbbc015b925 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -1355,6 +1355,43 @@ IceInternal::BasicStream::read(vector<string>& v) } void +IceInternal::BasicStream::write(const wstring* begin, const wstring* end) +{ + Int sz = static_cast<Int>(end - begin); + writeSize(sz); + if(sz > 0) + { + for(int i = 0; i < sz; ++i) + { + write(begin[i]); + } + } +} + +void +IceInternal::BasicStream::read(vector<wstring>& v) +{ + Int sz; + readSize(sz); + if(sz > 0) + { + startSeq(sz, 1); + v.resize(sz); + for(int j = 0; j < sz; ++j) + { + read(v[j]); + checkSeq(); + endElement(); + } + endSeq(sz); + } + else + { + v.clear(); + } +} + +void IceInternal::BasicStream::write(const ObjectPrx& v) { _instance->proxyFactory()->proxyToStream(v, this); |