summaryrefslogtreecommitdiff
path: root/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp')
-rw-r--r--TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp b/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp
new file mode 100644
index 00000000000..b71652cae3a
--- /dev/null
+++ b/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp
@@ -0,0 +1,48 @@
+// $Id$
+
+#include "Smart_Proxy_Impl.h"
+
+Smart_Test_Factory::Smart_Test_Factory (int one_shot_factory)
+ : TAO_Test_Default_Proxy_Factory (one_shot_factory)
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Smart_Test_Factory\n"));
+}
+
+Test_ptr
+Smart_Test_Factory::create_proxy (Test_ptr proxy)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "create_smart_proxy\n"));
+
+ if (CORBA::is_nil (proxy) == 0)
+ ACE_NEW_RETURN (proxy, Smart_Test_Proxy (proxy), 0);
+
+ return proxy;
+
+ }
+
+Smart_Test_Proxy::Smart_Test_Proxy (Test_ptr proxy)
+ : TAO_Smart_Proxy_Base (proxy)
+{
+}
+
+CORBA::Short
+Smart_Test_Proxy::method (CORBA::Short boo)
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Yahoo, I am smart\n"));
+
+ CORBA::Short retval = 0;
+ try
+ {
+ retval = TAO_Test_Smart_Proxy_Base::method (boo);
+ }
+ catch (const Test::Oops& reason)
+ {
+ reason._tao_print_exception ("User Exception");
+ return -1;
+ }
+
+ return retval;
+}