summaryrefslogtreecommitdiff
path: root/TAO/tao/xt_resource.cpp
blob: 747bf2672e5e2edcb1bc7f4d9682134d92b41433 (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 "tao/xt_resource.h"

#if defined(ACE_HAS_XT)

#if !defined (__ACE_INLINE__)
# include "tao/xt_resource.i"
#endif /* ! __ACE_INLINE__ */

ACE_RCSID(tao, xt_resource, "$Id$")

XtAppContext
TAO_XT_Resource_Factory::context_ = 0;

ACE_Reactor_Impl*
TAO_XT_Resource_Factory::allocate_reactor_impl (void) const
{
  if (TAO_XT_Resource_Factory::context_ == 0)
    return 0;

  ACE_Reactor_Impl *impl = 0;

  ACE_NEW_RETURN (impl, ACE_XtReactor (TAO_XT_Resource_Factory::context_), 0);
  return impl;
}

void
TAO_XT_Resource_Factory::set_context (XtAppContext context)
{
  TAO_XT_Resource_Factory::context_ = context;
}

ACE_STATIC_SVC_DEFINE (TAO_XT_Resource_Factory,
                       ACE_TEXT ("XT_Resource_Factory"),
                       ACE_SVC_OBJ_T,
                       &ACE_SVC_NAME (TAO_XT_Resource_Factory),
                       ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
                       0)
ACE_FACTORY_DEFINE (TAO, TAO_XT_Resource_Factory)

#endif /* ACE_HAS_XT */