summaryrefslogtreecommitdiff
path: root/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.cpp
blob: 69f71477bb67d7250145e4a32ce189a245217efb (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
// $Id$

#include "Smart_Proxy_Impl.h"
#if (TAO_HAS_SMART_PROXIES == 1)
Smart_Test_Factory::Smart_Test_Factory (void)
{
  ACE_DEBUG ((LM_DEBUG,
              "Smart_Test_Factory\n"));
}

Test_ptr
Smart_Test_Factory::create_proxy (Test_ptr proxy,
                                  CORBA::Environment &)
 {
   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),
    price_ (0)
{
}

CORBA::Short 
Smart_Test_Proxy::box_prices (CORBA::Environment &ACE_TRY_ENV)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  if (this->price_ == 0)
    {
      this->price_ = TAO_Test_Smart_Proxy_Base::box_prices (ACE_TRY_ENV);
      ACE_CHECK_RETURN (0);
    }
  return this->price_;
}
#endif /*(TAO_HAS_SMART_PROXIES == 1)*/