diff options
author | Marc Laukien <marc@zeroc.com> | 2001-08-15 17:21:39 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-08-15 17:21:39 +0000 |
commit | 7aff96f568e834c4c13f26a46843d5ecbb1d325d (patch) | |
tree | e801f83704b85d59f80f1516576c3f91290f6d31 /cpp/test/Ice/exceptions/TestI.cpp | |
parent | fix (diff) | |
download | ice-7aff96f568e834c4c13f26a46843d5ecbb1d325d.tar.bz2 ice-7aff96f568e834c4c13f26a46843d5ecbb1d325d.tar.xz ice-7aff96f568e834c4c13f26a46843d5ecbb1d325d.zip |
IcePack ; restructuring
Diffstat (limited to 'cpp/test/Ice/exceptions/TestI.cpp')
-rw-r--r-- | cpp/test/Ice/exceptions/TestI.cpp | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/cpp/test/Ice/exceptions/TestI.cpp b/cpp/test/Ice/exceptions/TestI.cpp new file mode 100644 index 00000000000..53ce1565f13 --- /dev/null +++ b/cpp/test/Ice/exceptions/TestI.cpp @@ -0,0 +1,115 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/Ice.h> +#include <TestI.h> + +ThrowerI::ThrowerI(const Ice::ObjectAdapterPtr& adapter) : + _adapter(adapter) +{ + APtr a = new A; + _adapter->addTemporary(a); + _a = APrx::uncheckedCast(_adapter->objectToProxy(a)); + + BPtr b = new B; + _adapter->addTemporary(b); + _b = BPrx::uncheckedCast(_adapter->objectToProxy(b)); + + CPtr c = new C; + _adapter->addTemporary(c); + _c = CPrx::uncheckedCast(_adapter->objectToProxy(c)); +} + +void +ThrowerI::shutdown() +{ + _adapter->getCommunicator()->shutdown(); +} + +void +ThrowerI::throwAasA(Ice::Int a) +{ + APtr p = new A; + p->a = a; + p->_throw(); +} + +void +ThrowerI::throwAasAproxy() +{ + _a->_throw(); +} + +void +ThrowerI::throwBasA(Ice::Int a, Ice::Int b) +{ + throwBasB(a, b); +} + +void +ThrowerI::throwBasAproxy() +{ + throwBasBproxy(); +} + +void +ThrowerI::throwCasA(Ice::Int a, Ice::Int b, Ice::Int c) +{ + throwCasC(a, b, c); +} + +void +ThrowerI::throwCasAproxy() +{ + throwCasCproxy(); +} + +void +ThrowerI::throwBasB(Ice::Int a, Ice::Int b) +{ + BPtr p = new B; + p->a = a; + p->b = b; + p->_throw(); +} + +void +ThrowerI::throwBasBproxy() +{ + _b->_throw(); +} + +void +ThrowerI::throwCasB(Ice::Int a, Ice::Int b, Ice::Int c) +{ + throwCasC(a, b, c); +} + +void +ThrowerI::throwCasBproxy() +{ + throwCasCproxy(); +} + +void +ThrowerI::throwCasC(Ice::Int a, Ice::Int b, Ice::Int c) +{ + CPtr p = new C; + p->a = a; + p->b = b; + p->c = c; + p->_throw(); +} + +void +ThrowerI::throwCasCproxy() +{ + _c->_throw(); +} |