diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-03-30 15:34:00 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-03-30 15:34:00 +0000 |
commit | 7be9675ec7f3c74f721bede6c94d3d214ee31d2c (patch) | |
tree | eea38601215022b09a2833165b4d8581e253c2a8 /cppe/src/IceE/BasicStream.cpp | |
parent | Fixed ice_timeout/ice_compress for indirect proxies (diff) | |
download | ice-7be9675ec7f3c74f721bede6c94d3d214ee31d2c.tar.bz2 ice-7be9675ec7f3c74f721bede6c94d3d214ee31d2c.tar.xz ice-7be9675ec7f3c74f721bede6c94d3d214ee31d2c.zip |
Added wstring support
Diffstat (limited to 'cppe/src/IceE/BasicStream.cpp')
-rw-r--r-- | cppe/src/IceE/BasicStream.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cppe/src/IceE/BasicStream.cpp b/cppe/src/IceE/BasicStream.cpp index 3275ac724fb..c47bde6e269 100644 --- a/cppe/src/IceE/BasicStream.cpp +++ b/cppe/src/IceE/BasicStream.cpp @@ -1327,6 +1327,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); |