summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/protobuf/Test.ice
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/protobuf/Test.ice')
-rw-r--r--cpp/test/Ice/protobuf/Test.ice61
1 files changed, 61 insertions, 0 deletions
diff --git a/cpp/test/Ice/protobuf/Test.ice b/cpp/test/Ice/protobuf/Test.ice
new file mode 100644
index 00000000000..58190d47ade
--- /dev/null
+++ b/cpp/test/Ice/protobuf/Test.ice
@@ -0,0 +1,61 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef TEST_ICE
+#define TEST_ICE
+
+[["cpp:include:Test.pb.h"]]
+
+module Test
+{
+
+["cpp:protobuf:test::Message"] sequence<byte> Message;
+
+["ami"] class MyClass
+{
+ void shutdown();
+
+ Message opMessage(Message i, out Message o);
+
+ ["amd"] Message opMessageAMD(Message i, out Message o);
+};
+
+// Remaining type definitions are there to verify that the generated
+// code compiles correctly.
+
+sequence<Message> SLS;
+sequence<SLS> SLSS;
+dictionary<int, Message> SLD;
+dictionary<int, SLS> SLSD;
+
+//
+// The following doesn't compile since the generated protobuf type
+// doesn't define operator== or operator<
+//
+// struct Foo
+// {
+// Message SLmem;
+// SLS SLSmem;
+// };
+
+exception Bar
+{
+ Message SLmem;
+ SLS SLSmem;
+};
+
+class Baz
+{
+ Message SLmem;
+ SLS SLSmem;
+};
+
+};
+
+#endif