diff options
author | Marc Laukien <marc@zeroc.com> | 2001-09-07 21:31:09 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-09-07 21:31:09 +0000 |
commit | 3bc54265fc832fbd3da9dd17cfda4f8f0e26874c (patch) | |
tree | 2f7a19e6f6127ae26b07a489e837b8d79b565b20 /cpp/src/slice2cpp/GenUtil.cpp | |
parent | Started to add structs and maps (diff) | |
download | ice-3bc54265fc832fbd3da9dd17cfda4f8f0e26874c.tar.bz2 ice-3bc54265fc832fbd3da9dd17cfda4f8f0e26874c.tar.xz ice-3bc54265fc832fbd3da9dd17cfda4f8f0e26874c.zip |
sequence, dictionary
Diffstat (limited to 'cpp/src/slice2cpp/GenUtil.cpp')
-rw-r--r-- | cpp/src/slice2cpp/GenUtil.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/cpp/src/slice2cpp/GenUtil.cpp b/cpp/src/slice2cpp/GenUtil.cpp index 4249d7a7cda..1a94c7a1a41 100644 --- a/cpp/src/slice2cpp/GenUtil.cpp +++ b/cpp/src/slice2cpp/GenUtil.cpp @@ -287,21 +287,29 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& return; } - VectorPtr vec = VectorPtr::dynamicCast(type); - if (vec) + SequencePtr seq = SequencePtr::dynamicCast(type); + if (seq) { - if (BuiltinPtr::dynamicCast(vec->type())) + if (BuiltinPtr::dynamicCast(seq->type())) { out << nl << stream << "->" << func << param << ");"; } else { - out << nl << vec->scope() << "::__" << func << stream << ", " << param << ", " << vec->scope() - << "::__U__" << vec->name() << "());"; + out << nl << seq->scope() << "::__" << func << stream << ", " << param << ", " << seq->scope() + << "::__U__" << seq->name() << "());"; } return; } + DictionaryPtr dict = DictionaryPtr::dynamicCast(type); + if (dict) + { + out << nl << dict->scope() << "::__" << func << stream << ", " << param << ", " << dict->scope() + << "::__U__" << dict->name() << "());"; + return; + } + NativePtr native = NativePtr::dynamicCast(type); assert(!native); // TODO |