summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cs/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cs/Gen.cpp')
-rw-r--r--cpp/src/slice2cs/Gen.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 31ebf05c673..f5890cd347b 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -2728,6 +2728,11 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << eb;
_out << eb;
+ _out << sp << nl << "public static Ice.OptionalFormat optionalFormat()";
+ _out << sb;
+ _out << nl << "return " << getOptionalFormat(p->declaration()) << ';';
+ _out << eb;
+
_out << sp << nl << "private Ice.InputStream _in;";
_out << nl << "private IceInternal.ParamPatcher<" << scoped << "> _pp;";
@@ -3691,6 +3696,11 @@ Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p)
_out << nl << "return v__;";
_out << eb;
+ _out << sp << nl << "public static Ice.OptionalFormat optionalFormat()";
+ _out << sb;
+ _out << nl << "return " << getOptionalFormat(p) << ';';
+ _out << eb;
+
_out << eb;
}
@@ -4093,6 +4103,11 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
_out << nl << "return v__;";
_out << eb;
+ _out << sp << nl << "public static Ice.OptionalFormat optionalFormat()";
+ _out << sb;
+ _out << nl << "return " << getOptionalFormat(p) << ';';
+ _out << eb;
+
_out << eb;
}
}
@@ -5471,6 +5486,12 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << eb;
_out << nl << "return null;";
_out << eb;
+
+ _out << sp << nl << "public static Ice.OptionalFormat optionalFormat()";
+ _out << sb;
+ _out << nl << "return Ice.OptionalFormat.FSize;";
+ _out << eb;
+
}
_out << sp << nl << "#endregion"; // Marshaling support
@@ -5527,6 +5548,11 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
writeSequenceMarshalUnmarshalCode(_out, p, "v__", false, true, false);
_out << nl << "return v__;";
_out << eb;
+
+ _out << sp << nl << "public static Ice.OptionalFormat optionalFormat()";
+ _out << sb;
+ _out << nl << "return " << getOptionalFormat(p) << ';';
+ _out << eb;
}
_out << eb;
@@ -5798,6 +5824,11 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
_out << eb;
_out << nl << "return r__;";
_out << eb;
+
+ _out << sp << nl << "public static Ice.OptionalFormat optionalFormat()";
+ _out << sb;
+ _out << nl << "return " << getOptionalFormat(p) << ';';
+ _out << eb;
}
_out << eb;