Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / BiDir_GIOP / BiDirGIOP.h
blob5594939854778529f0e04a0df5b8bcbd6f06dc22
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file BiDirGIOP.h
7 * Dynamic loader object for BiDir GIOP
9 * @author Balachandran Natarajan <bala@cs.wustl.edu>
11 //=============================================================================
13 #ifndef TAO_BIDIR_GIOP_H
14 #define TAO_BIDIR_GIOP_H
15 #include /**/ "ace/pre.h"
17 #include "tao/BiDir_GIOP/bidirgiop_export.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "tao/PI/PI.h"
25 #include "tao/BiDir_Adapter.h"
26 #include "ace/Service_Config.h"
28 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
30 class TAO_BiDirPolicy_Validator;
32 /**
33 * @class TAO_BiDirGIOP_Loader
35 * @brief Class that loads the BiDir library.
38 class TAO_BIDIRGIOP_Export TAO_BiDirGIOP_Loader : public TAO_BiDir_Adapter
40 public:
41 /// Constructor
42 TAO_BiDirGIOP_Loader () = default;
44 /// Destructor
45 ~TAO_BiDirGIOP_Loader () override = default;
47 /// Initialize the BiDIR loader hooks.
48 int init (int argc,
49 ACE_TCHAR* []) override;
51 void load_policy_validators (TAO_Policy_Validator &validator) override;
53 /// Used to force the initialization of the ORB code.
54 static int Initializer ();
56 private:
57 /// Flag to indicate whether the BiDirGIOP library has been
58 /// activated.
59 bool initialized_ {false};
62 static bool
63 TAO_Requires_BiDirGIOP_Initializer = TAO_BiDirGIOP_Loader::Initializer ();
66 ACE_STATIC_SVC_DECLARE (TAO_BiDirGIOP_Loader)
67 ACE_FACTORY_DECLARE (TAO_BIDIRGIOP, TAO_BiDirGIOP_Loader)
69 TAO_END_VERSIONED_NAMESPACE_DECL
72 #define TAO_BIDIRGIOP_SAFE_INCLUDE
73 #include "tao/BiDir_GIOP/BiDirPolicyC.h"
74 #undef TAO_BIDIRGIOP_SAFE_INCLUDE
76 #include /**/ "ace/post.h"
77 #endif /* TAO_BIDIR_GIOP_H */