summaryrefslogtreecommitdiff
path: root/TAO/tao/ObjRefTemplate/ORT_Adapter_Factory_Impl.cpp
blob: d670c3ab0514fc4baf6417e28d83b58481721391 (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 "tao/ObjRefTemplate/ORT_Adapter_Factory_Impl.h"
#include "tao/ObjRefTemplate/ORT_Adapter_Impl.h"
#include "tao/PortableServer/Root_POA.h"

ACE_RCSID (ORT,
           ORT_Adapter_Factory_Impl,
           "$Id$")

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

namespace TAO
{
  ORT_Adapter *
  ORT_Adapter_Factory_Impl::create ()
  {
    ORT_Adapter_Impl * new_ort_adapter = 0;

    ACE_NEW_RETURN (new_ort_adapter,
                    TAO::ORT_Adapter_Impl,
                    0);

    return new_ort_adapter;
  }

  void
  ORT_Adapter_Factory_Impl::destroy (ORT_Adapter * adapter)
  {
    delete adapter;
  }

  int
  ORT_Adapter_Factory_Impl::Initializer (void)
  {
    TAO_Root_POA::ort_adapter_factory_name ("Concrete_ORT_Adapter_Factory"
      );

    return ACE_Service_Config::process_directive (
          ace_svc_desc_ORT_Adapter_Factory_Impl
        );
  }
}

TAO_END_VERSIONED_NAMESPACE_DECL

ACE_STATIC_SVC_DEFINE (
  ORT_Adapter_Factory_Impl,
  ACE_TEXT ("Concrete_ORT_Adapter_Factory"),
  ACE_SVC_OBJ_T,
  &ACE_SVC_NAME (ORT_Adapter_Factory_Impl),
  ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
  0)

ACE_FACTORY_NAMESPACE_DEFINE (
  TAO_ORT,
  ORT_Adapter_Factory_Impl,
  TAO::ORT_Adapter_Factory_Impl)