summaryrefslogtreecommitdiff
path: root/TAO/tao/BiDir_GIOP/BiDirGIOP.h
blob: 84da229dcf63c8fc75d4f35443d37b9f8c4cefc8 (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
71
72
73
74
75
76
77
78
79
80
// -*- C++ -*-

//=============================================================================
/**
 *  @file BiDirGIOP.h
 *
 *  Dynamic loader object for BiDir GIOP
 *
 *
 *  @author  Balachandran Natarajan <bala@cs.wustl.edu>
 */
//=============================================================================

#ifndef TAO_BIDIR_GIOP_H
#define TAO_BIDIR_GIOP_H
#include /**/ "ace/pre.h"

#include "tao/BiDir_GIOP/bidirgiop_export.h"


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

#include "tao/PI/PI.h"
#include "tao/BiDir_Adapter.h"
#include "ace/Service_Config.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

class TAO_BiDirPolicy_Validator;

/**
 * @class TAO_BiDirGIOP_Loader
 *
 * @brief Class that loads the BiDir library.
 */

class TAO_BIDIRGIOP_Export TAO_BiDirGIOP_Loader : public TAO_BiDir_Adapter
{
public:

  /// Constructor
  TAO_BiDirGIOP_Loader (void);

  /// Destructor
  virtual ~TAO_BiDirGIOP_Loader (void);

  /// Initialize the BiDIR loader hooks.
  virtual int init (int argc,
                    ACE_TCHAR* []);

  virtual void load_policy_validators (TAO_Policy_Validator &validator);

  /// Used to force the initialization of the ORB code.
  static int Initializer (void);

private:

  /// Flag to indicate whether the BiDirGIOP library has been
  /// activated.
  bool initialized_;
};

static bool
TAO_Requires_BiDirGIOP_Initializer = TAO_BiDirGIOP_Loader::Initializer ();


ACE_STATIC_SVC_DECLARE (TAO_BiDirGIOP_Loader)
ACE_FACTORY_DECLARE (TAO_BIDIRGIOP, TAO_BiDirGIOP_Loader)

TAO_END_VERSIONED_NAMESPACE_DECL


#define TAO_BIDIRGIOP_SAFE_INCLUDE
#include "tao/BiDir_GIOP/BiDirPolicyC.h"
#undef TAO_BIDIRGIOP_SAFE_INCLUDE

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