summaryrefslogtreecommitdiff
path: root/TAO/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.cpp
blob: a054b2380248656c99d358bbb7e00d5c82b0be75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// $Id$

#include "Smart_Proxy_Impl.h"

Smart_Diamond_Top_Factory::Smart_Diamond_Top_Factory (void)
{
  ACE_DEBUG ((LM_DEBUG, "Smart_Diamond_Top_Factory\n"));
}

Diamond::Top_ptr
Smart_Diamond_Top_Factory::create_proxy (Diamond::Top_ptr proxy
                                                 ACE_ENV_ARG_DECL_NOT_USED
                                                    )
 {
   ACE_DEBUG ((LM_DEBUG, "create_smart_proxy\n"));
   if (CORBA::is_nil (proxy) == 0)
           ACE_NEW_RETURN (proxy,
                               Smart_Diamond_Top_Proxy (proxy),
                                           0);
   return proxy;

 }

Smart_Diamond_Top_Proxy::Smart_Diamond_Top_Proxy (Diamond::Top_ptr proxy)
  : TAO_Smart_Proxy_Base (proxy)
{
}

char *
Smart_Diamond_Top_Proxy::shape (
                                                                ACE_ENV_SINGLE_ARG_DECL
                                                                )
  ACE_THROW_SPEC ((
                   CORBA::SystemException
                   ))
{
  ACE_DEBUG ((LM_DEBUG, "Smart_proxy: This is "));

  CORBA::Short retval = 0;
  char *ans= 0;
  ACE_TRY
    {
          ans = ACE_OS::strdup (TAO_Diamond_Top_Smart_Proxy_Base::shape(ACE_ENV_SINGLE_ARG_PARAMETER));

          ACE_TRY_CHECK;

      ACE_DEBUG ((LM_DEBUG, "%s\n", ans));

    }
  ACE_CATCHANY
    {
      ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Uncaught Exception");
      return 0;
    }
  ACE_ENDTRY;

  return ans;
}