Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Smart_Proxies / Collocation / Smart_Proxy_Impl.cpp
blobbb628f8ababa246c345c109fd7ea8418e122b3fe
1 #include "Smart_Proxy_Impl.h"
3 #include "ace/OS_NS_string.h"
4 #include "ace/Log_Msg.h"
6 Smart_Diamond_Top_Factory::Smart_Diamond_Top_Factory ()
8 ACE_DEBUG ((LM_DEBUG, "Smart_Diamond_Top_Factory\n"));
11 Diamond::Top_ptr
12 Smart_Diamond_Top_Factory::create_proxy (Diamond::Top_ptr proxy
15 ACE_DEBUG ((LM_DEBUG, "create_smart_proxy\n"));
16 if (CORBA::is_nil (proxy) == 0)
17 ACE_NEW_RETURN (proxy,
18 Smart_Diamond_Top_Proxy (proxy),
19 0);
20 return proxy;
23 Smart_Diamond_Top_Proxy::Smart_Diamond_Top_Proxy (Diamond::Top_ptr proxy)
24 : TAO_Smart_Proxy_Base (proxy)
28 char *
29 Smart_Diamond_Top_Proxy::shape ()
31 ACE_DEBUG ((LM_DEBUG, "Smart_proxy: This is "));
33 char *ans= 0;
34 try
36 ans = ACE_OS::strdup (
37 Diamond::TAO_Diamond_Top_Smart_Proxy_Base::shape ());
39 ACE_DEBUG ((LM_DEBUG, "%C\n", ans));
41 catch (const CORBA::Exception& ex)
43 ex._tao_print_exception ("Uncaught Exception");
44 return 0;
47 return ans;