summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/CPlusPlusUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
index adf24fd7267..cb0da979e08 100644
--- a/cpp/src/Slice/CPlusPlusUtil.cpp
+++ b/cpp/src/Slice/CPlusPlusUtil.cpp
@@ -273,6 +273,35 @@ Slice::outputTypeToString(const TypePtr& type)
return "???";
}
+string
+Slice::operationModeToString(Operation::Mode mode)
+{
+ switch(mode)
+ {
+ case Operation::Normal:
+ {
+ return "::Ice::Normal";
+ }
+
+ case Operation::Nonmutating:
+ {
+ return "::Ice::Nonmutating";
+ }
+
+ case Operation::Idempotent:
+ {
+ return "::Ice::Idempotent";
+ }
+
+ default:
+ {
+ assert(false);
+ }
+ }
+
+ return "???";
+}
+
//
// If the passed name is a keyword, return the name with a "_cxx_" prefix;
// otherwise, return the name unchanged.