summaryrefslogtreecommitdiff
path: root/TAO/tao/TSS_Resources.cpp
blob: 73ec7175070717fd4b301b0461a7990395b4587d (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
// $Id$

#include "tao/TSS_Resources.h"
#include "tao/GUIResource_Factory.h"
#include "tao/TAO_Singleton.h"

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


TAO_BEGIN_VERSIONED_NAMESPACE_DECL

TAO_TSS_Resources::TAO_TSS_Resources (void)
  : poa_current_impl_ (0)
  , rtscheduler_current_impl_ (0)
  , rtscheduler_previous_current_impl_ (0)
  , default_environment_ (&tss_environment_)

#if (TAO_HAS_CORBA_MESSAGING == 1)

  , policy_current_ (&initial_policy_current_)

#endif /* TAO_HAS_CORBA_MESSAGING == 1 */
  , gui_resource_factory_ (0)

{
}

TAO_TSS_Resources::~TAO_TSS_Resources (void)
{
  delete this->gui_resource_factory_;
}

TAO_TSS_Resources *
TAO_TSS_Resources::instance (void)
{
  // Hide the template instantiation to prevent multiple instances
  // from being created.

  return
    TAO_TSS_Singleton<TAO_TSS_Resources, TAO_SYNCH_MUTEX>::instance ();
}

#if defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION)
template
  TAO_TSS_Singleton<TAO_TSS_Resources, TAO_SYNCH_MUTEX> *
  TAO_TSS_Singleton<TAO_TSS_Resources, TAO_SYNCH_MUTEX>::singleton_;
#endif /* ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION */

TAO_END_VERSIONED_NAMESPACE_DECL