summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/CPlusPlusUtil.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2012-05-08 18:14:39 -0700
committerMark Spruiell <mes@zeroc.com>2012-05-08 18:14:39 -0700
commit7774bb92669779fd165a0510a360fdaecd69f0c3 (patch)
tree8ea8bba6cac4128cd3e511ff21534db130ff8e49 /cpp/src/Slice/CPlusPlusUtil.cpp
parentFixed ICE-4709, batch requests and UnmarshalOutOfBoundsException (diff)
downloadice-7774bb92669779fd165a0510a360fdaecd69f0c3.tar.bz2
ice-7774bb92669779fd165a0510a360fdaecd69f0c3.tar.xz
ice-7774bb92669779fd165a0510a360fdaecd69f0c3.zip
* C++ implementation for compact/sliced formats
* C++ implementation for "preserve-slice" metadata * C++ tests for compact/sliced/preserved types * Updated stream API * Python changes for stream API * Python tests for compact/sliced formats * Added Ice.Default.SlicedFormat property
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
index ab17e941fa8..98d2aa98510 100644
--- a/cpp/src/Slice/CPlusPlusUtil.cpp
+++ b/cpp/src/Slice/CPlusPlusUtil.cpp
@@ -483,6 +483,25 @@ Slice::operationModeToString(Operation::Mode mode)
return "???";
}
+string
+Slice::formatTypeToString(FormatType type)
+{
+ switch(type)
+ {
+ case DefaultFormat:
+ return "::Ice::DefaultFormat";
+ case CompactFormat:
+ return "::Ice::CompactFormat";
+ case SlicedFormat:
+ return "::Ice::SlicedFormat";
+
+ default:
+ assert(false);
+ }
+
+ return "???";
+}
+
//
// If the passed name is a keyword, return the name with a "_cxx_" prefix;
// otherwise, return the name unchanged.
@@ -634,8 +653,8 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string&
}
else
{
- out << nl << stream << deref << "read("
- << scope << "__patch__" << cl->name() << "Ptr, &" << fixedParam << ");";
+ out << nl << stream << deref << "read(" << scope << "__patch__" << cl->name() << "Ptr, &" << fixedParam
+ << ");";
}
return;