00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file BiDirGIOP.h 00006 * 00007 * $Id: BiDirGIOP.h 87582 2009-11-16 16:04:12Z vzykov $ 00008 * 00009 * Dynamic loader object for BiDir GIOP 00010 * 00011 * 00012 * @author Balachandran Natarajan <bala@cs.wustl.edu> 00013 */ 00014 //============================================================================= 00015 00016 #ifndef TAO_BIDIR_GIOP_H 00017 #define TAO_BIDIR_GIOP_H 00018 #include /**/ "ace/pre.h" 00019 00020 #include "tao/BiDir_GIOP/bidirgiop_export.h" 00021 00022 00023 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00024 # pragma once 00025 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00026 00027 #include "tao/PI/PI.h" 00028 #include "tao/BiDir_Adapter.h" 00029 #include "ace/Service_Config.h" 00030 00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00032 00033 class TAO_BiDirPolicy_Validator; 00034 00035 /** 00036 * @class TAO_BiDirGIOP_Loader 00037 * 00038 * @brief Class that loads the BiDir library. 00039 */ 00040 00041 class TAO_BiDirGIOP_Export TAO_BiDirGIOP_Loader : public TAO_BiDir_Adapter 00042 { 00043 public: 00044 00045 /// Constructor 00046 TAO_BiDirGIOP_Loader (void); 00047 00048 /// Destructor 00049 virtual ~TAO_BiDirGIOP_Loader (void); 00050 00051 /// Initialize the BiDIR loader hooks. 00052 virtual int init (int argc, 00053 ACE_TCHAR* []); 00054 00055 virtual void load_policy_validators (TAO_Policy_Validator &validator); 00056 00057 /// Used to force the initialization of the ORB code. 00058 static int Initializer (void); 00059 00060 private: 00061 00062 /// Flag to indicate whether the BiDirGIOP library has been 00063 /// activated. 00064 bool initialized_; 00065 }; 00066 00067 static bool 00068 TAO_Requires_BiDirGIOP_Initializer = TAO_BiDirGIOP_Loader::Initializer (); 00069 00070 00071 ACE_STATIC_SVC_DECLARE (TAO_BiDirGIOP_Loader) 00072 ACE_FACTORY_DECLARE (TAO_BiDirGIOP, TAO_BiDirGIOP_Loader) 00073 00074 TAO_END_VERSIONED_NAMESPACE_DECL 00075 00076 00077 #define TAO_BIDIRGIOP_SAFE_INCLUDE 00078 #include "tao/BiDir_GIOP/BiDirPolicyC.h" 00079 #undef TAO_BIDIRGIOP_SAFE_INCLUDE 00080 00081 #include /**/ "ace/post.h" 00082 #endif /* TAO_BIDIR_GIOP_H */