summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/custom/TestI.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2012-09-19 12:00:52 -0400
committerBernard Normier <bernard@zeroc.com>2012-09-19 12:09:56 -0400
commit2068ac0ec6ce1f239abc73ff23407326ba33ffbf (patch)
tree110b52821232cdc5ffb1d6cd4f5f2110ed520f4d /cpp/test/Ice/custom/TestI.cpp
parentPython support for optionals (diff)
downloadice-2068ac0ec6ce1f239abc73ff23407326ba33ffbf.tar.bz2
ice-2068ac0ec6ce1f239abc73ff23407326ba33ffbf.tar.xz
ice-2068ac0ec6ce1f239abc73ff23407326ba33ffbf.zip
Partial fix for ICE-3393:
- strealined StreamTraits.h - added ability to define custom dictionaries in C++ (with cpp:type:...) - added tests for custom dictionaries in test/Ice/custom Fixed ICE-4867: - clear parameter before unmarshaling into dictionary/map in C++ - added test
Diffstat (limited to 'cpp/test/Ice/custom/TestI.cpp')
-rw-r--r--cpp/test/Ice/custom/TestI.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/cpp/test/Ice/custom/TestI.cpp b/cpp/test/Ice/custom/TestI.cpp
index 7fe8a0f1b9e..2e148c6f2cd 100644
--- a/cpp/test/Ice/custom/TestI.cpp
+++ b/cpp/test/Ice/custom/TestI.cpp
@@ -337,6 +337,27 @@ TestIntfI::opOutRangeByteSeq(const Test::ByteSeq& data, Test::ByteSeq& copy, con
copy = data;
}
+Test::IntStringDict
+TestIntfI::opIntStringDict(const Test::IntStringDict& data, Test::IntStringDict& copy, const Ice::Current&)
+{
+ copy = data;
+ return data;
+}
+
+Test::CustomMap<Ice::Long, Ice::Long>
+TestIntfI::opVarDict(const Test::CustomMap<std::string, Ice::Int>& data,
+ Test::CustomMap<std::string, Ice::Int>& copy, const Ice::Current&)
+{
+ copy = data;
+
+ Test::CustomMap<Ice::Long, Ice::Long> result;
+ for(Ice::Long i = 0; i < 1000; ++i)
+ {
+ result[i] = i*i;
+ }
+ return result;
+}
+
void
TestIntfI::shutdown(const Ice::Current& current)
{