diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-02-07 14:26:23 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-02-07 14:26:23 +0000 |
commit | 3d5721d40940b2361d0708b81c390f490e5e06b3 (patch) | |
tree | 0c82879298a1b197c85a885332849d4c2072bda8 /cpp/include | |
parent | Fixed windows build of custom AMD server (diff) | |
download | ice-3d5721d40940b2361d0708b81c390f490e5e06b3.tar.bz2 ice-3d5721d40940b2361d0708b81c390f490e5e06b3.tar.xz ice-3d5721d40940b2361d0708b81c390f490e5e06b3.zip |
Fixed sequences of classes
Diffstat (limited to 'cpp/include')
-rw-r--r-- | cpp/include/Ice/BasicStream.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cpp/include/Ice/BasicStream.h b/cpp/include/Ice/BasicStream.h index 1a8be26512f..efd7944e17f 100644 --- a/cpp/include/Ice/BasicStream.h +++ b/cpp/include/Ice/BasicStream.h @@ -515,6 +515,27 @@ readSequence5(::IceInternal::BasicStream* __is, T& seq, void (*func)(::IceIntern } } +// Sequences of Classes +template<typename T> void +readSequence6(::IceInternal::BasicStream* __is, T& seq, int elemSize, void (*func)(void*, ::Ice::ObjectPtr&)) +{ + ::Ice::Int size; + __is->readSize(size); + T(size).swap(seq); + if(size > 0) + { + __is->startSeq(size, elemSize); + typedef typename T::iterator I; + for(I p = seq.begin(); p != seq.end(); ++p) + { + __is->read(*func, &(*p)); + __is->checkSeq(); + __is->endElement(); + } + __is->endSeq(size); + } +} + } // End namespace IceInternal #endif |