summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/BasicStream.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-10-16 18:06:37 +0000
committerMarc Laukien <marc@zeroc.com>2001-10-16 18:06:37 +0000
commitfc646735c001a1f286c2ff4175bef1dfc3a67f42 (patch)
treec35bd7e20e836da1f9de2393d064b872e4316a6c /cpp/src/Ice/BasicStream.cpp
parentfixed memory leak (diff)
downloadice-fc646735c001a1f286c2ff4175bef1dfc3a67f42.tar.bz2
ice-fc646735c001a1f286c2ff4175bef1dfc3a67f42.tar.xz
ice-fc646735c001a1f286c2ff4175bef1dfc3a67f42.zip
_hash, fixes to proxy equivalence/compare operations
Diffstat (limited to 'cpp/src/Ice/BasicStream.cpp')
-rw-r--r--cpp/src/Ice/BasicStream.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp
index 4973f7506c7..113376032fa 100644
--- a/cpp/src/Ice/BasicStream.cpp
+++ b/cpp/src/Ice/BasicStream.cpp
@@ -606,6 +606,16 @@ IceInternal::BasicStream::read(vector<Double>& v)
void
IceInternal::BasicStream::write(const string& v)
{
+ //
+ // TODO: Revise reading/writing of strings and wstrings. Strings
+ // shouldn't be null-terminated on the wire. Instead, the string
+ // size should be transmitted first, and strings should be allowed
+ // to have 0 bytes. Only one initial Int parameter is sufficient,
+ // with negative values indicating redirection, and positive
+ // values for string lengths. Strings with length 0 should never
+ // be redirected.
+ //
+
map<string, Int>::const_iterator p = _encapsStack.back().stringsWritten.find(v);
if (p != _encapsStack.back().stringsWritten.end())
{
@@ -643,6 +653,7 @@ IceInternal::BasicStream::write(const vector<string>& v)
void
IceInternal::BasicStream::read(string& v)
{
+ // TODO: Needs to be revised. See comments in write(const string&).
Int idx;
read(idx);
@@ -695,6 +706,7 @@ IceInternal::BasicStream::read(vector<string>& v)
void
IceInternal::BasicStream::write(const wstring& v)
{
+ // TODO: Needs to be revised. See comments in write(const string&).
map<wstring, Int>::const_iterator p = _encapsStack.back().wstringsWritten.find(v);
if (p != _encapsStack.back().wstringsWritten.end())
{
@@ -728,6 +740,7 @@ IceInternal::BasicStream::write(const vector<wstring>& v)
void
IceInternal::BasicStream::read(wstring& v)
{
+ // TODO: Needs to be revised. See comments in write(const string&).
Int idx;
read(idx);