summaryrefslogtreecommitdiff
path: root/TAO/tao/xt_resource.h
blob: cf78196f03cb5821b587fcdff8faebf6eee9e1f4 (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
59
60
61
62
63
64
65
66
67
68
69
70
// -*- C++ -*-
// $Id$

// ============================================================================
//
// = LIBRARY
//   TAO
//
// = FILENAME
//   xt_resource.h
//
// = AUTHOR
//   Carlos O'Ryan
//
// ============================================================================

#ifndef TAO_XT_RESOURCE_H
#define TAO_XT_RESOURCE_H
#include "ace/pre.h"

#include "tao/default_resource.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#if defined (ACE_HAS_XT)

#include "ace/XtReactor.h"

// ****************************************************************

class TAO_XT_Resource_Factory : public TAO_Default_Resource_Factory
{
  // = TITLE
  //   TAO's default resource factory
  //
  // = DESCRIPTION
  //   Using a <{resource source specifier}> as a discriminator, the
  //   factory can return resource instances which are, e.g., global,
  //   stored in thread-specific storage, stored in shared memory,
  //   etc.
  //
public:
  // = Initialization and termination methods.
  TAO_XT_Resource_Factory (void);
  // Constructor.

  static void set_context (XtAppContext context);
  // Set the context used to create the XtReactor

protected:
  virtual ACE_Reactor_Impl *allocate_reactor_impl (void) const;
  // Obtain the reactor implementation

private:
  static XtAppContext context_;
};

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

ACE_STATIC_SVC_DECLARE (TAO_XT_Resource_Factory)
ACE_FACTORY_DECLARE (TAO, TAO_XT_Resource_Factory)

#endif /* ACE_HAS_XT */

#include "ace/post.h"
#endif /* TAO_DEFAULT_CLIENT_H */