summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-01-14 14:16:11 +0100
committerJose <jose@zeroc.com>2016-01-14 14:16:11 +0100
commit807949c33d791a9c53a036754d1016fb22e5eb0f (patch)
tree55ef5ef9229a3ce26b6f8159ca6073ed8895ca6b /cpp/test
parentMerge remote-tracking branch 'origin/3.6' (diff)
downloadice-807949c33d791a9c53a036754d1016fb22e5eb0f.tar.bz2
ice-807949c33d791a9c53a036754d1016fb22e5eb0f.tar.xz
ice-807949c33d791a9c53a036754d1016fb22e5eb0f.zip
Add slice2cpp --impl-c++98/--impl-c++11 options
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/Ice/Makefile54
-rw-r--r--cpp/test/Ice/impl/.gitignore9
-rw-r--r--cpp/test/Ice/impl/Makefile60
-rw-r--r--cpp/test/Ice/impl/Makefile.mak78
-rw-r--r--cpp/test/Ice/impl/Server.cpp58
-rw-r--r--cpp/test/Ice/impl/ServerAMD.cpp58
-rw-r--r--cpp/test/Ice/impl/Test.ice278
-rw-r--r--cpp/test/Ice/impl/TestAMD.ice280
8 files changed, 831 insertions, 44 deletions
diff --git a/cpp/test/Ice/Makefile b/cpp/test/Ice/Makefile
index 71e865cb655..b80f75ace0a 100644
--- a/cpp/test/Ice/Makefile
+++ b/cpp/test/Ice/Makefile
@@ -11,7 +11,6 @@ top_srcdir = ../..
include $(top_srcdir)/config/Make.rules
-ifeq ($(CPP11_MAPPING),yes)
SUBDIRS = proxy \
operations \
exceptions \
@@ -39,47 +38,6 @@ SUBDIRS = proxy \
udp \
defaultServant \
defaultValue \
- invoke \
- properties \
- plugin \
- admin \
- metrics \
- enums \
- logger \
- networkProxy \
- services
-else
-SUBDIRS = proxy \
- operations \
- exceptions \
- ami \
- info \
- inheritance \
- facets \
- objects \
- optional \
- faultTolerance \
- location \
- adapterDeactivation \
- slicing \
- gc \
- hash \
- checksum \
- stream \
- dispatcher \
- hold \
- custom \
- binding \
- retry \
- timeout \
- acm \
- servantLocator \
- interceptor \
- stringConverter \
- background \
- udp \
- defaultServant \
- defaultValue \
threadPoolPriority \
invoke \
properties \
@@ -87,10 +45,18 @@ SUBDIRS = proxy \
admin \
metrics \
enums \
- echo \
logger \
networkProxy \
- services
+ services \
+ impl
+
+ifneq ($(CPP11_MAPPING),yes)
+SUBDIRS := $(SUBDIRS) \
+ optional \
+ gc \
+ stream \
+ custom \
+ echo
endif
.PHONY: $(EVERYTHING) $(SUBDIRS)
diff --git a/cpp/test/Ice/impl/.gitignore b/cpp/test/Ice/impl/.gitignore
new file mode 100644
index 00000000000..7cacc722a41
--- /dev/null
+++ b/cpp/test/Ice/impl/.gitignore
@@ -0,0 +1,9 @@
+// Generated by makegitignore.py
+
+// IMPORTANT: Do not edit this file -- any edits made here will be lost!
+server
+serveramd
+Test.cpp
+TestAMD.cpp
+Test.h
+TestAMD.h
diff --git a/cpp/test/Ice/impl/Makefile b/cpp/test/Ice/impl/Makefile
new file mode 100644
index 00000000000..7c412bffcd2
--- /dev/null
+++ b/cpp/test/Ice/impl/Makefile
@@ -0,0 +1,60 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2015 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.
+#
+# **********************************************************************
+
+top_srcdir = ../../..
+
+SERVER = $(call mktestname,server)
+SERVERAMD = $(call mktestname,serveramd)
+
+TARGETS = $(SERVER) $(SERVERAMD)
+
+SLICE_OBJS = Test.o TestAMD.o
+
+SOBJS = Test.o \
+ TestI.o \
+ Server.o \
+
+SAMDOBJS = TestAMD.o \
+ TestAMDI.o \
+ ServerAMD.o
+
+OBJS = $(SOBJS) \
+ $(SAMDOBJS)
+
+include $(top_srcdir)/config/Make.rules
+
+CPPFLAGS := -I. -I../../include $(CPPFLAGS)
+
+ifeq ($(CPP11_MAPPING),yes)
+SLICE2CPPFLAGS := --impl-c++11 $(SLICE2CPPFLAGS)
+else
+SLICE2CPPFLAGS := --impl-c++98 $(SLICE2CPPFLAGS)
+endif
+
+Test.cpp Test.h: Test.ice $(SLICE2CPP)
+ rm -f $(*F).h $(*F).cpp $(*F)I.h $(*F)I.cpp
+ $(SLICE2CPP) $(SLICE2CPPFLAGS) $(*F).ice
+ @touch $(*F).cpp $(*F)I.cpp
+
+TestAMD.cpp TestAMD.h: TestAMD.ice $(SLICE2CPP)
+ rm -f $(*F).h $(*F).cpp $(*F)I.h $(*F)I.cpp
+ $(SLICE2CPP) $(SLICE2CPPFLAGS) $(*F).ice
+ @touch $(*F).cpp $(*F)I.cpp
+
+$(SERVER): $(SOBJS)
+ rm -f $@
+ $(call mktest,$@,$(SOBJS),$(TEST_LIBS))
+
+$(SERVERAMD): $(SAMDOBJS)
+ rm -f $@
+ $(call mktest,$@,$(SAMDOBJS),$(TEST_LIBS))
+
+clean::
+ rm -f TestI.cpp TestI.h
+ rm -f TestAMDI.cpp TestAMDI.h
diff --git a/cpp/test/Ice/impl/Makefile.mak b/cpp/test/Ice/impl/Makefile.mak
new file mode 100644
index 00000000000..d91de148913
--- /dev/null
+++ b/cpp/test/Ice/impl/Makefile.mak
@@ -0,0 +1,78 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2015 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.
+#
+# **********************************************************************
+
+top_srcdir = ..\..\..
+
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+OBJDIR = .
+!else
+NAME_PREFIX = Ice_operations_
+EXT = .dll
+OBJDIR = winrt
+!endif
+
+SERVER = $(NAME_PREFIX)server
+SERVERAMD = $(NAME_PREFIX)serveramd
+
+TARGETS = $(SERVER)$(EXT) $(SERVERAMD)$(EXT)
+
+SLICE_OBJS = $(OBJDIR)\Test.obj $(OBJDIR)\TestAMD.obj
+
+SOBJS = $(OBJDIR)\Test.obj \
+ $(OBJDIR)\TestI.obj \
+ $(OBJDIR)\Server.obj
+
+SAMDOBJS = $(OBJDIR)\TestAMD.obj \
+ $(OBJDIR)\TestAMDI.obj \
+ $(OBJDIR)\ServerAMD.obj
+
+OBJS = $(SOBJS) \
+ $(SAMDOBJS)
+
+!include $(top_srcdir)/config/Make.rules.mak
+
+CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN -Zm200 -bigobj /wd4503
+LINKWITH = testcommon$(LIBSUFFIX).lib $(LIBS)
+
+!if "$(GENERATE_PDB)" == "yes"
+SPDBFLAGS = /pdb:$(SERVER).pdb
+SAPDBFLAGS = /pdb:$(SERVERAMD).pdb
+!endif
+
+!if "$(CPP11_MAPPING)" == "yes"
+SLICE2CPPFLAGS = --impl-c++11 $(SLICE2CPPFLAGS)
+!else
+SLICE2CPPFLAGS = --impl-c++98 $(SLICE2CPPFLAGS)
+!endif
+
+Test.cpp Test.h:
+ del /q (*F).h $(*F).cpp (*F)I.h $(*F)I.cpp
+ "$(SLICE2CPP)" $(SLICE2CPPFLAGS) $<
+
+TestAMD.cpp TestAMD.h:
+ del /q (*F).h $(*F).cpp (*F)I.h $(*F)I.cpp
+ "$(SLICE2CPP)" $(SLICE2CPPFLAGS) $<
+
+$(SERVER)$(EXT): $(SOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SPDBFLAGS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH)
+ @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
+ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
+
+$(SERVERAMD)$(EXT): $(SAMDOBJS)
+ $(LINK) $(LD_TESTFLAGS) $(SAPDBFLAGS) $(SAMDOBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH)
+ @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
+ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
+
+clean::
+ del /q Test.cpp Test.h
+ del /q TestI.cpp TestI.h
+ del /q TestAMD.cpp TestAMD.h
+ del /q TestAMDI.cpp TestAMDI.h
diff --git a/cpp/test/Ice/impl/Server.cpp b/cpp/test/Ice/impl/Server.cpp
new file mode 100644
index 00000000000..39e585dd1b7
--- /dev/null
+++ b/cpp/test/Ice/impl/Server.cpp
@@ -0,0 +1,58 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2015 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.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <TestI.h>
+
+DEFINE_TEST("server")
+
+using namespace std;
+using namespace Test;
+
+int
+run(int, char**, const Ice::CommunicatorPtr& communicator)
+{
+ string endpt = getTestEndpoint(communicator, 0);
+ communicator->getProperties()->setProperty("TestAdapter.Endpoints", endpt + ":udp");
+ Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
+ adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test"));
+ adapter->activate();
+ TEST_READY
+ communicator->waitForShutdown();
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+#ifdef ICE_STATIC_LIBS
+ Ice::registerIceSSL();
+#endif
+
+ try
+ {
+ Ice::InitializationData initData;
+ initData.properties = Ice::createProperties(argc, argv);
+ //
+ // Its possible to have batch oneway requests dispatched after
+ // the adapter is deactivated due to thread scheduling so we
+ // supress this warning.
+ //
+ initData.properties->setProperty("Ice.Warn.Dispatch", "0");
+
+ Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData);
+ return run(argc, argv, ich.communicator());
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ return EXIT_FAILURE;
+ }
+}
diff --git a/cpp/test/Ice/impl/ServerAMD.cpp b/cpp/test/Ice/impl/ServerAMD.cpp
new file mode 100644
index 00000000000..48d26283534
--- /dev/null
+++ b/cpp/test/Ice/impl/ServerAMD.cpp
@@ -0,0 +1,58 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2015 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.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <TestAMDI.h>
+
+DEFINE_TEST("serveramd")
+
+using namespace std;
+using namespace Test;
+
+int
+run(int, char**, const Ice::CommunicatorPtr& communicator)
+{
+ string endpt = getTestEndpoint(communicator, 0);
+ communicator->getProperties()->setProperty("TestAdapter.Endpoints", endpt + ":udp");
+ Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
+ adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test"));
+ adapter->activate();
+ TEST_READY
+ communicator->waitForShutdown();
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+#ifdef ICE_STATIC_LIBS
+ Ice::registerIceSSL();
+#endif
+
+ try
+ {
+ Ice::InitializationData initData;
+ initData.properties = Ice::createProperties(argc, argv);
+ //
+ // Its possible to have batch oneway requests dispatched after
+ // the adapter is deactivated due to thread scheduling so we
+ // supress this warning.
+ //
+ initData.properties->setProperty("Ice.Warn.Dispatch", "0");
+
+ Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData);
+ return run(argc, argv, ich.communicator());
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ return EXIT_FAILURE;
+ }
+}
diff --git a/cpp/test/Ice/impl/Test.ice b/cpp/test/Ice/impl/Test.ice
new file mode 100644
index 00000000000..43ac1db7aaf
--- /dev/null
+++ b/cpp/test/Ice/impl/Test.ice
@@ -0,0 +1,278 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2015 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.
+//
+// **********************************************************************
+
+#pragma once
+
+#include <Ice/Current.ice>
+
+module Test
+{
+
+enum MyEnum
+{
+ enum1,
+ enum2,
+ enum3
+};
+
+class MyClass;
+
+struct AnotherStruct
+{
+ string s;
+};
+
+struct Structure
+{
+ MyClass* p;
+ MyEnum e;
+ AnotherStruct s;
+};
+
+sequence<byte> ByteS;
+sequence<bool> BoolS;
+sequence<short> ShortS;
+sequence<int> IntS;
+sequence<long> LongS;
+sequence<float> FloatS;
+sequence<double> DoubleS;
+sequence<string> StringS;
+sequence<MyEnum> MyEnumS;
+sequence<MyClass*> MyClassS;
+
+sequence<ByteS> ByteSS;
+sequence<BoolS> BoolSS;
+sequence<ShortS> ShortSS;
+sequence<IntS> IntSS;
+sequence<LongS> LongSS;
+sequence<FloatS> FloatSS;
+sequence<DoubleS> DoubleSS;
+sequence<StringS> StringSS;
+sequence<MyEnumS> MyEnumSS;
+sequence<MyClassS> MyClassSS;
+
+sequence<StringSS> StringSSS;
+
+struct MyStruct
+{
+ int i;
+ int j;
+};
+
+dictionary<byte, bool> ByteBoolD;
+dictionary<short, int> ShortIntD;
+dictionary<long, float> LongFloatD;
+dictionary<string, string> StringStringD;
+dictionary<string, MyEnum> StringMyEnumD;
+dictionary<MyEnum, string> MyEnumStringD;
+dictionary<MyStruct, MyEnum> MyStructMyEnumD;
+
+sequence<ByteBoolD> ByteBoolDS;
+sequence<ShortIntD> ShortIntDS;
+sequence<LongFloatD> LongFloatDS;
+sequence<StringStringD> StringStringDS;
+sequence<StringMyEnumD> StringMyEnumDS;
+sequence<MyEnumStringD> MyEnumStringDS;
+sequence<MyStructMyEnumD> MyStructMyEnumDS;
+
+dictionary<byte, ByteS> ByteByteSD;
+dictionary<bool, BoolS> BoolBoolSD;
+dictionary<short, ShortS> ShortShortSD;
+dictionary<int, IntS> IntIntSD;
+dictionary<long, LongS> LongLongSD;
+dictionary<string, FloatS> StringFloatSD;
+dictionary<string, DoubleS> StringDoubleSD;
+dictionary<string, StringS> StringStringSD;
+dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD;
+
+exception SomeException {};
+
+class MyClass
+{
+ void shutdown();
+
+ void delay(int ms);
+
+ void opVoid();
+
+ byte opByte(byte p1, byte p2,
+ out byte p3);
+
+ bool opBool(bool p1, bool p2,
+ out bool p3);
+
+ long opShortIntLong(short p1, int p2, long p3,
+ out short p4, out int p5, out long p6);
+
+ double opFloatDouble(float p1, double p2,
+ out float p3, out double p4);
+
+ string opString(string p1, string p2,
+ out string p3);
+
+ MyEnum opMyEnum(MyEnum p1, out MyEnum p2);
+
+ MyClass* opMyClass(MyClass* p1, out MyClass* p2, out MyClass* p3);
+
+ Structure opStruct(Structure p1, Structure p2,
+ out Structure p3);
+
+ ByteS opByteS(ByteS p1, ByteS p2,
+ out ByteS p3);
+
+ BoolS opBoolS(BoolS p1, BoolS p2,
+ out BoolS p3);
+
+ LongS opShortIntLongS(Test::ShortS p1, IntS p2, LongS p3,
+ out ::Test::ShortS p4, out IntS p5, out LongS p6);
+
+ DoubleS opFloatDoubleS(FloatS p1, DoubleS p2,
+ out FloatS p3, out DoubleS p4);
+
+ StringS opStringS(StringS p1, StringS p2,
+ out StringS p3);
+
+ ByteSS opByteSS(ByteSS p1, ByteSS p2,
+ out ByteSS p3);
+
+ BoolSS opBoolSS(BoolSS p1, BoolSS p2,
+ out BoolSS p3);
+
+ LongSS opShortIntLongSS(ShortSS p1, IntSS p2, LongSS p3,
+ out ShortSS p4, out IntSS p5, out LongSS p6);
+
+
+ DoubleSS opFloatDoubleSS(FloatSS p1, DoubleSS p2,
+ out FloatSS p3, out DoubleSS p4);
+
+ StringSS opStringSS(StringSS p1, StringSS p2,
+ out StringSS p3);
+
+ StringSSS opStringSSS(StringSSS p1, StringSSS p2,
+ out StringSSS p3);
+
+ ByteBoolD opByteBoolD(ByteBoolD p1, ByteBoolD p2,
+ out ByteBoolD p3);
+
+ ShortIntD opShortIntD(ShortIntD p1, ShortIntD p2,
+ out ShortIntD p3);
+
+ LongFloatD opLongFloatD(LongFloatD p1, LongFloatD p2,
+ out LongFloatD p3);
+
+ StringStringD opStringStringD(StringStringD p1, StringStringD p2,
+ out StringStringD p3);
+
+ StringMyEnumD opStringMyEnumD(StringMyEnumD p1, StringMyEnumD p2,
+ out StringMyEnumD p3);
+
+ MyEnumStringD opMyEnumStringD(MyEnumStringD p1, MyEnumStringD p2,
+ out MyEnumStringD p3);
+
+ MyStructMyEnumD opMyStructMyEnumD(MyStructMyEnumD p1, MyStructMyEnumD p2,
+ out MyStructMyEnumD p3);
+
+ ByteBoolDS opByteBoolDS(ByteBoolDS p1, ByteBoolDS p2,
+ out ByteBoolDS p3);
+
+ ShortIntDS opShortIntDS(ShortIntDS p1, ShortIntDS p2,
+ out ShortIntDS p3);
+
+ LongFloatDS opLongFloatDS(LongFloatDS p1, LongFloatDS p2,
+ out LongFloatDS p3);
+
+ StringStringDS opStringStringDS(StringStringDS p1, StringStringDS p2,
+ out StringStringDS p3);
+
+ StringMyEnumDS opStringMyEnumDS(StringMyEnumDS p1, StringMyEnumDS p2,
+ out StringMyEnumDS p3);
+
+ MyEnumStringDS opMyEnumStringDS(MyEnumStringDS p1, MyEnumStringDS p2,
+ out MyEnumStringDS p3);
+
+ MyStructMyEnumDS opMyStructMyEnumDS(MyStructMyEnumDS p1, MyStructMyEnumDS p2,
+ out MyStructMyEnumDS p3);
+
+ ByteByteSD opByteByteSD(ByteByteSD p1, ByteByteSD p2,
+ out ByteByteSD p3);
+
+ BoolBoolSD opBoolBoolSD(BoolBoolSD p1, BoolBoolSD p2,
+ out BoolBoolSD p3);
+
+ ShortShortSD opShortShortSD(ShortShortSD p1, ShortShortSD p2,
+ out ShortShortSD p3);
+
+ IntIntSD opIntIntSD(IntIntSD p1, IntIntSD p2,
+ out IntIntSD p3);
+
+ LongLongSD opLongLongSD(LongLongSD p1, LongLongSD p2,
+ out LongLongSD p3);
+
+ StringFloatSD opStringFloatSD(StringFloatSD p1, StringFloatSD p2,
+ out StringFloatSD p3);
+
+ StringDoubleSD opStringDoubleSD(StringDoubleSD p1, StringDoubleSD p2,
+ out StringDoubleSD p3);
+
+ StringStringSD opStringStringSD(StringStringSD p1, StringStringSD p2,
+ out StringStringSD p3);
+
+ MyEnumMyEnumSD opMyEnumMyEnumSD(MyEnumMyEnumSD p1, MyEnumMyEnumSD p2,
+ out MyEnumMyEnumSD p3);
+
+ IntS opIntS(IntS s);
+
+ void opByteSOneway(ByteS s);
+
+ int opByteSOnewayCallCount();
+
+ Ice::Context opContext();
+
+ void opDoubleMarshaling(double p1, DoubleS p2);
+
+ idempotent void opIdempotent();
+
+ ["nonmutating"] idempotent void opNonmutating();
+
+ byte opByte1(byte opByte1);
+ short opShort1(short opShort1);
+ int opInt1(int opInt1);
+ long opLong1(long opLong1);
+ float opFloat1(float opFloat1);
+ double opDouble1(double opDouble1);
+ string opString1(string opString1);
+ StringS opStringS1(StringS opStringS1);
+ ByteBoolD opByteBoolD1(ByteBoolD opByteBoolD1);
+ StringS opStringS2(StringS stringS);
+ ByteBoolD opByteBoolD2(ByteBoolD byteBoolD);
+};
+
+struct MyStruct1
+{
+ string tesT; // Same name as the enclosing module
+ MyClass myClass; // Same name as an already defined class
+ string myStruct1; // Same name as the enclosing struct
+};
+
+class MyClass1
+{
+ string tesT; // Same name as the enclosing module
+ MyClass myClass; // Same name as an already defined class
+ string myClass1; // Same name as the enclosing class
+};
+
+class MyDerivedClass extends MyClass
+{
+ void opDerived();
+ MyClass1 opMyClass1(MyClass1 c);
+ MyStruct1 opMyStruct1(MyStruct1 c);
+};
+
+};
+
diff --git a/cpp/test/Ice/impl/TestAMD.ice b/cpp/test/Ice/impl/TestAMD.ice
new file mode 100644
index 00000000000..bd1e2bab568
--- /dev/null
+++ b/cpp/test/Ice/impl/TestAMD.ice
@@ -0,0 +1,280 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2015 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.
+//
+// **********************************************************************
+
+#pragma once
+
+#include <Ice/Current.ice>
+
+module Test
+{
+
+enum MyEnum
+{
+ enum1,
+ enum2,
+ enum3
+};
+
+class MyClass;
+
+struct AnotherStruct
+{
+ string s;
+};
+
+struct Structure
+{
+ MyClass* p;
+ MyEnum e;
+ AnotherStruct s;
+};
+
+sequence<byte> ByteS;
+sequence<bool> BoolS;
+sequence<short> ShortS;
+sequence<int> IntS;
+sequence<long> LongS;
+sequence<float> FloatS;
+sequence<double> DoubleS;
+sequence<string> StringS;
+sequence<MyEnum> MyEnumS;
+sequence<MyClass*> MyClassS;
+
+sequence<ByteS> ByteSS;
+sequence<BoolS> BoolSS;
+sequence<ShortS> ShortSS;
+sequence<IntS> IntSS;
+sequence<LongS> LongSS;
+sequence<FloatS> FloatSS;
+sequence<DoubleS> DoubleSS;
+sequence<StringS> StringSS;
+sequence<MyEnumS> MyEnumSS;
+sequence<MyClassS> MyClassSS;
+
+sequence<StringSS> StringSSS;
+
+struct MyStruct
+{
+ int i;
+ int j;
+};
+
+dictionary<byte, bool> ByteBoolD;
+dictionary<short, int> ShortIntD;
+dictionary<long, float> LongFloatD;
+dictionary<string, string> StringStringD;
+dictionary<string, MyEnum> StringMyEnumD;
+dictionary<MyEnum, string> MyEnumStringD;
+dictionary<MyStruct, MyEnum> MyStructMyEnumD;
+
+sequence<ByteBoolD> ByteBoolDS;
+sequence<ShortIntD> ShortIntDS;
+sequence<LongFloatD> LongFloatDS;
+sequence<StringStringD> StringStringDS;
+sequence<StringMyEnumD> StringMyEnumDS;
+sequence<MyEnumStringD> MyEnumStringDS;
+sequence<MyStructMyEnumD> MyStructMyEnumDS;
+
+dictionary<byte, ByteS> ByteByteSD;
+dictionary<bool, BoolS> BoolBoolSD;
+dictionary<short, ShortS> ShortShortSD;
+dictionary<int, IntS> IntIntSD;
+dictionary<long, LongS> LongLongSD;
+dictionary<string, FloatS> StringFloatSD;
+dictionary<string, DoubleS> StringDoubleSD;
+dictionary<string, StringS> StringStringSD;
+dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD;
+
+["amd"] class MyClass
+{
+ void shutdown();
+
+ void delay(int ms);
+
+ void opVoid();
+
+ byte opByte(byte p1, byte p2,
+ out byte p3);
+
+ bool opBool(bool p1, bool p2,
+ out bool p3);
+
+ long opShortIntLong(short p1, int p2, long p3,
+ out short p4, out int p5, out long p6);
+
+ double opFloatDouble(float p1, double p2,
+ out float p3, out double p4);
+
+ string opString(string p1, string p2,
+ out string p3);
+
+ MyEnum opMyEnum(MyEnum p1, out MyEnum p2);
+
+ MyClass* opMyClass(MyClass* p1, out MyClass* p2, out MyClass* p3);
+
+ Structure opStruct(Structure p1, Structure p2,
+ out Structure p3);
+
+ ByteS opByteS(ByteS p1, ByteS p2,
+ out ByteS p3);
+
+ BoolS opBoolS(BoolS p1, BoolS p2,
+ out BoolS p3);
+
+ LongS opShortIntLongS(Test::ShortS p1, IntS p2, LongS p3,
+ out ::Test::ShortS p4, out IntS p5, out LongS p6);
+
+ DoubleS opFloatDoubleS(FloatS p1, DoubleS p2,
+ out FloatS p3, out DoubleS p4);
+
+ StringS opStringS(StringS p1, StringS p2,
+ out StringS p3);
+
+ ByteSS opByteSS(ByteSS p1, ByteSS p2,
+ out ByteSS p3);
+
+ BoolSS opBoolSS(BoolSS p1, BoolSS p2,
+ out BoolSS p3);
+
+ LongSS opShortIntLongSS(ShortSS p1, IntSS p2, LongSS p3,
+ out ShortSS p4, out IntSS p5, out LongSS p6);
+
+
+ DoubleSS opFloatDoubleSS(FloatSS p1, DoubleSS p2,
+ out FloatSS p3, out DoubleSS p4);
+
+ StringSS opStringSS(StringSS p1, StringSS p2,
+ out StringSS p3);
+
+ StringSSS opStringSSS(StringSSS p1, StringSSS p2,
+ out StringSSS p3);
+
+ ByteBoolD opByteBoolD(ByteBoolD p1, ByteBoolD p2,
+ out ByteBoolD p3);
+
+ ShortIntD opShortIntD(ShortIntD p1, ShortIntD p2,
+ out ShortIntD p3);
+
+ LongFloatD opLongFloatD(LongFloatD p1, LongFloatD p2,
+ out LongFloatD p3);
+
+ StringStringD opStringStringD(StringStringD p1, StringStringD p2,
+ out StringStringD p3);
+
+ StringMyEnumD opStringMyEnumD(StringMyEnumD p1, StringMyEnumD p2,
+ out StringMyEnumD p3);
+
+ MyEnumStringD opMyEnumStringD(MyEnumStringD p1, MyEnumStringD p2,
+ out MyEnumStringD p3);
+
+ MyStructMyEnumD opMyStructMyEnumD(MyStructMyEnumD p1, MyStructMyEnumD p2,
+ out MyStructMyEnumD p3);
+
+ ByteBoolDS opByteBoolDS(ByteBoolDS p1, ByteBoolDS p2,
+ out ByteBoolDS p3);
+
+ ShortIntDS opShortIntDS(ShortIntDS p1, ShortIntDS p2,
+ out ShortIntDS p3);
+
+ LongFloatDS opLongFloatDS(LongFloatDS p1, LongFloatDS p2,
+ out LongFloatDS p3);
+
+ StringStringDS opStringStringDS(StringStringDS p1, StringStringDS p2,
+ out StringStringDS p3);
+
+ StringMyEnumDS opStringMyEnumDS(StringMyEnumDS p1, StringMyEnumDS p2,
+ out StringMyEnumDS p3);
+
+ MyEnumStringDS opMyEnumStringDS(MyEnumStringDS p1, MyEnumStringDS p2,
+ out MyEnumStringDS p3);
+
+ MyStructMyEnumDS opMyStructMyEnumDS(MyStructMyEnumDS p1, MyStructMyEnumDS p2,
+ out MyStructMyEnumDS p3);
+
+ ByteByteSD opByteByteSD(ByteByteSD p1, ByteByteSD p2,
+ out ByteByteSD p3);
+
+ BoolBoolSD opBoolBoolSD(BoolBoolSD p1, BoolBoolSD p2,
+ out BoolBoolSD p3);
+
+ ShortShortSD opShortShortSD(ShortShortSD p1, ShortShortSD p2,
+ out ShortShortSD p3);
+
+ IntIntSD opIntIntSD(IntIntSD p1, IntIntSD p2,
+ out IntIntSD p3);
+
+ LongLongSD opLongLongSD(LongLongSD p1, LongLongSD p2,
+ out LongLongSD p3);
+
+ StringFloatSD opStringFloatSD(StringFloatSD p1, StringFloatSD p2,
+ out StringFloatSD p3);
+
+ StringDoubleSD opStringDoubleSD(StringDoubleSD p1, StringDoubleSD p2,
+ out StringDoubleSD p3);
+
+ StringStringSD opStringStringSD(StringStringSD p1, StringStringSD p2,
+ out StringStringSD p3);
+
+ MyEnumMyEnumSD opMyEnumMyEnumSD(MyEnumMyEnumSD p1, MyEnumMyEnumSD p2,
+ out MyEnumMyEnumSD p3);
+
+ IntS opIntS(IntS s);
+
+ void opByteSOneway(ByteS s);
+ int opByteSOnewayCallCount();
+
+ Ice::Context opContext();
+
+ void opDoubleMarshaling(double p1, DoubleS p2);
+
+ idempotent void opIdempotent();
+
+ ["nonmutating"] idempotent void opNonmutating();
+
+ //
+ // Test operation with a parameter that has the same name
+ //
+ byte opByte1(byte opByte1);
+ short opShort1(short opShort1);
+ int opInt1(int opInt1);
+ long opLong1(long opLong1);
+ float opFloat1(float opFloat1);
+ double opDouble1(double opDouble1);
+ string opString1(string opString1);
+ StringS opStringS1(StringS opStringS1);
+ ByteBoolD opByteBoolD1(ByteBoolD opByteBoolD1);
+
+ StringS opStringS2(StringS stringS);
+ ByteBoolD opByteBoolD2(ByteBoolD byteBoolD);
+};
+
+struct MyStruct1
+{
+ string tesT; // Same name as the enclosing module
+ MyClass myClass; // Same name as an already defined class
+ string myStruct1; // Same name as the enclosing struct
+};
+
+class MyClass1
+{
+ string tesT; // Same name as the enclosing module
+ MyClass myClass; // Same name as an already defined class
+ string myClass1; // Same name as the enclosing class
+};
+
+
+["amd"] class MyDerivedClass extends MyClass
+{
+ void opDerived();
+ MyClass1 opMyClass1(MyClass1 c);
+ MyStruct1 opMyStruct1(MyStruct1 c);
+};
+
+};
+