diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2005-06-14 08:48:15 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2005-06-14 08:48:15 +0000 |
commit | ce6c4643b7e77f776b73b004195d92566ffa3e3b (patch) | |
tree | 996b8d418f340d7737563f4692b2b3145d42a32d /TAO | |
parent | a6b64495c53f9d4e1147fcf78374b14309b2deec (diff) | |
download | ATCD-ce6c4643b7e77f776b73b004195d92566ffa3e3b.tar.gz |
ChangeLogTag: Tue Jun 14 07:38:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO')
84 files changed, 1633 insertions, 776 deletions
diff --git a/TAO/tao/BiDir_GIOP.mpc b/TAO/tao/BiDir_GIOP.mpc index 54b3d07fe05..c503b33a21f 100644 --- a/TAO/tao/BiDir_GIOP.mpc +++ b/TAO/tao/BiDir_GIOP.mpc @@ -1,5 +1,5 @@ //$Id$ -project : taolib, core { +project : taolib, core, pi { sharedname = TAO_BiDirGIOP dynamicflags = TAO_BIDIRGIOP_BUILD_DLL diff --git a/TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.cpp b/TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.cpp index 328d9fb86da..ff26f0ca91f 100644 --- a/TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.cpp +++ b/TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.cpp @@ -40,8 +40,6 @@ TAO_BiDir_ORBInitializer::register_policy_factories ( /// Register the BiDir policy factories. PortableInterceptor::PolicyFactory_ptr temp_factory = PortableInterceptor::PolicyFactory::_nil (); - PortableInterceptor::PolicyFactory_var policy_factory; - /// This policy factory is used for all BiDir related policies. ACE_NEW_THROW_EX (temp_factory, TAO_BiDir_PolicyFactory, @@ -52,7 +50,7 @@ TAO_BiDir_ORBInitializer::register_policy_factories ( CORBA::COMPLETED_NO)); ACE_CHECK; - policy_factory = temp_factory; + PortableInterceptor::PolicyFactory_var policy_factory = temp_factory; /// Bind the same policy factory to all BiDir related policy /// types since a single policy factory is used to create each of diff --git a/TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.h b/TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.h index 0671cf2bbd1..736f2b637f4 100644 --- a/TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.h +++ b/TAO/tao/BiDir_GIOP/BiDir_ORBInitializer.h @@ -20,7 +20,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/PortableInterceptorC.h" +#include "tao/PI/PI.h" #include "tao/LocalObject.h" // This is to remove "inherits via dominance" warnings from MSVC. @@ -47,7 +47,7 @@ public: private: - ///< Register Messaging policy factories. + ///< Register BiDir policy factories. void register_policy_factories ( PortableInterceptor::ORBInitInfo_ptr info ACE_ENV_ARG_DECL); diff --git a/TAO/tao/BiDir_GIOP/BiDir_PolicyFactory.h b/TAO/tao/BiDir_GIOP/BiDir_PolicyFactory.h index 4f2dcc637d2..cdce842dead 100644 --- a/TAO/tao/BiDir_GIOP/BiDir_PolicyFactory.h +++ b/TAO/tao/BiDir_GIOP/BiDir_PolicyFactory.h @@ -21,7 +21,7 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/PortableInterceptorC.h" +#include "tao/PI/PI.h" #include "tao/LocalObject.h" // This is to remove "inherits via dominance" warnings from MSVC. diff --git a/TAO/tao/CodecFactory/CDR_Encaps_Codec.h b/TAO/tao/CodecFactory/CDR_Encaps_Codec.h index 617f57d299d..f89f4bca6bf 100644 --- a/TAO/tao/CodecFactory/CDR_Encaps_Codec.h +++ b/TAO/tao/CodecFactory/CDR_Encaps_Codec.h @@ -21,7 +21,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/IOP_CodecC.h" +#include "IOP_Codec_includeC.h" #include "tao/LocalObject.h" /** diff --git a/TAO/tao/CodecFactory/CodecFactory.h b/TAO/tao/CodecFactory/CodecFactory.h index 2961204afbb..d04eb263184 100644 --- a/TAO/tao/CodecFactory/CodecFactory.h +++ b/TAO/tao/CodecFactory/CodecFactory.h @@ -58,6 +58,10 @@ TAO_Requires_CodecFactory_Initializer = TAO_CodecFactory_Loader::Initializer (); #endif /* ACE_HAS_BROKEN_STATIC_CONSTRUCTORS */ +#define TAO_CODECFACTORY_SAFE_INCLUDE +#include "IOP_CodecC.h" +#undef TAO_CODECFACTORY_SAFE_INCLUDE + #include /**/ "ace/post.h" #endif /* TAO_CODECFACTORY_H */ diff --git a/TAO/tao/CodecFactory/CodecFactory_impl.h b/TAO/tao/CodecFactory/CodecFactory_impl.h index 4a70de5fd74..785a1eec9d6 100644 --- a/TAO/tao/CodecFactory/CodecFactory_impl.h +++ b/TAO/tao/CodecFactory/CodecFactory_impl.h @@ -22,7 +22,7 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "tao/LocalObject.h" -#include "tao/IOP_CodecC.h" +#include "IOP_Codec_includeC.h" // This is to remove "inherits via dominance" warnings from MSVC. // MSVC is being a little too paranoid. diff --git a/TAO/tao/IOP_Codec.pidl b/TAO/tao/CodecFactory/IOP_Codec.pidl index d322ae98bc1..d322ae98bc1 100644 --- a/TAO/tao/IOP_Codec.pidl +++ b/TAO/tao/CodecFactory/IOP_Codec.pidl diff --git a/TAO/tao/IOP_CodecA.cpp b/TAO/tao/CodecFactory/IOP_CodecA.cpp index cddbabf3d68..5c5a791f7e2 100644 --- a/TAO/tao/IOP_CodecA.cpp +++ b/TAO/tao/CodecFactory/IOP_CodecA.cpp @@ -25,27 +25,27 @@ // Information about TAO is available at: // http://www.cs.wustl.edu/~schmidt/TAO.html -#include "IOP_CodecC.h" +#include "CodecFactory.h" #include "tao/Null_RefCount_Policy.h" #include "tao/TypeCode_Constants.h" #include "tao/Alias_TypeCode_Static.h" #include "tao/Objref_TypeCode_Static.h" #include "tao/Struct_TypeCode_Static.h" #include "tao/TypeCode_Struct_Field.h" +#include "tao/Recursive_Type_TypeCode.h" #include "tao/CDR.h" #include "tao/Any.h" #include "tao/Any_Impl_T.h" #include "tao/Any_Dual_Impl_T.h" // TAO_IDL - Generated from -// be/be_visitor_typecode/struct_typecode.cpp:74 +// be\be_visitor_typecode/struct_typecode.cpp:87 static TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const * const _tao_fields_IOP_Codec_InvalidTypeForEncoding = 0; static TAO::TypeCode::Struct<char const *, - CORBA::TypeCode_ptr const *, - TAO::TypeCode::Struct_Field<char const *, - CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy> + CORBA::TypeCode_ptr const *, + TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *, + TAO::Null_RefCount_Policy> _tao_tc_IOP_Codec_InvalidTypeForEncoding ( CORBA::tk_except, "IDL:omg.org/IOP/Codec/InvalidTypeForEncoding:1.0", @@ -57,14 +57,13 @@ static TAO::TypeCode::Struct<char const *, &_tao_tc_IOP_Codec_InvalidTypeForEncoding; // TAO_IDL - Generated from -// be/be_visitor_typecode/struct_typecode.cpp:74 +// be\be_visitor_typecode/struct_typecode.cpp:87 static TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const * const _tao_fields_IOP_Codec_FormatMismatch = 0; static TAO::TypeCode::Struct<char const *, - CORBA::TypeCode_ptr const *, - TAO::TypeCode::Struct_Field<char const *, - CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy> + CORBA::TypeCode_ptr const *, + TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *, + TAO::Null_RefCount_Policy> _tao_tc_IOP_Codec_FormatMismatch ( CORBA::tk_except, "IDL:omg.org/IOP/Codec/FormatMismatch:1.0", @@ -76,14 +75,13 @@ static TAO::TypeCode::Struct<char const *, &_tao_tc_IOP_Codec_FormatMismatch; // TAO_IDL - Generated from -// be/be_visitor_typecode/struct_typecode.cpp:74 +// be\be_visitor_typecode/struct_typecode.cpp:87 static TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const * const _tao_fields_IOP_Codec_TypeMismatch = 0; static TAO::TypeCode::Struct<char const *, - CORBA::TypeCode_ptr const *, - TAO::TypeCode::Struct_Field<char const *, - CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy> + CORBA::TypeCode_ptr const *, + TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *, + TAO::Null_RefCount_Policy> _tao_tc_IOP_Codec_TypeMismatch ( CORBA::tk_except, "IDL:omg.org/IOP/Codec/TypeMismatch:1.0", @@ -95,7 +93,7 @@ static TAO::TypeCode::Struct<char const *, &_tao_tc_IOP_Codec_TypeMismatch; // TAO_IDL - Generated from -// be/be_visitor_typecode/objref_typecode.cpp:76 +// be\be_visitor_typecode/objref_typecode.cpp:76 static TAO::TypeCode::Objref<char const *, TAO::Null_RefCount_Policy> @@ -113,7 +111,7 @@ namespace IOP // TAO_IDL - Generated from -// be/be_visitor_typecode/alias_typecode.cpp:31 +// be\be_visitor_typecode/alias_typecode.cpp:31 static TAO::TypeCode::Alias<char const *, CORBA::TypeCode_ptr const *, @@ -133,7 +131,7 @@ namespace IOP // TAO_IDL - Generated from -// be/be_visitor_typecode/struct_typecode.cpp:74 +// be\be_visitor_typecode/struct_typecode.cpp:87 static TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const _tao_fields_IOP_Encoding[] = { @@ -143,10 +141,9 @@ static TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> co }; static TAO::TypeCode::Struct<char const *, - CORBA::TypeCode_ptr const *, - TAO::TypeCode::Struct_Field<char const *, - CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy> + CORBA::TypeCode_ptr const *, + TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *, + TAO::Null_RefCount_Policy> _tao_tc_IOP_Encoding ( CORBA::tk_struct, "IDL:omg.org/IOP/Encoding:1.0", @@ -163,14 +160,13 @@ namespace IOP // TAO_IDL - Generated from -// be/be_visitor_typecode/struct_typecode.cpp:74 +// be\be_visitor_typecode/struct_typecode.cpp:87 static TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const * const _tao_fields_IOP_CodecFactory_UnknownEncoding = 0; static TAO::TypeCode::Struct<char const *, - CORBA::TypeCode_ptr const *, - TAO::TypeCode::Struct_Field<char const *, - CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy> + CORBA::TypeCode_ptr const *, + TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *, + TAO::Null_RefCount_Policy> _tao_tc_IOP_CodecFactory_UnknownEncoding ( CORBA::tk_except, "IDL:omg.org/IOP/CodecFactory/UnknownEncoding:1.0", @@ -182,7 +178,7 @@ static TAO::TypeCode::Struct<char const *, &_tao_tc_IOP_CodecFactory_UnknownEncoding; // TAO_IDL - Generated from -// be/be_visitor_typecode/objref_typecode.cpp:76 +// be\be_visitor_typecode/objref_typecode.cpp:76 static TAO::TypeCode::Objref<char const *, TAO::Null_RefCount_Policy> @@ -200,7 +196,7 @@ namespace IOP // TAO_IDL - Generated from -// be/be_visitor_interface/any_op_cs.cpp:50 +// be\be_visitor_interface/any_op_cs.cpp:50 namespace TAO { @@ -275,7 +271,7 @@ operator>>= ( } // TAO_IDL - Generated from -// be/be_visitor_exception/any_op_cs.cpp:50 +// be\be_visitor_exception/any_op_cs.cpp:50 namespace TAO { @@ -350,7 +346,7 @@ CORBA::Boolean operator>>= ( } // TAO_IDL - Generated from -// be/be_visitor_exception/any_op_cs.cpp:50 +// be\be_visitor_exception/any_op_cs.cpp:50 namespace TAO { @@ -425,7 +421,7 @@ CORBA::Boolean operator>>= ( } // TAO_IDL - Generated from -// be/be_visitor_exception/any_op_cs.cpp:50 +// be\be_visitor_exception/any_op_cs.cpp:50 namespace TAO { @@ -500,7 +496,7 @@ CORBA::Boolean operator>>= ( } // TAO_IDL - Generated from -// be/be_visitor_structure/any_op_cs.cpp:54 +// be\be_visitor_structure/any_op_cs.cpp:54 // Copying insertion. void operator<<= ( @@ -558,7 +554,7 @@ CORBA::Boolean operator>>= ( } // TAO_IDL - Generated from -// be/be_visitor_interface/any_op_cs.cpp:50 +// be\be_visitor_interface/any_op_cs.cpp:50 namespace TAO { @@ -633,7 +629,7 @@ operator>>= ( } // TAO_IDL - Generated from -// be/be_visitor_exception/any_op_cs.cpp:50 +// be\be_visitor_exception/any_op_cs.cpp:50 namespace TAO { diff --git a/TAO/tao/IOP_CodecC.cpp b/TAO/tao/CodecFactory/IOP_CodecC.cpp index c20eb02a233..965d8fb585e 100644 --- a/TAO/tao/IOP_CodecC.cpp +++ b/TAO/tao/CodecFactory/IOP_CodecC.cpp @@ -29,7 +29,7 @@ // be\be_codegen.cpp:291 -#include "IOP_CodecC.h" +#include "CodecFactory.h" #include "tao/CDR.h" #include "tao/ORB_Core.h" #include "ace/OS_NS_string.h" @@ -83,7 +83,7 @@ TAO::Objref_Traits<IOP::Codec>::marshal ( return CORBA::Object::marshal (p, cdr); } -// TAO_IDL - Generated from +// TAO_IDL - Generated from // be\be_visitor_exception/exception_cs.cpp:63 IOP::Codec::InvalidTypeForEncoding::InvalidTypeForEncoding (void) @@ -178,7 +178,7 @@ CORBA::TypeCode_ptr IOP::Codec::InvalidTypeForEncoding::_tao_type (void) const return ::IOP::Codec::_tc_InvalidTypeForEncoding; } -// TAO_IDL - Generated from +// TAO_IDL - Generated from // be\be_visitor_exception/exception_cs.cpp:63 IOP::Codec::FormatMismatch::FormatMismatch (void) @@ -273,7 +273,7 @@ CORBA::TypeCode_ptr IOP::Codec::FormatMismatch::_tao_type (void) const return ::IOP::Codec::_tc_FormatMismatch; } -// TAO_IDL - Generated from +// TAO_IDL - Generated from // be\be_visitor_exception/exception_cs.cpp:63 IOP::Codec::TypeMismatch::TypeMismatch (void) @@ -374,7 +374,7 @@ IOP::Codec::Codec (void) IOP::Codec::~Codec (void) {} -void +void IOP::Codec::_tao_any_destructor (void *_tao_void_pointer) { Codec *_tao_tmp_pointer = @@ -392,10 +392,10 @@ IOP::Codec::_narrow ( { return Codec::_nil (); } - + Codec_ptr proxy = dynamic_cast<Codec_ptr> (_tao_objref); - + return Codec::_duplicate (proxy); } @@ -409,10 +409,10 @@ IOP::Codec::_unchecked_narrow ( { return Codec::_nil (); } - + Codec_ptr proxy = dynamic_cast<Codec_ptr> (_tao_objref); - + return Codec::_duplicate (proxy); } @@ -423,7 +423,7 @@ IOP::Codec::_duplicate (Codec_ptr obj) { obj->_add_ref (); } - + return obj; } @@ -473,10 +473,10 @@ IOP::Codec::marshal (TAO_OutputCDR &) return false; } -// TAO_IDL - Generated from +// TAO_IDL - Generated from // be\be_visitor_structure/structure_cs.cpp:66 -void +void IOP::Encoding::_tao_any_destructor ( void *_tao_void_pointer ) @@ -522,7 +522,7 @@ TAO::Objref_Traits<IOP::CodecFactory>::marshal ( return CORBA::Object::marshal (p, cdr); } -// TAO_IDL - Generated from +// TAO_IDL - Generated from // be\be_visitor_exception/exception_cs.cpp:63 IOP::CodecFactory::UnknownEncoding::UnknownEncoding (void) @@ -623,7 +623,7 @@ IOP::CodecFactory::CodecFactory (void) IOP::CodecFactory::~CodecFactory (void) {} -void +void IOP::CodecFactory::_tao_any_destructor (void *_tao_void_pointer) { CodecFactory *_tao_tmp_pointer = @@ -641,10 +641,10 @@ IOP::CodecFactory::_narrow ( { return CodecFactory::_nil (); } - + CodecFactory_ptr proxy = dynamic_cast<CodecFactory_ptr> (_tao_objref); - + return CodecFactory::_duplicate (proxy); } @@ -658,10 +658,10 @@ IOP::CodecFactory::_unchecked_narrow ( { return CodecFactory::_nil (); } - + CodecFactory_ptr proxy = dynamic_cast<CodecFactory_ptr> (_tao_objref); - + return CodecFactory::_duplicate (proxy); } @@ -672,7 +672,7 @@ IOP::CodecFactory::_duplicate (CodecFactory_ptr obj) { obj->_add_ref (); } - + return obj; } diff --git a/TAO/tao/IOP_CodecC.h b/TAO/tao/CodecFactory/IOP_CodecC.h index dd1300a2a5f..d17987c45bf 100644 --- a/TAO/tao/IOP_CodecC.h +++ b/TAO/tao/CodecFactory/IOP_CodecC.h @@ -33,6 +33,9 @@ #include /**/ "ace/pre.h" +#ifndef TAO_CODECFACTORY_SAFE_INCLUDE +#error "You should not include IOP_CodecC.h directly, use CodecFactory.h" +#endif /* !TAO_CODECFACTORY_SAFE_INCLUDE */ #include "ace/config-all.h" @@ -40,7 +43,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/TAO_Export.h" +#include "tao/CodecFactory/codecfactory_export.h" #include "tao/ORB.h" #include "tao/SystemException.h" #include "tao/Environment.h" @@ -48,6 +51,7 @@ #include "tao/TypeCode.h" #include "tao/TypeCode_Constants.h" #include "tao/Any.h" +#include "tao/TypeCode.h" #include "tao/Objref_VarOut_T.h" #include "tao/VarOut_T.h" @@ -57,7 +61,7 @@ #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO #endif -#define TAO_EXPORT_MACRO TAO_Export +#define TAO_EXPORT_MACRO TAO_CodecFactory_Export #if defined(_MSC_VER) #pragma warning(push) @@ -73,22 +77,22 @@ namespace IOP { - + // TAO_IDL - Generated from // be\be_interface.cpp:598 #if !defined (_IOP_CODEC__VAR_OUT_CH_) #define _IOP_CODEC__VAR_OUT_CH_ - + class Codec; typedef Codec *Codec_ptr; - + typedef TAO_Objref_Var_T< Codec > Codec_var; - + typedef TAO_Objref_Out_T< Codec @@ -96,65 +100,65 @@ namespace IOP Codec_out; #endif /* end #if !defined */ - + // TAO_IDL - Generated from // be\be_visitor_interface/interface_ch.cpp:54 #if !defined (_IOP_CODEC_CH_) #define _IOP_CODEC_CH_ - - class TAO_Export Codec + + class TAO_CodecFactory_Export Codec : public virtual CORBA::Object { public: typedef Codec_ptr _ptr_type; typedef Codec_var _var_type; - + // The static operations. static Codec_ptr _duplicate (Codec_ptr obj); - + static void _tao_release (Codec_ptr obj); - + static Codec_ptr _narrow ( CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - + static Codec_ptr _unchecked_narrow ( CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - + static Codec_ptr _nil (void) { return static_cast<Codec_ptr> (0); } - + static void _tao_any_destructor (void *); - + // TAO_IDL - Generated from // be\be_visitor_exception/exception_ch.cpp:51 #if !defined (_IOP_CODEC_INVALIDTYPEFORENCODING_CH_) #define _IOP_CODEC_INVALIDTYPEFORENCODING_CH_ - - class TAO_Export InvalidTypeForEncoding : public CORBA::UserException + + class TAO_CodecFactory_Export InvalidTypeForEncoding : public CORBA::UserException { public: - + InvalidTypeForEncoding (void); InvalidTypeForEncoding (const InvalidTypeForEncoding &); ~InvalidTypeForEncoding (void); InvalidTypeForEncoding &operator= (const InvalidTypeForEncoding &); - + static void _tao_any_destructor (void *); - + static InvalidTypeForEncoding *_downcast (CORBA::Exception *); static const InvalidTypeForEncoding *_downcast (CORBA::Exception const *); - + static CORBA::Exception *_alloc (void); - + virtual CORBA::Exception *_tao_duplicate (void) const; virtual void _raise (void) const; @@ -163,35 +167,35 @@ namespace IOP TAO_OutputCDR & ACE_ENV_ARG_DECL ) const; - + virtual void _tao_decode ( TAO_InputCDR & ACE_ENV_ARG_DECL ); - + // TAO_IDL - Generated from // be\be_visitor_exception/exception_ch.cpp:127 - + virtual CORBA::TypeCode_ptr _tao_type (void) const; }; - + // TAO_IDL - Generated from // be\be_visitor_typecode/typecode_decl.cpp:44 - + static ::CORBA::TypeCode_ptr const _tc_InvalidTypeForEncoding; #endif /* end #if !defined */ - + // TAO_IDL - Generated from // be\be_visitor_exception/exception_ch.cpp:51 #if !defined (_IOP_CODEC_FORMATMISMATCH_CH_) #define _IOP_CODEC_FORMATMISMATCH_CH_ - - class TAO_Export FormatMismatch : public CORBA::UserException + + class TAO_CodecFactory_Export FormatMismatch : public CORBA::UserException { public: - + FormatMismatch (void); FormatMismatch (const FormatMismatch &); ~FormatMismatch (void); @@ -238,7 +242,7 @@ namespace IOP #if !defined (_IOP_CODEC_TYPEMISMATCH_CH_) #define _IOP_CODEC_TYPEMISMATCH_CH_ - class TAO_Export TypeMismatch : public CORBA::UserException + class TAO_CodecFactory_Export TypeMismatch : public CORBA::UserException { public: @@ -361,7 +365,7 @@ namespace IOP // TAO_IDL - Generated from // be\be_visitor_typecode/typecode_decl.cpp:44 - extern TAO_Export ::CORBA::TypeCode_ptr const _tc_Codec; + extern TAO_CodecFactory_Export ::CORBA::TypeCode_ptr const _tc_Codec; // TAO_IDL - Generated from // be\be_visitor_typedef/typedef_ch.cpp:379 @@ -372,7 +376,7 @@ namespace IOP // TAO_IDL - Generated from // be\be_visitor_typecode/typecode_decl.cpp:44 - extern TAO_Export ::CORBA::TypeCode_ptr const _tc_EncodingFormat; + extern TAO_CodecFactory_Export ::CORBA::TypeCode_ptr const _tc_EncodingFormat; // TAO_IDL - Generated from // be\be_visitor_constant/constant_ch.cpp:52 @@ -397,7 +401,7 @@ namespace IOP // TAO_IDL - Generated from // be\be_visitor_structure/structure_ch.cpp:52 - struct TAO_Export Encoding + struct TAO_CodecFactory_Export Encoding { typedef Encoding_var _var_type; @@ -410,7 +414,7 @@ namespace IOP // TAO_IDL - Generated from // be\be_visitor_typecode/typecode_decl.cpp:44 - extern TAO_Export ::CORBA::TypeCode_ptr const _tc_Encoding; + extern TAO_CodecFactory_Export ::CORBA::TypeCode_ptr const _tc_Encoding; // TAO_IDL - Generated from // be\be_interface.cpp:598 @@ -441,7 +445,7 @@ namespace IOP #if !defined (_IOP_CODECFACTORY_CH_) #define _IOP_CODECFACTORY_CH_ - class TAO_Export CodecFactory + class TAO_CodecFactory_Export CodecFactory : public virtual CORBA::Object { public: @@ -476,7 +480,7 @@ namespace IOP #if !defined (_IOP_CODECFACTORY_UNKNOWNENCODING_CH_) #define _IOP_CODECFACTORY_UNKNOWNENCODING_CH_ - class TAO_Export UnknownEncoding : public CORBA::UserException + class TAO_CodecFactory_Export UnknownEncoding : public CORBA::UserException { public: @@ -561,7 +565,7 @@ namespace IOP // TAO_IDL - Generated from // be\be_visitor_typecode/typecode_decl.cpp:44 - extern TAO_Export ::CORBA::TypeCode_ptr const _tc_CodecFactory; + extern TAO_CodecFactory_Export ::CORBA::TypeCode_ptr const _tc_CodecFactory; // TAO_IDL - Generated from // be\be_visitor_module/module_ch.cpp:66 @@ -579,7 +583,7 @@ namespace TAO #define _IOP_CODEC__TRAITS_CH_ template<> - struct TAO_Export Objref_Traits< ::IOP::Codec> + struct TAO_CodecFactory_Export Objref_Traits< ::IOP::Codec> { static ::IOP::Codec_ptr duplicate ( ::IOP::Codec_ptr @@ -600,7 +604,7 @@ namespace TAO #define _IOP_CODECFACTORY__TRAITS_CH_ template<> - struct TAO_Export Objref_Traits< ::IOP::CodecFactory> + struct TAO_CodecFactory_Export Objref_Traits< ::IOP::CodecFactory> { static ::IOP::CodecFactory_ptr duplicate ( ::IOP::CodecFactory_ptr @@ -621,62 +625,62 @@ namespace TAO // TAO_IDL - Generated from // be\be_visitor_interface/any_op_ch.cpp:52 -TAO_Export void operator<<= (CORBA::Any &, IOP::Codec_ptr); // copying -TAO_Export void operator<<= (CORBA::Any &, IOP::Codec_ptr *); // non-copying -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::Codec_ptr &); +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, IOP::Codec_ptr); // copying +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, IOP::Codec_ptr *); // non-copying +TAO_CodecFactory_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::Codec_ptr &); // TAO_IDL - Generated from // be\be_visitor_exception/any_op_ch.cpp:52 -TAO_Export void operator<<= (CORBA::Any &, const IOP::Codec::InvalidTypeForEncoding &); // copying version -TAO_Export void operator<<= (CORBA::Any &, IOP::Codec::InvalidTypeForEncoding*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::Codec::InvalidTypeForEncoding *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::Codec::InvalidTypeForEncoding *&); +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, const IOP::Codec::InvalidTypeForEncoding &); // copying version +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, IOP::Codec::InvalidTypeForEncoding*); // noncopying version +TAO_CodecFactory_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::Codec::InvalidTypeForEncoding *&); // deprecated +TAO_CodecFactory_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::Codec::InvalidTypeForEncoding *&); // TAO_IDL - Generated from // be\be_visitor_exception/any_op_ch.cpp:52 -TAO_Export void operator<<= (CORBA::Any &, const IOP::Codec::FormatMismatch &); // copying version -TAO_Export void operator<<= (CORBA::Any &, IOP::Codec::FormatMismatch*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::Codec::FormatMismatch *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::Codec::FormatMismatch *&); +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, const IOP::Codec::FormatMismatch &); // copying version +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, IOP::Codec::FormatMismatch*); // noncopying version +TAO_CodecFactory_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::Codec::FormatMismatch *&); // deprecated +TAO_CodecFactory_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::Codec::FormatMismatch *&); // TAO_IDL - Generated from // be\be_visitor_exception/any_op_ch.cpp:52 -TAO_Export void operator<<= (CORBA::Any &, const IOP::Codec::TypeMismatch &); // copying version -TAO_Export void operator<<= (CORBA::Any &, IOP::Codec::TypeMismatch*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::Codec::TypeMismatch *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::Codec::TypeMismatch *&); +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, const IOP::Codec::TypeMismatch &); // copying version +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, IOP::Codec::TypeMismatch*); // noncopying version +TAO_CodecFactory_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::Codec::TypeMismatch *&); // deprecated +TAO_CodecFactory_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::Codec::TypeMismatch *&); // TAO_IDL - Generated from // be\be_visitor_structure/any_op_ch.cpp:52 -TAO_Export void operator<<= (CORBA::Any &, const IOP::Encoding &); // copying version -TAO_Export void operator<<= (CORBA::Any &, IOP::Encoding*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::Encoding *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::Encoding *&); +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, const IOP::Encoding &); // copying version +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, IOP::Encoding*); // noncopying version +TAO_CodecFactory_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::Encoding *&); // deprecated +TAO_CodecFactory_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::Encoding *&); // TAO_IDL - Generated from // be\be_visitor_interface/any_op_ch.cpp:52 -TAO_Export void operator<<= (CORBA::Any &, IOP::CodecFactory_ptr); // copying -TAO_Export void operator<<= (CORBA::Any &, IOP::CodecFactory_ptr *); // non-copying -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::CodecFactory_ptr &); +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, IOP::CodecFactory_ptr); // copying +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, IOP::CodecFactory_ptr *); // non-copying +TAO_CodecFactory_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::CodecFactory_ptr &); // TAO_IDL - Generated from // be\be_visitor_exception/any_op_ch.cpp:52 -TAO_Export void operator<<= (CORBA::Any &, const IOP::CodecFactory::UnknownEncoding &); // copying version -TAO_Export void operator<<= (CORBA::Any &, IOP::CodecFactory::UnknownEncoding*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::CodecFactory::UnknownEncoding *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::CodecFactory::UnknownEncoding *&); +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, const IOP::CodecFactory::UnknownEncoding &); // copying version +TAO_CodecFactory_Export void operator<<= (CORBA::Any &, IOP::CodecFactory::UnknownEncoding*); // noncopying version +TAO_CodecFactory_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::CodecFactory::UnknownEncoding *&); // deprecated +TAO_CodecFactory_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::CodecFactory::UnknownEncoding *&); // TAO_IDL - Generated from // be\be_visitor_structure/cdr_op_ch.cpp:54 -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const IOP::Encoding &); -TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, IOP::Encoding &); +TAO_CodecFactory_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const IOP::Encoding &); +TAO_CodecFactory_Export CORBA::Boolean operator>> (TAO_InputCDR &, IOP::Encoding &); // TAO_IDL - Generated from // be\be_codegen.cpp:955 diff --git a/TAO/tao/IOP_CodecS.h b/TAO/tao/CodecFactory/IOP_CodecS.h index 17b1360599e..17b1360599e 100644 --- a/TAO/tao/IOP_CodecS.h +++ b/TAO/tao/CodecFactory/IOP_CodecS.h diff --git a/TAO/tao/CodecFactory/IOP_Codec_include.pidl b/TAO/tao/CodecFactory/IOP_Codec_include.pidl new file mode 100644 index 00000000000..abac98ff365 --- /dev/null +++ b/TAO/tao/CodecFactory/IOP_Codec_include.pidl @@ -0,0 +1,40 @@ +/** + * @file IOP_Codec.pidl + * + * $Id$ + * + * @brief Include file for use in applications that need IOP_Codec.pidl. + * + * This file just includes IOP_Codec.pidl. The *C.h file generated from + * this is hand-crafted to itself include CodecFactory.h instead of + * IOP_CodecC.h (which will produce a compiler error message if + * included directly). The IOP_Codec_includeC.h file can then be + * included directly and automatically by the IDL compiler when + * building the application. + * + * 1. Run the tao_idl compiler on the pidl file. The command used for + * this is: + * + * tao_idl -o orig -St -Sc -Sp -Sci -SS + * -Wb,export_macro=TAO_CodecFactory_Export \ + * -Wb,export_include="tao/CodecFactory/codecfactory_export.h" \ + * -Wb,pre_include="ace/pre.h" + * -Wb,post_include="ace/post.h" + * IOP_Codec_include.pidl + * + * 2. Then change this line in IOP_Codec_includeC.h: + * + * #include "IOP_CodecC.h" + * + * to + * + * #include "CodecFactory.h" + */ + +#ifndef _IOP_CODEC_INCLUDE_IDL_ +#define _IOP_CODEC_INCLUDE_IDL_ + +///FUZZ: disable check_for_include/ +#include <tao/CodecFactory/IOP_Codec.pidl> + +#endif /* _IOP_CODEC_INCLUDE_IDL_ */ diff --git a/TAO/tao/CodecFactory/IOP_Codec_includeC.h b/TAO/tao/CodecFactory/IOP_Codec_includeC.h new file mode 100644 index 00000000000..27a39ea7f24 --- /dev/null +++ b/TAO/tao/CodecFactory/IOP_Codec_includeC.h @@ -0,0 +1,86 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be\be_codegen.cpp:153 + +#ifndef _TAO_IDL_ORIG_IOP_CODEC_INCLUDEC_H_ +#define _TAO_IDL_ORIG_IOP_CODEC_INCLUDEC_H_ + +#include /**/ "ace/pre.h" + + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/CodecFactory/codecfactory_export.h" +#include "tao/ORB.h" +#include "tao/Environment.h" + +#include "tao/CodecFactory/CodecFactory.h" + +#if defined (TAO_EXPORT_MACRO) +#undef TAO_EXPORT_MACRO +#endif +#define TAO_EXPORT_MACRO TAO_CodecFactory_Export + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option push -w-rvl -w-rch -w-ccc -w-inl +#endif /* __BORLANDC__ */ + +// TAO_IDL - Generated from +// be\be_visitor_traits.cpp:61 + +// Traits specializations. +namespace TAO +{ +} + +// TAO_IDL - Generated from +// be\be_codegen.cpp:955 + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option pop +#endif /* __BORLANDC__ */ + +#include /**/ "ace/post.h" + +#endif /* ifndef */ + + diff --git a/TAO/tao/ORBInitInfoS.h b/TAO/tao/CodecFactory/IOP_Codec_includeS.h index 17b1360599e..17b1360599e 100644 --- a/TAO/tao/ORBInitInfoS.h +++ b/TAO/tao/CodecFactory/IOP_Codec_includeS.h diff --git a/TAO/tao/CodecFactory/diff/IOP_Codec.diff b/TAO/tao/CodecFactory/diff/IOP_Codec.diff new file mode 100644 index 00000000000..46a67dc755f --- /dev/null +++ b/TAO/tao/CodecFactory/diff/IOP_Codec.diff @@ -0,0 +1,34 @@ +--- orig/IOP_COdecC.h 2005-06-07 13:09:58.255201600 +0200 ++++ IOP_COdecC.h 2005-06-07 13:45:14.618382400 +0200 +@@ -33,6 +33,9 @@ + + #include /**/ "ace/pre.h" + ++#ifndef TAO_CODECFACTORY_SAFE_INCLUDE ++#error "You should not include IOP_CodecC.h directly, use CodecFactory.h" ++#endif /* !TAO_CODECFACTORY_SAFE_INCLUDE */ + + #include "ace/config-all.h" + +--- orig/IOP_COdecC.cpp 2005-06-07 13:09:58.255201600 +0200 ++++ IOP_COdecC.cpp 2005-06-07 13:43:36.437204800 +0200 +@@ -29,7 +29,7 @@ + // be\be_codegen.cpp:291 + + +-#include "IOP_CodecC.h" ++#include "CodecFactory.h" + #include "tao/CDR.h" + #include "tao/ORB_Core.h" + #include "ace/OS_NS_string.h" +--- orig/IOP_COdecA.cpp 2005-06-07 13:09:58.255201600 +0200 ++++ IOP_COdecA.cpp 2005-06-07 13:43:11.170873600 +0200 +@@ -25,7 +25,7 @@ + // Information about TAO is available at: + // http://www.cs.wustl.edu/~schmidt/TAO.html + +-#include "IOP_CodecC.h" ++#include "CodecFactory.h" + #include "tao/Null_RefCount_Policy.h" + #include "tao/TypeCode_Constants.h" + #include "tao/Alias_TypeCode_Static.h" diff --git a/TAO/tao/IOP.pidl b/TAO/tao/IOP.pidl index 7e70877a9ca..b91c64d66af 100644 --- a/TAO/tao/IOP.pidl +++ b/TAO/tao/IOP.pidl @@ -29,6 +29,5 @@ #define TAO_IOP_PIDL #include "IOP_IOR.pidl" -#include "IOP_Codec.pidl" #endif /* TAO_IOP_PIDL */ diff --git a/TAO/tao/IOPC.h b/TAO/tao/IOPC.h index ef62ef4934b..392a5d9e1f4 100644 --- a/TAO/tao/IOPC.h +++ b/TAO/tao/IOPC.h @@ -45,7 +45,6 @@ #include "tao/Environment.h" #include "tao/IOP_IORC.h" -#include "tao/IOP_CodecC.h" #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO diff --git a/TAO/tao/IORInterceptor.mpc b/TAO/tao/IORInterceptor.mpc index 4d59fed3776..0500c435f1e 100644 --- a/TAO/tao/IORInterceptor.mpc +++ b/TAO/tao/IORInterceptor.mpc @@ -1,5 +1,5 @@ //$Id$ -project : taolib, portableserver, objreftemplate, core { +project : taolib, portableserver, objreftemplate, pi, core { sharedname = TAO_IORInterceptor dynamicflags = TAO_IORINTERCEPTOR_BUILD_DLL diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp index 4a0ebe96dbb..d506cc0ba95 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp +++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp @@ -4,6 +4,7 @@ #include "IORInfo.h" #include "tao/debug.h" #include "tao/ORB_Constants.h" +#include "tao/PI/PI.h" #include "tao/PortableServer/Root_POA.h" #include "tao/PortableServer/Non_Servant_Upcall.h" @@ -21,11 +22,16 @@ TAO_IORInterceptor_Adapter_Impl::add_interceptor ( PortableInterceptor::IORInterceptor_ptr i ACE_ENV_ARG_DECL ) - ACE_THROW_SPEC ((CORBA::SystemException)) { - this->ior_interceptor_list_.add_interceptor (i - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + int retval = + this->ior_interceptor_list_.add_interceptor (i + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + if (retval == -1) + { + ACE_THROW (PortableInterceptor::ORBInitInfo::DuplicateName ()); + } } void diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h index 5d01a63e2eb..2cc2c21a670 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h +++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h @@ -42,9 +42,9 @@ class TAO_IORInterceptor_Export TAO_IORInterceptor_Adapter_Impl public: virtual ~TAO_IORInterceptor_Adapter_Impl (void); - virtual void add_interceptor (PortableInterceptor::IORInterceptor_ptr interceptor - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void add_interceptor ( + PortableInterceptor::IORInterceptor_ptr interceptor + ACE_ENV_ARG_DECL); virtual void destroy_interceptors (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC (()); diff --git a/TAO/tao/IORInterceptor_Adapter.cpp b/TAO/tao/IORInterceptor_Adapter.cpp index ac2d3f7a4a7..87e2ca2971c 100644 --- a/TAO/tao/IORInterceptor_Adapter.cpp +++ b/TAO/tao/IORInterceptor_Adapter.cpp @@ -2,13 +2,11 @@ #include "tao/IORInterceptor_Adapter.h" -ACE_RCSID (tao, - IORInterceptor_Adapter, +ACE_RCSID (tao, + IORInterceptor_Adapter, "$Id$") TAO_IORInterceptor_Adapter::~TAO_IORInterceptor_Adapter (void) { } - - diff --git a/TAO/tao/IORInterceptor_Adapter.h b/TAO/tao/IORInterceptor_Adapter.h index 3516bc34c9b..c520fa455e7 100644 --- a/TAO/tao/IORInterceptor_Adapter.h +++ b/TAO/tao/IORInterceptor_Adapter.h @@ -15,7 +15,7 @@ #define TAO_IORINTERCEPTOR_ADAPTER_H #include /**/ "ace/pre.h" -#include "ace/Service_Object.h" + #include "ace/Array_Base.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) @@ -57,7 +57,7 @@ class TAO_Root_POA; * interfaces IORInfo and IORInterceptor. This is a base class for * the actual implementation in the TAO_IORInterceptor library. */ -class TAO_Export TAO_IORInterceptor_Adapter : public ACE_Service_Object +class TAO_Export TAO_IORInterceptor_Adapter { public: virtual ~TAO_IORInterceptor_Adapter (void); @@ -65,8 +65,7 @@ public: virtual void add_interceptor ( PortableInterceptor::IORInterceptor_ptr interceptor ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) = 0; + ) = 0; virtual void destroy_interceptors ( ACE_ENV_SINGLE_ARG_DECL diff --git a/TAO/tao/IORInterceptor_Adapter_Factory.cpp b/TAO/tao/IORInterceptor_Adapter_Factory.cpp index dc0687bb517..8e3e025bec4 100644 --- a/TAO/tao/IORInterceptor_Adapter_Factory.cpp +++ b/TAO/tao/IORInterceptor_Adapter_Factory.cpp @@ -1,23 +1,8 @@ // $Id$ #include "tao/IORInterceptor_Adapter_Factory.h" -#include "ace/Dynamic_Service.h" -ACE_RCSID (tao, - IORInterceptor_Adapter_Factory, +ACE_RCSID (tao, + IORInterceptor_Adapter_Factory, "$Id$") -TAO_IORInterceptor_Adapter_Factory::~TAO_IORInterceptor_Adapter_Factory (void) -{ -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_Dynamic_Service<TAO_IORInterceptor_Adapter_Factory>; - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_Dynamic_Service<TAO_IORInterceptor_Adapter_Factory> - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - diff --git a/TAO/tao/IORInterceptor_Adapter_Factory.h b/TAO/tao/IORInterceptor_Adapter_Factory.h index e56e7994296..cda36910626 100644 --- a/TAO/tao/IORInterceptor_Adapter_Factory.h +++ b/TAO/tao/IORInterceptor_Adapter_Factory.h @@ -38,8 +38,6 @@ class TAO_Export TAO_IORInterceptor_Adapter_Factory : public ACE_Service_Object { public: - virtual ~TAO_IORInterceptor_Adapter_Factory (void); - virtual TAO_IORInterceptor_Adapter * create ( ACE_ENV_SINGLE_ARG_DECL ) diff --git a/TAO/tao/Interceptor_List.cpp b/TAO/tao/Interceptor_List.cpp index 320edf4e01f..dacc3d47f51 100644 --- a/TAO/tao/Interceptor_List.cpp +++ b/TAO/tao/Interceptor_List.cpp @@ -20,12 +20,17 @@ namespace TAO } template <typename InterceptorType> - size_t - Interceptor_List<InterceptorType>::add_interceptor_i ( - PortableInterceptor::Interceptor_ptr interceptor - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableInterceptor::ORBInitInfo::DuplicateName)) + PortableInterceptor::Interceptor_ptr + Interceptor_List<InterceptorType>::interceptor (size_t index) + { + return this->interceptors_[index].in (); + } + + template <typename InterceptorType> + int + Interceptor_List<InterceptorType>::add_interceptor ( + InterceptorType_ptr_type interceptor + ACE_ENV_ARG_DECL) { if (!CORBA::is_nil (interceptor)) { @@ -67,9 +72,7 @@ namespace TAO if (ACE_OS::strcmp (existing_name.in (), name.in ()) == 0) { - ACE_THROW_RETURN - (PortableInterceptor::ORBInitInfo::DuplicateName (), - 0); + return -1; } } } @@ -78,7 +81,9 @@ namespace TAO /// Increase the length of the Interceptor sequence by one. const size_t new_len = old_len + 1; this->interceptors_.size (new_len); - return old_len; + + // Add the interceptor + this->interceptors_[old_len] = InterceptorType::_duplicate (interceptor); } else { @@ -93,26 +98,8 @@ namespace TAO 0 ); } - } - - template <typename InterceptorType> - PortableInterceptor::Interceptor_ptr - Interceptor_List<InterceptorType>::interceptor (size_t index) - { - return this->interceptors_[index].in (); - } - - template <typename InterceptorType> - void - Interceptor_List<InterceptorType>::add_interceptor ( - InterceptorType_ptr_type interceptor - ACE_ENV_ARG_DECL) - { - const size_t index = this->add_interceptor_i (interceptor - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - this->interceptors_[index] = InterceptorType::_duplicate (interceptor); + return 0; } template <typename InterceptorType> diff --git a/TAO/tao/Interceptor_List.h b/TAO/tao/Interceptor_List.h index 4b6679aea49..69e759aa96a 100644 --- a/TAO/tao/Interceptor_List.h +++ b/TAO/tao/Interceptor_List.h @@ -23,7 +23,6 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "ace/Array_Base.h" -#include "ORBInitInfoC.h" namespace PortableInterceptor { @@ -53,23 +52,20 @@ namespace TAO /// Constructor. Interceptor_List (void); - /// Register an interceptor. - void add_interceptor (InterceptorType_ptr_type i - ACE_ENV_ARG_DECL); + /** + * Register an interceptor. + * @retval 0 Interceptor added without problems + * @retval -1 Interceptor not added because of a duplicate name + */ + int add_interceptor ( + InterceptorType_ptr_type i + ACE_ENV_ARG_DECL); /// Return reference to the underlying Portable Interceptor array. TYPE & interceptors (void); protected: - /// Register an in interceptor with interceptor list. - size_t add_interceptor_i ( - PortableInterceptor::Interceptor_ptr interceptor - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableInterceptor::ORBInitInfo::DuplicateName)); - /// Return the interceptor in sequence element @a index. PortableInterceptor::Interceptor_ptr interceptor (size_t index); diff --git a/TAO/tao/Messaging/Messaging_ORBInitializer.h b/TAO/tao/Messaging/Messaging_ORBInitializer.h index 371356c65ec..f16a1495ebe 100644 --- a/TAO/tao/Messaging/Messaging_ORBInitializer.h +++ b/TAO/tao/Messaging/Messaging_ORBInitializer.h @@ -22,7 +22,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/PortableInterceptorC.h" +#include "tao/PI/PI.h" #include "tao/LocalObject.h" // This is to remove "inherits via dominance" warnings from MSVC. diff --git a/TAO/tao/Messaging/Messaging_PolicyFactory.h b/TAO/tao/Messaging/Messaging_PolicyFactory.h index 174bea8630b..286acf3d7dc 100644 --- a/TAO/tao/Messaging/Messaging_PolicyFactory.h +++ b/TAO/tao/Messaging/Messaging_PolicyFactory.h @@ -23,7 +23,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/PortableInterceptorC.h" +#include "tao/PI/PI.h" #include "tao/LocalObject.h" // This is to remove "inherits via dominance" warnings from MSVC. diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index b1f6345384d..ec63288652e 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -16,8 +16,8 @@ ACE_RCSID (tao, #include "Dynamic_Adapter.h" #include "Profile.h" #include "default_ports.h" -#include "ORBInitInfo.h" -#include "ORBInitializer_Registry.h" +#include "ORBInitializer_Registry_Adapter.h" +#include "PolicyFactory_Registry_Adapter.h" #include "TAO_Singleton_Manager.h" #include "Policy_Current.h" #include "Policy_Manager.h" @@ -1575,29 +1575,22 @@ CORBA::ORB_init (int &argc, CORBA::ORB::_nil ()); } - // Run the registered ORB initializers, and initialize the ORB_Core. - TAO_ORBInitInfo * orb_init_info_temp = 0; - ACE_NEW_THROW_EX (orb_init_info_temp, - TAO_ORBInitInfo (oc.get (), - command_line.get_argc(), - command_line.get_ASCII_argv()), - CORBA::NO_MEMORY ( - CORBA::SystemException::_tao_minor_code ( - 0, - ENOMEM), - CORBA::COMPLETED_NO)); - ACE_CHECK_RETURN (CORBA::ORB::_nil ()); - // This ORBInitInfo instance is only valid for the duration of this - // ORB's initialization. - PortableInterceptor::ORBInitInfo_var orb_init_info = - orb_init_info_temp; + TAO::ORBInitializer_Registry_Adapter *orbinitializer_registry = + oc.get ()->get_orbinitializer_registry (); - // Call the ORBInitializer::pre_init() on each registered ORB - // initializer. - TAO::ORBInitializer_Registry::instance ()->pre_init (orb_init_info.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (CORBA::ORB::_nil ()); + PortableInterceptor::SlotId slotid = 0; + + if (orbinitializer_registry != 0) + { + + orbinitializer_registry->pre_init (oc.get (), + command_line.get_argc(), + command_line.get_ASCII_argv(), + slotid + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (CORBA::ORB::_nil ()); + } // Initialize the ORB Core instance. result = oc->init (command_line.get_argc(), @@ -1605,32 +1598,23 @@ CORBA::ORB_init (int &argc, ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (CORBA::ORB::_nil ()); - // Check for errors and return nil pseudo-reference on error. - if (result == -1) - ACE_THROW_RETURN (CORBA::BAD_PARAM ( - CORBA::SystemException::_tao_minor_code ( - 0, - EINVAL), - CORBA::COMPLETED_NO), - CORBA::ORB::_nil ()); + if (orbinitializer_registry != 0) + { - // Call the ORBInitializer::post_init() on each registered ORB - // initializer. - TAO::ORBInitializer_Registry::instance ()->post_init (orb_init_info.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (CORBA::ORB::_nil ()); + orbinitializer_registry->post_init (oc.get (), + command_line.get_argc(), + command_line.get_ASCII_argv(), + slotid + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (CORBA::ORB::_nil ()); #if TAO_HAS_INTERCEPTORS == 1 - TAO::PICurrent *pi = oc->pi_current (); + TAO::PICurrent *pi = oc->pi_current (); - if (pi != 0) - pi->initialize (orb_init_info_temp->slot_count ()); + if (pi != 0) + pi->initialize (slotid); #endif /* TAO_HAS_INTERCEPTORS == 1 */ - - // Invalidate the ORBInitInfo instance to prevent future - // modifications to the ORB. This behavior complies with the - // PortableInterceptor specification. - orb_init_info_temp->invalidate (); + } if (TAO_debug_level > 2) { @@ -1851,12 +1835,20 @@ CORBA::ORB::create_policy (CORBA::PolicyType type, this->check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (CORBA::Policy::_nil ()); + TAO::PolicyFactory_Registry_Adapter *adapter = + this->orb_core_->policy_factory_registry (); + + if (adapter == 0) + { + ACE_THROW_RETURN (CORBA::INTERNAL (), + CORBA::Policy::_nil ()); + } + // Attempt to obtain the policy from the policy factory registry. - return - this->orb_core_->policy_factory_registry ()->create_policy ( - type, - val - ACE_ENV_ARG_PARAMETER); + return adapter->create_policy ( + type, + val + ACE_ENV_ARG_PARAMETER); } CORBA::Policy_ptr @@ -1866,11 +1858,19 @@ CORBA::ORB::_create_policy (CORBA::PolicyType type this->check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (CORBA::Policy::_nil ()); + TAO::PolicyFactory_Registry_Adapter *adapter = + this->orb_core_->policy_factory_registry (); + + if (adapter == 0) + { + ACE_THROW_RETURN (CORBA::INTERNAL (), + CORBA::Policy::_nil ()); + } + // Attempt to obtain the policy from the policy factory registry. - return - this->orb_core_->policy_factory_registry ()->_create_policy ( - type - ACE_ENV_ARG_PARAMETER); + return adapter->_create_policy ( + type + ACE_ENV_ARG_PARAMETER); } // Destringify OMG-specified "IOR" string. diff --git a/TAO/tao/ORBInitializer_Registry.cpp b/TAO/tao/ORBInitializer_Registry.cpp index 7a9bb00e595..09b7bea4332 100644 --- a/TAO/tao/ORBInitializer_Registry.cpp +++ b/TAO/tao/ORBInitializer_Registry.cpp @@ -1,11 +1,13 @@ #include "ORBInitializer_Registry.h" +#include "ORBInitializer_Registry_Adapter.h" #include "PortableInterceptorC.h" #include "ORB.h" -#include "TAO_Singleton.h" #include "ORB_Constants.h" #include "TAO_Singleton_Manager.h" #include "SystemException.h" +#include "ace/Service_Config.h" +#include "ace/Dynamic_Service.h" #include "ace/Static_Object_Lock.h" #include "ace/Recursive_Thread_Mutex.h" #include "ace/Log_Msg.h" @@ -42,106 +44,37 @@ PortableInterceptor::register_orb_initializer ( ACE_CHECK; } - // Make sure the following is done after the global ORB - // initialization since we need to have exceptions initialized. + // If not, lookup it up. + TAO::ORBInitializer_Registry_Adapter *orbinitializer_registry_ = + ACE_Dynamic_Service<TAO::ORBInitializer_Registry_Adapter>::instance + ("ORBInitializer_Registry"); - TAO::ORBInitializer_Registry::instance ()->register_orb_initializer ( - init - ACE_ENV_ARG_PARAMETER); -} - -// ------------------------------------------------------------------ - -TAO::ORBInitializer_Registry::ORBInitializer_Registry (void) - : lock_ (), - initializers_ () -{ -} - -void -TAO::ORBInitializer_Registry::register_orb_initializer ( - PortableInterceptor::ORBInitializer_ptr init - ACE_ENV_ARG_DECL) -{ - if (!CORBA::is_nil (init)) + if (orbinitializer_registry_ == 0) { - ACE_GUARD (TAO_SYNCH_MUTEX, - guard, - this->lock_); - - // Increase the length of the ORBInitializer array by one. - size_t const cur_len = this->initializers_.size (); - size_t const new_len = cur_len + 1; - if (this->initializers_.size (new_len) != 0) - ACE_THROW (CORBA::INTERNAL ()); - - // Add the given ORBInitializer to the sequence. - this->initializers_[cur_len] = - PortableInterceptor::ORBInitializer::_duplicate (init); + ACE_Service_Config::process_directive ( + ACE_TEXT_CHAR_TO_TCHAR ( + "dynamic ORBInitializer_Registry Service_Object * TAO_PI:_make_ORBInitializer_Registry()")); + orbinitializer_registry_ = + ACE_Dynamic_Service<TAO::ORBInitializer_Registry_Adapter>::instance + ("ORBInitializer_Registry"); } - else - ACE_THROW (CORBA::INV_OBJREF ( - CORBA::SystemException::_tao_minor_code ( - 0, - EINVAL), - CORBA::COMPLETED_NO)); -} - -void -TAO::ORBInitializer_Registry::pre_init ( - PortableInterceptor::ORBInitInfo_ptr info - ACE_ENV_ARG_DECL) -{ - ACE_GUARD (TAO_SYNCH_MUTEX, - guard, - this->lock_); - size_t const initializer_count (this->initializers_.size ()); - for (size_t i = 0; i < initializer_count; ++i) + if (orbinitializer_registry_ != 0) { - this->initializers_[i]->pre_init (info - ACE_ENV_ARG_PARAMETER); + orbinitializer_registry_->register_orb_initializer ( + init + ACE_ENV_ARG_PARAMETER); ACE_CHECK; } -} - -void -TAO::ORBInitializer_Registry::post_init ( - PortableInterceptor::ORBInitInfo_ptr info - ACE_ENV_ARG_DECL) -{ - ACE_GUARD (TAO_SYNCH_MUTEX, - guard, - this->lock_); - - size_t const initializer_count (this->initializers_.size ()); - for (size_t i = 0; i < initializer_count; ++i) + else { - this->initializers_[i]->post_init (info - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } -} + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("ERROR: ORBInitializer Registry unable to find the ") + ACE_TEXT ("ORBInitializer Registry instance"))); -TAO::ORBInitializer_Registry * -TAO::ORBInitializer_Registry::instance (void) -{ - return - TAO_Singleton<TAO::ORBInitializer_Registry, TAO_SYNCH_MUTEX>::instance (); + ACE_THROW (CORBA::INTERNAL ()); + } } -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class TAO_Singleton<TAO::ORBInitializer_Registry, TAO_SYNCH_MUTEX>; -template class ACE_Array_Base<PortableInterceptor::ORBInitializer_var>; - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate TAO_Singleton<TAO::ORBInitializer_Registry, TAO_SYNCH_MUTEX> -#pragma instantiate ACE_Array_Base<PortableInterceptor::ORBInitializer_var> - -#elif defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION) - -template TAO_Singleton<TAO::ORBInitializer_Registry, TAO_SYNCH_MUTEX> * TAO_Singleton<TAO::ORBInitializer_Registry, TAO_SYNCH_MUTEX>::singleton_; -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/ORBInitializer_Registry.h b/TAO/tao/ORBInitializer_Registry.h index 58b4c1f8376..0169e5df76b 100644 --- a/TAO/tao/ORBInitializer_Registry.h +++ b/TAO/tao/ORBInitializer_Registry.h @@ -14,33 +14,22 @@ #define TAO_ORB_INITIALIZER_REGISTRY_H #include /**/ "ace/pre.h" -#include "ace/Array_Base.h" + +#include "TAO_Export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "CORBA_methods.h" -#include "Objref_VarOut_T.h" +#include "ace/CORBA_macros.h" #include "Environment.h" #include "default_environment.h" -#include "ace/Thread_Mutex.h" - namespace PortableInterceptor { class ORBInitializer; typedef ORBInitializer *ORBInitializer_ptr; - typedef - TAO_Objref_Var_T< - ORBInitializer - > - ORBInitializer_var; - - class ORBInitInfo; - typedef ORBInitInfo *ORBInitInfo_ptr; - /// Register an ORBInitializer with the global ORBInitializer /// table. TAO_Export void register_orb_initializer ( @@ -49,91 +38,6 @@ namespace PortableInterceptor ); } -namespace TAO -{ - /** - * @class ORBInitializer_Registry - * - * @brief Global list that contains all portable interceptor ORB - * initializers. - * - * @note This class should be instantiated via its instance() - * method. Normally this would be enforced by making the - * constructor protected but that forces a friend declaration - * containing a template type (TAO_Singleton) with a static - * member to be introduced. In turn, this potentially - * introduces problems in MS Windows DLL environments due to - * the occurance of multiple singleton instances. There - * should only be one! - */ - class ORBInitializer_Registry - { -#if defined (ACE_LYNXOS_MAJOR) && (ACE_LYNXOS_MAJOR < 4) - // Workaround for g++ (version 2.9-gnupro-98r2) on LynxOS 3.x which has - // problems with friend declarations in namespaces - friend void register_orb_initializer ( - PortableInterceptor::ORBInitializer_ptr init - ACE_ENV_ARG_DECL); - - friend CORBA::ORB_ptr ORB_init (int &, - char *argv[], - const char *, - CORBA::Environment &); -#else - friend void PortableInterceptor::register_orb_initializer ( - PortableInterceptor::ORBInitializer_ptr init - ACE_ENV_ARG_DECL); - - friend CORBA::ORB_ptr CORBA::ORB_init (int &, - char *argv[], - const char *, - CORBA::Environment &); -#endif /* (ACE_LYNXOS_MAJOR) && (ACE_LYNXOS_MAJOR < 4) */ - - public: - - /// Only allow this class to be instantiated as a singleton - /// instance, so declare the constructor as protected. - /** - * @note See the note in the class description for an explanation of - * why this constructor is not protected. - */ - ORBInitializer_Registry (void); - - protected: - - /// Register an ORBInitializer with the underlying ORBInitializer - /// array. - void register_orb_initializer (PortableInterceptor::ORBInitializer_ptr init - ACE_ENV_ARG_DECL); - - /// Begin initialization of all registered ORBInitializers before - /// the ORB itself is initialized. - void pre_init (PortableInterceptor::ORBInitInfo_ptr info - ACE_ENV_ARG_DECL); - - /// Complete initialization of all registered ORBInitializers after - /// the ORB has been initialized. - void post_init (PortableInterceptor::ORBInitInfo_ptr info - ACE_ENV_ARG_DECL); - - /// Return a unique singleton instance. - static ORBInitializer_Registry * instance (void); - - private: - // Prevent copying - ORBInitializer_Registry (const ORBInitializer_Registry &); - void operator= (const ORBInitializer_Registry &); - - private: - - TAO_SYNCH_MUTEX lock_; - - /// Dynamic array containing registered ORBInitializers. - ACE_Array_Base<PortableInterceptor::ORBInitializer_var> initializers_; - }; -} - #include /**/ "ace/post.h" #endif /* TAO_ORB_INITIALIZER_REGISTRY_H */ diff --git a/TAO/tao/ORBInitializer_Registry_Adapter.h b/TAO/tao/ORBInitializer_Registry_Adapter.h new file mode 100644 index 00000000000..9caff73ccc2 --- /dev/null +++ b/TAO/tao/ORBInitializer_Registry_Adapter.h @@ -0,0 +1,75 @@ +// -*- C++ -*- + +// =================================================================== +/** + * @file ORBInitializer_Registry_Adapter.h + * + * $Id$ + * + * @author Johnny Willemsen <jwillemsen@remedy.nl> + */ +// =================================================================== + +#ifndef TAO_ORB_INITIALIZER_REGISTRY_ADAPTER_H +#define TAO_ORB_INITIALIZER_REGISTRY_ADAPTER_H + +#include /**/ "ace/pre.h" + +#include "ace/Service_Object.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/CORBA_macros.h" + +namespace PortableInterceptor +{ + class ORBInitializer; + typedef ORBInitializer *ORBInitializer_ptr; + + typedef CORBA::ULong SlotId; +} + +namespace TAO +{ + /** + * @class ORBInitializer_Registry_Adapter + * + * Class that offers an interface to the ORB to load and manipulate + * ORBInitializer_Registry + */ + class ORBInitializer_Registry_Adapter + : public ACE_Service_Object + { + public: + /// Register an ORBInitializer with the underlying ORBInitializer + /// array. + virtual void register_orb_initializer ( + PortableInterceptor::ORBInitializer_ptr init + ACE_ENV_ARG_DECL) = 0; + + /// Begin initialization of all registered ORBInitializers before + /// the ORB itself is initialized. + virtual void pre_init ( + TAO_ORB_Core *orb_core, + int argc, + char *argv[], + PortableInterceptor::SlotId &slotid + ACE_ENV_ARG_DECL) = 0; + + /// Complete initialization of all registered ORBInitializers after + /// the ORB has been initialized. Returns the number of slots + /// allocated + virtual void post_init ( + TAO_ORB_Core *orb_core, + int argc, + char *argv[], + PortableInterceptor::SlotId &slotid + ACE_ENV_ARG_DECL) = 0; + }; +} + +#include /**/ "ace/post.h" + +#endif /* TAO_ORB_INITIALIZER_REGISTRY_ADAPTER_H */ diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index b5fa5dcccf8..2250683f4f1 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -31,6 +31,9 @@ #include "Adapter_Factory.h" #include "Adapter.h" #include "GUIResource_Factory.h" +#include "PolicyFactory_Registry_Adapter.h" +#include "PolicyFactory_Registry_Factory.h" +#include "ORBInitializer_Registry_Adapter.h" #if (TAO_HAS_CORBA_MESSAGING == 1) #include "Policy_Manager.h" @@ -183,7 +186,8 @@ TAO_ORB_Core::TAO_ORB_Core (const char *orbid) #endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */ transport_sync_strategy_ (0), refcount_ (1), - policy_factory_registry_ (), + policy_factory_registry_ (0), + orbinitializer_registry_ (0), #if (TAO_HAS_INTERCEPTORS == 1) pi_current_ (0), client_request_interceptors_ (), @@ -255,6 +259,11 @@ TAO_ORB_Core::~TAO_ORB_Core (void) delete this->request_dispatcher_; + delete this->policy_factory_registry_; + + // Don't delete, is a process wide singleton shared by all orbs + orbinitializer_registry_ = 0; + CORBA::release (this->orb_); } @@ -1401,6 +1410,57 @@ TAO_ORB_Core::collocation_resolver (void) return *this->collocation_resolver_; } +TAO::PolicyFactory_Registry_Adapter * +TAO_ORB_Core::policy_factory_registry_i (void) +{ + + TAO_PolicyFactory_Registry_Factory *loader = + ACE_Dynamic_Service<TAO_PolicyFactory_Registry_Factory>::instance ( + "PolicyFactory_Loader"); + if (loader == 0) + { + ACE_Service_Config::process_directive ( + ACE_TEXT("dynamic TAO_PolicyFactory_Registry_Factory Service_Object *") + ACE_TEXT("TAO_PI:_make_PolicyFactory_Loader()")); + loader = + ACE_Dynamic_Service<TAO_PolicyFactory_Registry_Factory>::instance ( + "PolicyFactory_Loader"); + if (loader == 0) + ACE_THROW (CORBA::INTERNAL ()); + } + this->policy_factory_registry_ = + loader->create (); + + return this->policy_factory_registry_; +} + +TAO::ORBInitializer_Registry_Adapter * +TAO_ORB_Core::get_orbinitializer_registry (void) +{ + return this->orbinitializer_registry_; +} + +TAO::ORBInitializer_Registry_Adapter * +TAO_ORB_Core::orbinitializer_registry_i (void) +{ + // If not, lookup it up. + this->orbinitializer_registry_ = + ACE_Dynamic_Service<TAO::ORBInitializer_Registry_Adapter>::instance + ("ORBInitializer_Registry"); + + if (orbinitializer_registry_ == 0) + { + ACE_Service_Config::process_directive ( + ACE_TEXT_CHAR_TO_TCHAR ( + "dynamic ORBInitializer_Registry Service_Object * TAO_PI:_make_ORBInitializer_Registry()")); + orbinitializer_registry_ = + ACE_Dynamic_Service<TAO::ORBInitializer_Registry_Adapter>::instance + ("ORBInitializer_Registry"); + } + + return this->orbinitializer_registry_; +} + TAO_Stub_Factory * TAO_ORB_Core::stub_factory (void) { diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h index bd191d6da98..99c73713fcb 100644 --- a/TAO/tao/ORB_Core.h +++ b/TAO/tao/ORB_Core.h @@ -25,9 +25,7 @@ #include "tao/Collocation_Strategy.h" #include "tao/params.h" #include "tao/ORB_Constants.h" -#include "tao/PolicyFactory_Registry.h" #include "tao/Parser_Registry.h" -#include "tao/ORBInitializer_Registry.h" #include "tao/Service_Callbacks.h" #include "tao/Fault_Tolerance_Service.h" #include "tao/Cleanup_Func_Registry.h" @@ -58,6 +56,8 @@ namespace TAO ServerRequestInterceptor_List; } +class TAO_ClientRequestInfo; + #endif /* TAO_HAS_INTERCEPTORS == 1 */ #include "ace/Thread_Manager.h" @@ -112,17 +112,15 @@ class TAO_Delayed_Buffering_Sync_Strategy; #endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */ -#if TAO_HAS_INTERCEPTORS == 1 -class TAO_ClientRequestInfo; -#endif /* TAO_HAS_INTERCEPTORS == 1 */ - - class TAO_Transport_Sync_Strategy; class TAO_Sync_Strategy; class TAO_Policy_Validator; + namespace TAO { class GUIResource_Factory; + class PolicyFactory_Registry_Adapter; + class ORBInitializer_Registry_Adapter; } namespace CORBA @@ -268,7 +266,16 @@ public: /// Return pointer to the policy factory registry associated with /// this ORB core. - TAO_PolicyFactory_Registry *policy_factory_registry (void); + TAO::PolicyFactory_Registry_Adapter *policy_factory_registry (void); + + /// Return pointer to the orb initializer registry associated with + /// this ORB core. Tries to load the PI library if it is not loaded + /// yet + TAO::ORBInitializer_Registry_Adapter *orbinitializer_registry (void); + + /// Return pointer to the orb initializer registry associated with + /// this ORB core. Doesn't load the PI library when it is not loaded yet + TAO::ORBInitializer_Registry_Adapter *get_orbinitializer_registry (void); /// Get the protocol factories TAO_ProtocolFactorySet *protocol_factories (void); @@ -311,7 +318,7 @@ public: * No-Collocation is a special case of collocation. */ static -TAO::Collocation_Strategy collocation_strategy (CORBA::Object_ptr object + TAO::Collocation_Strategy collocation_strategy (CORBA::Object_ptr object ACE_ENV_ARG_DECL); //@} @@ -903,12 +910,12 @@ TAO::Collocation_Strategy collocation_strategy (CORBA::Object_ptr object void pi_current (TAO::PICurrent *current); /// Register a client request interceptor. - void add_interceptor ( + int add_interceptor ( PortableInterceptor::ClientRequestInterceptor_ptr interceptor ACE_ENV_ARG_DECL); /// Register a server request interceptor. - void add_interceptor ( + int add_interceptor ( PortableInterceptor::ServerRequestInterceptor_ptr interceptor ACE_ENV_ARG_DECL); @@ -1054,6 +1061,14 @@ protected: const ACE_CString &endpoints ACE_ENV_ARG_DECL); + /// Return pointer to the policy factory registry associated with + /// this ORB core. + TAO::PolicyFactory_Registry_Adapter *policy_factory_registry_i (void); + + /// Return pointer to the orb initializer registry associated with + /// this ORB core. + TAO::ORBInitializer_Registry_Adapter *orbinitializer_registry_i (void); + private: /// The ORB Core should not be copied. @@ -1258,7 +1273,10 @@ protected: CORBA::ULong refcount_; /// Registry containing all registered policy factories. - TAO_PolicyFactory_Registry policy_factory_registry_; + TAO::PolicyFactory_Registry_Adapter *policy_factory_registry_; + + /// Registry containing all orb initializers + TAO::ORBInitializer_Registry_Adapter *orbinitializer_registry_; #if (TAO_HAS_INTERCEPTORS == 1) /// Cached pointer/reference to the PICurrent object. diff --git a/TAO/tao/ORB_Core.i b/TAO/tao/ORB_Core.i index ab4ce4594e9..48883d2acb8 100644 --- a/TAO/tao/ORB_Core.i +++ b/TAO/tao/ORB_Core.i @@ -236,13 +236,6 @@ TAO_ORB_Core::parser_registry (void) return &this->parser_registry_; } -ACE_INLINE TAO_PolicyFactory_Registry * -TAO_ORB_Core::policy_factory_registry (void) -{ - return &this->policy_factory_registry_; -} - - ACE_INLINE TAO_Codeset_Manager * TAO_ORB_Core::codeset_manager() { @@ -414,6 +407,30 @@ TAO_ORB_Core::server_id (void) const return this->server_id_.c_str(); } +ACE_INLINE TAO::ORBInitializer_Registry_Adapter * +TAO_ORB_Core::orbinitializer_registry () +{ + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_, + 0); + if (orbinitializer_registry_ == 0) + { + return this->orbinitializer_registry_i (); + } + return this->orbinitializer_registry_; +} + +ACE_INLINE TAO::PolicyFactory_Registry_Adapter * +TAO_ORB_Core::policy_factory_registry () +{ + ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_, + 0); + if (policy_factory_registry_ == 0) + { + return this->policy_factory_registry_i (); + } + return this->policy_factory_registry_; +} + ACE_INLINE CORBA::Object_ptr TAO_ORB_Core::resolve_dynanyfactory (ACE_ENV_SINGLE_ARG_DECL) { @@ -571,22 +588,22 @@ TAO_ORB_Core::pi_current (TAO::PICurrent *current) this->pi_current_ = current; } -ACE_INLINE void +ACE_INLINE int TAO_ORB_Core::add_interceptor ( PortableInterceptor::ClientRequestInterceptor_ptr interceptor ACE_ENV_ARG_DECL) { - this->client_request_interceptors_.add_interceptor (interceptor - ACE_ENV_ARG_PARAMETER); + return this->client_request_interceptors_.add_interceptor (interceptor + ACE_ENV_ARG_PARAMETER); } -ACE_INLINE void +ACE_INLINE int TAO_ORB_Core::add_interceptor ( PortableInterceptor::ServerRequestInterceptor_ptr interceptor ACE_ENV_ARG_DECL) { - this->server_request_interceptors_.add_interceptor (interceptor - ACE_ENV_ARG_PARAMETER); + return this->server_request_interceptors_.add_interceptor (interceptor + ACE_ENV_ARG_PARAMETER); } // ------ diff --git a/TAO/tao/PI.mpc b/TAO/tao/PI.mpc new file mode 100644 index 00000000000..dc0a96dbb96 --- /dev/null +++ b/TAO/tao/PI.mpc @@ -0,0 +1,32 @@ +//$Id$ +project : taolib, codecfactory, core { + sharedname = TAO_PI + dynamicflags = TAO_PI_BUILD_DLL + + Source_Files { + PI + } + + Header_Files { + PI + } + + Inline_Files { + PI + } + + Template_Files { + PI + } + + Resource_Files { + PI + } + + PIDL_Files { + PI + } + + Pkgconfig_Files { + } +} diff --git a/TAO/tao/ORBInitInfo.cpp b/TAO/tao/PI/ORBInitInfo.cpp index 91ac3f57e7d..ca98c7e77b0 100644 --- a/TAO/tao/ORBInitInfo.cpp +++ b/TAO/tao/PI/ORBInitInfo.cpp @@ -1,16 +1,17 @@ // $Id$ #include "ORBInitInfo.h" -#include "ORB_Core.h" -#include "ORB.h" -#include "SystemException.h" -#include "Object_Loader.h" +#include "tao/ORB_Core.h" +#include "tao/ORB.h" +#include "tao/SystemException.h" +#include "tao/Object_Loader.h" +#include "tao/PolicyFactory_Registry_Adapter.h" #include "ace/Dynamic_Service.h" #include "ace/Service_Config.h" #if TAO_HAS_INTERCEPTORS == 1 -#include "PICurrent.h" +#include "tao/PICurrent.h" #endif /* TAO_HAS_INTERCEPTORS == 1 */ ACE_RCSID (TAO, @@ -57,13 +58,14 @@ TAO::Objref_Traits<TAO_ORBInitInfo>::marshal ( } TAO_ORBInitInfo::TAO_ORBInitInfo (TAO_ORB_Core *orb_core, - int argc , - char *argv[]) + int argc, + char *argv[], + PortableInterceptor::SlotId slotid) : orb_core_ (orb_core), argc_ (argc), argv_ (argv), codec_factory_ (), - slot_count_ (0) + slot_count_ (slotid) { } @@ -197,8 +199,13 @@ TAO_ORBInitInfo::add_client_request_interceptor ( this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - this->orb_core_->add_interceptor (interceptor - ACE_ENV_ARG_PARAMETER); + int retval = this->orb_core_->add_interceptor (interceptor + ACE_ENV_ARG_PARAMETER); + + if (retval == -1) + { + ACE_THROW (PortableInterceptor::ORBInitInfo::DuplicateName ()); + } #else ACE_UNUSED_ARG (interceptor); ACE_THROW (CORBA::NO_IMPLEMENT ( @@ -220,8 +227,13 @@ TAO_ORBInitInfo::add_server_request_interceptor ( this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - this->orb_core_->add_interceptor (interceptor - ACE_ENV_ARG_PARAMETER); + int retval = this->orb_core_->add_interceptor (interceptor + ACE_ENV_ARG_PARAMETER); + + if (retval == -1) + { + ACE_THROW (PortableInterceptor::ORBInitInfo::DuplicateName ()); + } #else ACE_UNUSED_ARG (interceptor); @@ -278,9 +290,14 @@ TAO_ORBInitInfo::register_policy_factory ( this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - TAO_PolicyFactory_Registry *registry = + TAO::PolicyFactory_Registry_Adapter *registry = this->orb_core_->policy_factory_registry (); + if (registry == 0) + { + ACE_THROW (CORBA::INTERNAL ()); + } + registry->register_policy_factory (type, policy_factory ACE_ENV_ARG_PARAMETER); @@ -326,6 +343,15 @@ TAO_ORBInitInfo::check_validity (ACE_ENV_SINGLE_ARG_DECL) } } +CORBA::ORB_ptr +TAO_ORBInitInfo::_get_orb (ACE_ENV_SINGLE_ARG_DECL) +{ + this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (CORBA::ORB::_nil ()); + + return CORBA::ORB::_duplicate (this->orb_core_->orb ()); +} + TAO_ORBInitInfo_ptr TAO_ORBInitInfo::_narrow ( CORBA::Object_ptr _tao_objref ACE_ENV_ARG_DECL_NOT_USED diff --git a/TAO/tao/ORBInitInfo.h b/TAO/tao/PI/ORBInitInfo.h index 01a7385f4e0..f83238f0305 100644 --- a/TAO/tao/ORBInitInfo.h +++ b/TAO/tao/PI/ORBInitInfo.h @@ -15,13 +15,14 @@ #include /**/ "ace/pre.h" -#include "ORBInitInfoC.h" +#include "pi_export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "LocalObject.h" +#include "ORBInitInfoC.h" +#include "tao/LocalObject.h" // This is to remove "inherits via dominance" warnings from MSVC. // MSVC is being a little too paranoid. @@ -53,7 +54,7 @@ typedef TAO_Objref_Out_T<TAO_ORBInitInfo> * This class encapsulates the data passed to ORBInitializers during * ORB initialization. */ -class TAO_Export TAO_ORBInitInfo +class TAO_PI_Export TAO_ORBInitInfo : public virtual PortableInterceptor::ORBInitInfo, public virtual TAO_Local_RefCounted_Object { @@ -62,7 +63,8 @@ public: /// Constructor. TAO_ORBInitInfo (TAO_ORB_Core *orb_core, int argc, - char *argv[]); + char *argv[], + PortableInterceptor::SlotId slotid); /** * @name PortableInterceptor::ORBInitInfo Methods @@ -151,6 +153,10 @@ public: PortableInterceptor::PolicyFactory_ptr policy_factory ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual CORBA::ORB_ptr _get_orb ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); //@} /** @@ -271,7 +277,7 @@ namespace TAO { // Hand crafted. Not forward declared, but used by PortableServer. template<> - struct TAO_Export Objref_Traits<TAO_ORBInitInfo> + struct TAO_PI_Export Objref_Traits<TAO_ORBInitInfo> { static TAO_ORBInitInfo_ptr duplicate ( TAO_ORBInitInfo_ptr diff --git a/TAO/tao/ORBInitInfo.inl b/TAO/tao/PI/ORBInitInfo.inl index bb8d32ed135..bb8d32ed135 100644 --- a/TAO/tao/ORBInitInfo.inl +++ b/TAO/tao/PI/ORBInitInfo.inl diff --git a/TAO/tao/ORBInitInfo.pidl b/TAO/tao/PI/ORBInitInfo.pidl index 58281e6fa0d..71669226eaf 100644 --- a/TAO/tao/ORBInitInfo.pidl +++ b/TAO/tao/PI/ORBInitInfo.pidl @@ -23,7 +23,7 @@ #define _ORBINITINFO_PIDL_ #include <StringSeq.pidl> -#include <IOP_Codec.pidl> +#include <tao/CodecFactory/IOP_Codec_include.pidl> #include <PI_Forward.pidl> #include <Policy.pidl> diff --git a/TAO/tao/ORBInitInfoA.cpp b/TAO/tao/PI/ORBInitInfoA.cpp index 76a41ed6f19..b34d847976d 100644 --- a/TAO/tao/ORBInitInfoA.cpp +++ b/TAO/tao/PI/ORBInitInfoA.cpp @@ -39,7 +39,7 @@ #include "tao/Any_Dual_Impl_T.h" // TAO_IDL - Generated from -// be/be_visitor_typecode/alias_typecode.cpp:31 +// be\be_visitor_typecode/alias_typecode.cpp:31 static TAO::TypeCode::Alias<char const *, CORBA::TypeCode_ptr const *, @@ -54,7 +54,7 @@ static TAO::TypeCode::Alias<char const *, &_tao_tc_PortableInterceptor_ORBInitInfo_ObjectId; // TAO_IDL - Generated from -// be/be_visitor_typecode/struct_typecode.cpp:74 +// be\be_visitor_typecode/struct_typecode.cpp:87 static TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const _tao_fields_PortableInterceptor_ORBInitInfo_DuplicateName[] = { @@ -62,10 +62,9 @@ static TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> co }; static TAO::TypeCode::Struct<char const *, - CORBA::TypeCode_ptr const *, - TAO::TypeCode::Struct_Field<char const *, - CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy> + CORBA::TypeCode_ptr const *, + TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *, + TAO::Null_RefCount_Policy> _tao_tc_PortableInterceptor_ORBInitInfo_DuplicateName ( CORBA::tk_except, "IDL:omg.org/PortableInterceptor/ORBInitInfo/DuplicateName:1.0", @@ -77,14 +76,13 @@ static TAO::TypeCode::Struct<char const *, &_tao_tc_PortableInterceptor_ORBInitInfo_DuplicateName; // TAO_IDL - Generated from -// be/be_visitor_typecode/struct_typecode.cpp:74 +// be\be_visitor_typecode/struct_typecode.cpp:87 static TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const * const _tao_fields_PortableInterceptor_ORBInitInfo_InvalidName = 0; static TAO::TypeCode::Struct<char const *, - CORBA::TypeCode_ptr const *, - TAO::TypeCode::Struct_Field<char const *, - CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy> + CORBA::TypeCode_ptr const *, + TAO::TypeCode::Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *, + TAO::Null_RefCount_Policy> _tao_tc_PortableInterceptor_ORBInitInfo_InvalidName ( CORBA::tk_except, "IDL:omg.org/PortableInterceptor/ORBInitInfo/InvalidName:1.0", @@ -96,7 +94,7 @@ static TAO::TypeCode::Struct<char const *, &_tao_tc_PortableInterceptor_ORBInitInfo_InvalidName; // TAO_IDL - Generated from -// be/be_visitor_typecode/objref_typecode.cpp:76 +// be\be_visitor_typecode/objref_typecode.cpp:76 static TAO::TypeCode::Objref<char const *, TAO::Null_RefCount_Policy> @@ -114,7 +112,7 @@ namespace PortableInterceptor // TAO_IDL - Generated from -// be/be_visitor_interface/any_op_cs.cpp:50 +// be\be_visitor_interface/any_op_cs.cpp:50 namespace TAO { @@ -189,7 +187,7 @@ operator>>= ( } // TAO_IDL - Generated from -// be/be_visitor_exception/any_op_cs.cpp:50 +// be\be_visitor_exception/any_op_cs.cpp:50 namespace TAO { @@ -264,7 +262,7 @@ CORBA::Boolean operator>>= ( } // TAO_IDL - Generated from -// be/be_visitor_exception/any_op_cs.cpp:50 +// be\be_visitor_exception/any_op_cs.cpp:50 namespace TAO { diff --git a/TAO/tao/ORBInitInfoC.cpp b/TAO/tao/PI/ORBInitInfoC.cpp index c110e5d0220..aba249452c2 100644 --- a/TAO/tao/ORBInitInfoC.cpp +++ b/TAO/tao/PI/ORBInitInfoC.cpp @@ -26,7 +26,7 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html // TAO_IDL - Generated from -// .\be\be_codegen.cpp:291 +// be\be_codegen.cpp:291 #include "ORBInitInfoC.h" @@ -38,7 +38,7 @@ #endif /* __BORLANDC__ */ // TAO_IDL - Generated from -// .\be\be_visitor_arg_traits.cpp:69 +// be\be_visitor_arg_traits.cpp:69 // Arg traits specializations. namespace TAO @@ -47,7 +47,7 @@ namespace TAO // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_interface/interface_cs.cpp:60 +// be\be_visitor_interface/interface_cs.cpp:60 // Traits specializations for PortableInterceptor::ORBInitInfo. @@ -83,7 +83,7 @@ TAO::Objref_Traits<PortableInterceptor::ORBInitInfo>::marshal ( } // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_exception/exception_cs.cpp:63 +// be\be_visitor_exception/exception_cs.cpp:63 PortableInterceptor::ORBInitInfo::DuplicateName::DuplicateName (void) : CORBA::UserException ( @@ -176,7 +176,7 @@ void PortableInterceptor::ORBInitInfo::DuplicateName::_tao_decode ( // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_exception/exception_ctor.cpp:66 +// be\be_visitor_exception/exception_ctor.cpp:66 PortableInterceptor::ORBInitInfo::DuplicateName::DuplicateName ( const char * _tao_name @@ -196,7 +196,7 @@ CORBA::TypeCode_ptr PortableInterceptor::ORBInitInfo::DuplicateName::_tao_type ( } // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_exception/exception_cs.cpp:63 +// be\be_visitor_exception/exception_cs.cpp:63 PortableInterceptor::ORBInitInfo::InvalidName::InvalidName (void) : CORBA::UserException ( diff --git a/TAO/tao/ORBInitInfoC.h b/TAO/tao/PI/ORBInitInfoC.h index 1ebabfa85d2..4669d79760e 100644 --- a/TAO/tao/ORBInitInfoC.h +++ b/TAO/tao/PI/ORBInitInfoC.h @@ -26,7 +26,7 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html // TAO_IDL - Generated from -// .\be\be_codegen.cpp:153 +// be\be_codegen.cpp:153 #ifndef _TAO_IDL_ORIG_ORBINITINFOC_H_ #define _TAO_IDL_ORIG_ORBINITINFOC_H_ @@ -40,7 +40,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/TAO_Export.h" +#include "tao/PI/pi_export.h" #include "tao/ORB.h" #include "tao/SystemException.h" #include "tao/Environment.h" @@ -48,14 +48,14 @@ #include "tao/Objref_VarOut_T.h" #include "tao/StringSeqC.h" -#include "tao/IOP_CodecC.h" +#include "tao/CodecFactory/IOP_Codec_includeC.h" #include "tao/PI_ForwardC.h" #include "tao/PolicyC.h" #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO #endif -#define TAO_EXPORT_MACRO TAO_Export +#define TAO_EXPORT_MACRO TAO_PI_Export #if defined(_MSC_VER) #pragma warning(push) @@ -67,13 +67,13 @@ #endif /* __BORLANDC__ */ // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_module/module_ch.cpp:48 +// be\be_visitor_module/module_ch.cpp:48 namespace PortableInterceptor { // TAO_IDL - Generated from - // .\be\be_interface.cpp:598 + // be\be_interface.cpp:598 #if !defined (_PORTABLEINTERCEPTOR_CLIENTREQUESTINTERCEPTOR__VAR_OUT_CH_) #define _PORTABLEINTERCEPTOR_CLIENTREQUESTINTERCEPTOR__VAR_OUT_CH_ @@ -96,7 +96,7 @@ namespace PortableInterceptor #endif /* end #if !defined */ // TAO_IDL - Generated from - // .\be\be_interface.cpp:598 + // be\be_interface.cpp:598 #if !defined (_PORTABLEINTERCEPTOR_SERVERREQUESTINTERCEPTOR__VAR_OUT_CH_) #define _PORTABLEINTERCEPTOR_SERVERREQUESTINTERCEPTOR__VAR_OUT_CH_ @@ -119,7 +119,7 @@ namespace PortableInterceptor #endif /* end #if !defined */ // TAO_IDL - Generated from - // .\be\be_interface.cpp:598 + // be\be_interface.cpp:598 #if !defined (_PORTABLEINTERCEPTOR_IORINTERCEPTOR__VAR_OUT_CH_) #define _PORTABLEINTERCEPTOR_IORINTERCEPTOR__VAR_OUT_CH_ @@ -142,7 +142,7 @@ namespace PortableInterceptor #endif /* end #if !defined */ // TAO_IDL - Generated from - // .\be\be_interface.cpp:598 + // be\be_interface.cpp:598 #if !defined (_PORTABLEINTERCEPTOR_POLICYFACTORY__VAR_OUT_CH_) #define _PORTABLEINTERCEPTOR_POLICYFACTORY__VAR_OUT_CH_ @@ -165,7 +165,7 @@ namespace PortableInterceptor #endif /* end #if !defined */ // TAO_IDL - Generated from - // .\be\be_interface.cpp:598 + // be\be_interface.cpp:598 #if !defined (_PORTABLEINTERCEPTOR_ORBINITINFO__VAR_OUT_CH_) #define _PORTABLEINTERCEPTOR_ORBINITINFO__VAR_OUT_CH_ @@ -188,12 +188,12 @@ namespace PortableInterceptor #endif /* end #if !defined */ // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_interface/interface_ch.cpp:54 + // be\be_visitor_interface/interface_ch.cpp:54 #if !defined (_PORTABLEINTERCEPTOR_ORBINITINFO_CH_) #define _PORTABLEINTERCEPTOR_ORBINITINFO_CH_ - class TAO_Export ORBInitInfo + class TAO_PI_Export ORBInitInfo : public virtual CORBA::Object { public: @@ -223,24 +223,24 @@ namespace PortableInterceptor static void _tao_any_destructor (void *); // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_typedef/typedef_ch.cpp:413 + // be\be_visitor_typedef/typedef_ch.cpp:413 typedef char * ObjectId; typedef CORBA::String_var ObjectId_var; typedef CORBA::String_out ObjectId_out; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_typecode/typecode_decl.cpp:44 + // be\be_visitor_typecode/typecode_decl.cpp:44 static ::CORBA::TypeCode_ptr const _tc_ObjectId; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_exception/exception_ch.cpp:51 + // be\be_visitor_exception/exception_ch.cpp:53 #if !defined (_PORTABLEINTERCEPTOR_ORBINITINFO_DUPLICATENAME_CH_) #define _PORTABLEINTERCEPTOR_ORBINITINFO_DUPLICATENAME_CH_ - class TAO_Export DuplicateName : public CORBA::UserException + class TAO_PI_Export DuplicateName : public CORBA::UserException { public: @@ -273,32 +273,32 @@ namespace PortableInterceptor ); // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_exception/exception_ctor.cpp:66 + // be\be_visitor_exception/exception_ctor.cpp:66 DuplicateName ( const char * _tao_name ); // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_exception/exception_ch.cpp:127 + // be\be_visitor_exception/exception_ch.cpp:129 virtual CORBA::TypeCode_ptr _tao_type (void) const; }; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_typecode/typecode_decl.cpp:44 + // be\be_visitor_typecode/typecode_decl.cpp:44 static ::CORBA::TypeCode_ptr const _tc_DuplicateName; #endif /* end #if !defined */ // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_exception/exception_ch.cpp:51 + // be\be_visitor_exception/exception_ch.cpp:53 #if !defined (_PORTABLEINTERCEPTOR_ORBINITINFO_INVALIDNAME_CH_) #define _PORTABLEINTERCEPTOR_ORBINITINFO_INVALIDNAME_CH_ - class TAO_Export InvalidName : public CORBA::UserException + class TAO_PI_Export InvalidName : public CORBA::UserException { public: @@ -330,20 +330,20 @@ namespace PortableInterceptor ); // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_exception/exception_ch.cpp:127 + // be\be_visitor_exception/exception_ch.cpp:129 virtual CORBA::TypeCode_ptr _tao_type (void) const; }; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_typecode/typecode_decl.cpp:44 + // be\be_visitor_typecode/typecode_decl.cpp:44 static ::CORBA::TypeCode_ptr const _tc_InvalidName; #endif /* end #if !defined */ // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:46 + // be\be_visitor_operation/operation_ch.cpp:46 virtual ::CORBA::StringSeq * arguments ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS @@ -353,7 +353,7 @@ namespace PortableInterceptor )) = 0; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:46 + // be\be_visitor_operation/operation_ch.cpp:46 virtual char * orb_id ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS @@ -363,7 +363,7 @@ namespace PortableInterceptor )) = 0; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:46 + // be\be_visitor_operation/operation_ch.cpp:46 virtual ::IOP::CodecFactory_ptr codec_factory ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS @@ -373,7 +373,7 @@ namespace PortableInterceptor )) = 0; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:46 + // be\be_visitor_operation/operation_ch.cpp:46 virtual void register_initial_reference ( const char * id, @@ -386,7 +386,7 @@ namespace PortableInterceptor )) = 0; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:46 + // be\be_visitor_operation/operation_ch.cpp:46 virtual CORBA::Object_ptr resolve_initial_references ( const char * id @@ -398,7 +398,7 @@ namespace PortableInterceptor )) = 0; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:46 + // be\be_visitor_operation/operation_ch.cpp:46 virtual void add_client_request_interceptor ( ::PortableInterceptor::ClientRequestInterceptor_ptr interceptor @@ -410,7 +410,7 @@ namespace PortableInterceptor )) = 0; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:46 + // be\be_visitor_operation/operation_ch.cpp:46 virtual void add_server_request_interceptor ( ::PortableInterceptor::ServerRequestInterceptor_ptr interceptor @@ -422,7 +422,7 @@ namespace PortableInterceptor )) = 0; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:46 + // be\be_visitor_operation/operation_ch.cpp:46 virtual void add_ior_interceptor ( ::PortableInterceptor::IORInterceptor_ptr interceptor @@ -434,7 +434,7 @@ namespace PortableInterceptor )) = 0; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:46 + // be\be_visitor_operation/operation_ch.cpp:46 virtual PortableInterceptor::SlotId allocate_slot_id ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS @@ -444,7 +444,7 @@ namespace PortableInterceptor )) = 0; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:46 + // be\be_visitor_operation/operation_ch.cpp:46 virtual void register_policy_factory ( ::CORBA::PolicyType type, @@ -456,7 +456,7 @@ namespace PortableInterceptor )) = 0; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_interface/interface_ch.cpp:210 + // be\be_visitor_interface/interface_ch.cpp:210 virtual CORBA::Boolean _is_a ( const char *type_id @@ -482,27 +482,111 @@ namespace PortableInterceptor #endif /* end #if !defined */ // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_typecode/typecode_decl.cpp:44 + // be\be_visitor_typecode/typecode_decl.cpp:44 - extern TAO_Export ::CORBA::TypeCode_ptr const _tc_ORBInitInfo; + extern TAO_PI_Export ::CORBA::TypeCode_ptr const _tc_ORBInitInfo; // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_module/module_ch.cpp:66 +// be\be_visitor_module/module_ch.cpp:66 } // module PortableInterceptor // TAO_IDL - Generated from -// .\be\be_visitor_traits.cpp:61 +// be\be_visitor_traits.cpp:61 // Traits specializations. namespace TAO { +#if !defined (_PORTABLEINTERCEPTOR_CLIENTREQUESTINTERCEPTOR__TRAITS_CH_) +#define _PORTABLEINTERCEPTOR_CLIENTREQUESTINTERCEPTOR__TRAITS_CH_ + + template<> + struct TAO_PI_Export Objref_Traits< ::PortableInterceptor::ClientRequestInterceptor> + { + static ::PortableInterceptor::ClientRequestInterceptor_ptr duplicate ( + ::PortableInterceptor::ClientRequestInterceptor_ptr + ); + static void release ( + ::PortableInterceptor::ClientRequestInterceptor_ptr + ); + static ::PortableInterceptor::ClientRequestInterceptor_ptr nil (void); + static CORBA::Boolean marshal ( + ::PortableInterceptor::ClientRequestInterceptor_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ + +#if !defined (_PORTABLEINTERCEPTOR_SERVERREQUESTINTERCEPTOR__TRAITS_CH_) +#define _PORTABLEINTERCEPTOR_SERVERREQUESTINTERCEPTOR__TRAITS_CH_ + + template<> + struct TAO_PI_Export Objref_Traits< ::PortableInterceptor::ServerRequestInterceptor> + { + static ::PortableInterceptor::ServerRequestInterceptor_ptr duplicate ( + ::PortableInterceptor::ServerRequestInterceptor_ptr + ); + static void release ( + ::PortableInterceptor::ServerRequestInterceptor_ptr + ); + static ::PortableInterceptor::ServerRequestInterceptor_ptr nil (void); + static CORBA::Boolean marshal ( + ::PortableInterceptor::ServerRequestInterceptor_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ + +#if !defined (_PORTABLEINTERCEPTOR_IORINTERCEPTOR__TRAITS_CH_) +#define _PORTABLEINTERCEPTOR_IORINTERCEPTOR__TRAITS_CH_ + + template<> + struct TAO_PI_Export Objref_Traits< ::PortableInterceptor::IORInterceptor> + { + static ::PortableInterceptor::IORInterceptor_ptr duplicate ( + ::PortableInterceptor::IORInterceptor_ptr + ); + static void release ( + ::PortableInterceptor::IORInterceptor_ptr + ); + static ::PortableInterceptor::IORInterceptor_ptr nil (void); + static CORBA::Boolean marshal ( + ::PortableInterceptor::IORInterceptor_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ + +#if !defined (_PORTABLEINTERCEPTOR_POLICYFACTORY__TRAITS_CH_) +#define _PORTABLEINTERCEPTOR_POLICYFACTORY__TRAITS_CH_ + + template<> + struct TAO_PI_Export Objref_Traits< ::PortableInterceptor::PolicyFactory> + { + static ::PortableInterceptor::PolicyFactory_ptr duplicate ( + ::PortableInterceptor::PolicyFactory_ptr + ); + static void release ( + ::PortableInterceptor::PolicyFactory_ptr + ); + static ::PortableInterceptor::PolicyFactory_ptr nil (void); + static CORBA::Boolean marshal ( + ::PortableInterceptor::PolicyFactory_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ + #if !defined (_PORTABLEINTERCEPTOR_ORBINITINFO__TRAITS_CH_) #define _PORTABLEINTERCEPTOR_ORBINITINFO__TRAITS_CH_ template<> - struct TAO_Export Objref_Traits< ::PortableInterceptor::ORBInitInfo> + struct TAO_PI_Export Objref_Traits< ::PortableInterceptor::ORBInitInfo> { static ::PortableInterceptor::ORBInitInfo_ptr duplicate ( ::PortableInterceptor::ORBInitInfo_ptr @@ -521,30 +605,30 @@ namespace TAO } // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_interface/any_op_ch.cpp:52 +// be\be_visitor_interface/any_op_ch.cpp:52 -TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::ORBInitInfo_ptr); // copying -TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::ORBInitInfo_ptr *); // non-copying -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::ORBInitInfo_ptr &); +TAO_PI_Export void operator<<= (CORBA::Any &, PortableInterceptor::ORBInitInfo_ptr); // copying +TAO_PI_Export void operator<<= (CORBA::Any &, PortableInterceptor::ORBInitInfo_ptr *); // non-copying +TAO_PI_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::ORBInitInfo_ptr &); // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_exception/any_op_ch.cpp:52 +// be\be_visitor_exception/any_op_ch.cpp:52 -TAO_Export void operator<<= (CORBA::Any &, const PortableInterceptor::ORBInitInfo::DuplicateName &); // copying version -TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::ORBInitInfo::DuplicateName*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::ORBInitInfo::DuplicateName *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const PortableInterceptor::ORBInitInfo::DuplicateName *&); +TAO_PI_Export void operator<<= (CORBA::Any &, const PortableInterceptor::ORBInitInfo::DuplicateName &); // copying version +TAO_PI_Export void operator<<= (CORBA::Any &, PortableInterceptor::ORBInitInfo::DuplicateName*); // noncopying version +TAO_PI_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::ORBInitInfo::DuplicateName *&); // deprecated +TAO_PI_Export CORBA::Boolean operator>>= (const CORBA::Any &, const PortableInterceptor::ORBInitInfo::DuplicateName *&); // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_exception/any_op_ch.cpp:52 +// be\be_visitor_exception/any_op_ch.cpp:52 -TAO_Export void operator<<= (CORBA::Any &, const PortableInterceptor::ORBInitInfo::InvalidName &); // copying version -TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::ORBInitInfo::InvalidName*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::ORBInitInfo::InvalidName *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const PortableInterceptor::ORBInitInfo::InvalidName *&); +TAO_PI_Export void operator<<= (CORBA::Any &, const PortableInterceptor::ORBInitInfo::InvalidName &); // copying version +TAO_PI_Export void operator<<= (CORBA::Any &, PortableInterceptor::ORBInitInfo::InvalidName*); // noncopying version +TAO_PI_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::ORBInitInfo::InvalidName *&); // deprecated +TAO_PI_Export CORBA::Boolean operator>>= (const CORBA::Any &, const PortableInterceptor::ORBInitInfo::InvalidName *&); // TAO_IDL - Generated from -// .\be\be_codegen.cpp:955 +// be\be_codegen.cpp:955 #if defined(_MSC_VER) #pragma warning(pop) diff --git a/TAO/tao/ORBInitializerS.h b/TAO/tao/PI/ORBInitInfoS.h index 17b1360599e..17b1360599e 100644 --- a/TAO/tao/ORBInitializerS.h +++ b/TAO/tao/PI/ORBInitInfoS.h diff --git a/TAO/tao/ORBInitializer.pidl b/TAO/tao/PI/ORBInitializer.pidl index 7a79e766eb9..aad972f58da 100644 --- a/TAO/tao/ORBInitializer.pidl +++ b/TAO/tao/PI/ORBInitializer.pidl @@ -13,8 +13,8 @@ * * tao_idl * -o orig -Gp -Gd -Ge 1 -GA -Sc -SS -Sci - * -Wb,export_include="tao/TAO_Export.h" - * -Wb,export_macro=TAO_Export + * -Wb,export_include="tao/PI_Client/pi_client_export.h.h" + * -Wb,export_macro=TAO_PI_CLIENT_Export * -Wb,pre_include="ace/pre.h" * -Wb,post_include="ace/post.h" * ORBInitializer.pidl diff --git a/TAO/tao/ORBInitializerA.cpp b/TAO/tao/PI/ORBInitializerA.cpp index e2349bb574e..6eef8945468 100644 --- a/TAO/tao/ORBInitializerA.cpp +++ b/TAO/tao/PI/ORBInitializerA.cpp @@ -35,7 +35,7 @@ #include "tao/Any_Impl_T.h" // TAO_IDL - Generated from -// be/be_visitor_typecode/objref_typecode.cpp:76 +// be\be_visitor_typecode/objref_typecode.cpp:76 static TAO::TypeCode::Objref<char const *, TAO::Null_RefCount_Policy> @@ -53,7 +53,7 @@ namespace PortableInterceptor // TAO_IDL - Generated from -// be/be_visitor_interface/any_op_cs.cpp:50 +// be\be_visitor_interface/any_op_cs.cpp:50 namespace TAO { diff --git a/TAO/tao/ORBInitializerC.cpp b/TAO/tao/PI/ORBInitializerC.cpp index 852187e9957..3772a55380b 100644 --- a/TAO/tao/ORBInitializerC.cpp +++ b/TAO/tao/PI/ORBInitializerC.cpp @@ -26,7 +26,7 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html // TAO_IDL - Generated from -// .\be\be_codegen.cpp:291 +// be\be_codegen.cpp:291 #include "ORBInitializerC.h" @@ -38,7 +38,7 @@ #endif /* __BORLANDC__ */ // TAO_IDL - Generated from -// .\be\be_visitor_arg_traits.cpp:69 +// be\be_visitor_arg_traits.cpp:69 // Arg traits specializations. namespace TAO @@ -47,7 +47,7 @@ namespace TAO // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_interface/interface_cs.cpp:60 +// be\be_visitor_interface/interface_cs.cpp:60 // Traits specializations for PortableInterceptor::ORBInitializer. diff --git a/TAO/tao/ORBInitializerC.h b/TAO/tao/PI/ORBInitializerC.h index b50ee32c7d2..dcea0ec082f 100644 --- a/TAO/tao/ORBInitializerC.h +++ b/TAO/tao/PI/ORBInitializerC.h @@ -26,7 +26,7 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html // TAO_IDL - Generated from -// .\be\be_codegen.cpp:153 +// be\be_codegen.cpp:153 #ifndef _TAO_IDL_ORIG_ORBINITIALIZERC_H_ #define _TAO_IDL_ORIG_ORBINITIALIZERC_H_ @@ -40,7 +40,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/TAO_Export.h" +#include "tao/PI/pi_export.h" #include "tao/ORB.h" #include "tao/SystemException.h" #include "tao/Environment.h" @@ -50,7 +50,7 @@ #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO #endif -#define TAO_EXPORT_MACRO TAO_Export +#define TAO_EXPORT_MACRO TAO_PI_Export #if defined(_MSC_VER) #pragma warning(push) @@ -62,13 +62,13 @@ #endif /* __BORLANDC__ */ // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_module/module_ch.cpp:48 +// be\be_visitor_module/module_ch.cpp:48 namespace PortableInterceptor { // TAO_IDL - Generated from - // .\be\be_interface.cpp:598 + // be\be_interface.cpp:598 #if !defined (_PORTABLEINTERCEPTOR_ORBINITINFO__VAR_OUT_CH_) #define _PORTABLEINTERCEPTOR_ORBINITINFO__VAR_OUT_CH_ @@ -91,7 +91,7 @@ namespace PortableInterceptor #endif /* end #if !defined */ // TAO_IDL - Generated from - // .\be\be_interface.cpp:598 + // be\be_interface.cpp:598 #if !defined (_PORTABLEINTERCEPTOR_ORBINITIALIZER__VAR_OUT_CH_) #define _PORTABLEINTERCEPTOR_ORBINITIALIZER__VAR_OUT_CH_ @@ -114,12 +114,12 @@ namespace PortableInterceptor #endif /* end #if !defined */ // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_interface/interface_ch.cpp:54 + // be\be_visitor_interface/interface_ch.cpp:54 #if !defined (_PORTABLEINTERCEPTOR_ORBINITIALIZER_CH_) #define _PORTABLEINTERCEPTOR_ORBINITIALIZER_CH_ - class TAO_Export ORBInitializer + class TAO_PI_Export ORBInitializer : public virtual CORBA::Object { public: @@ -149,7 +149,7 @@ namespace PortableInterceptor static void _tao_any_destructor (void *); // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:46 + // be\be_visitor_operation/operation_ch.cpp:46 virtual void pre_init ( ::PortableInterceptor::ORBInitInfo_ptr info @@ -160,7 +160,7 @@ namespace PortableInterceptor )) = 0; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:46 + // be\be_visitor_operation/operation_ch.cpp:46 virtual void post_init ( ::PortableInterceptor::ORBInitInfo_ptr info @@ -171,7 +171,7 @@ namespace PortableInterceptor )) = 0; // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_interface/interface_ch.cpp:210 + // be\be_visitor_interface/interface_ch.cpp:210 virtual CORBA::Boolean _is_a ( const char *type_id @@ -197,27 +197,48 @@ namespace PortableInterceptor #endif /* end #if !defined */ // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_typecode/typecode_decl.cpp:44 + // be\be_visitor_typecode/typecode_decl.cpp:44 - extern TAO_Export ::CORBA::TypeCode_ptr const _tc_ORBInitializer; + extern TAO_PI_Export ::CORBA::TypeCode_ptr const _tc_ORBInitializer; // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_module/module_ch.cpp:66 +// be\be_visitor_module/module_ch.cpp:66 } // module PortableInterceptor // TAO_IDL - Generated from -// .\be\be_visitor_traits.cpp:61 +// be\be_visitor_traits.cpp:61 // Traits specializations. namespace TAO { +#if !defined (_PORTABLEINTERCEPTOR_ORBINITINFO__TRAITS_CH_) +#define _PORTABLEINTERCEPTOR_ORBINITINFO__TRAITS_CH_ + + template<> + struct TAO_PI_Export Objref_Traits< ::PortableInterceptor::ORBInitInfo> + { + static ::PortableInterceptor::ORBInitInfo_ptr duplicate ( + ::PortableInterceptor::ORBInitInfo_ptr + ); + static void release ( + ::PortableInterceptor::ORBInitInfo_ptr + ); + static ::PortableInterceptor::ORBInitInfo_ptr nil (void); + static CORBA::Boolean marshal ( + ::PortableInterceptor::ORBInitInfo_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ + #if !defined (_PORTABLEINTERCEPTOR_ORBINITIALIZER__TRAITS_CH_) #define _PORTABLEINTERCEPTOR_ORBINITIALIZER__TRAITS_CH_ template<> - struct TAO_Export Objref_Traits< ::PortableInterceptor::ORBInitializer> + struct TAO_PI_Export Objref_Traits< ::PortableInterceptor::ORBInitializer> { static ::PortableInterceptor::ORBInitializer_ptr duplicate ( ::PortableInterceptor::ORBInitializer_ptr @@ -236,14 +257,14 @@ namespace TAO } // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_interface/any_op_ch.cpp:52 +// be\be_visitor_interface/any_op_ch.cpp:52 -TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::ORBInitializer_ptr); // copying -TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::ORBInitializer_ptr *); // non-copying -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::ORBInitializer_ptr &); +TAO_PI_Export void operator<<= (CORBA::Any &, PortableInterceptor::ORBInitializer_ptr); // copying +TAO_PI_Export void operator<<= (CORBA::Any &, PortableInterceptor::ORBInitializer_ptr *); // non-copying +TAO_PI_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::ORBInitializer_ptr &); // TAO_IDL - Generated from -// .\be\be_codegen.cpp:955 +// be\be_codegen.cpp:955 #if defined(_MSC_VER) #pragma warning(pop) diff --git a/TAO/tao/PolicyFactoryS.h b/TAO/tao/PI/ORBInitializerS.h index 17b1360599e..17b1360599e 100644 --- a/TAO/tao/PolicyFactoryS.h +++ b/TAO/tao/PI/ORBInitializerS.h diff --git a/TAO/tao/PI/ORBInitializer_Registry.cpp b/TAO/tao/PI/ORBInitializer_Registry.cpp new file mode 100644 index 00000000000..da3c6e9343b --- /dev/null +++ b/TAO/tao/PI/ORBInitializer_Registry.cpp @@ -0,0 +1,155 @@ +#include "ORBInitializer_Registry.h" +#include "ORBInitInfo.h" + +#include "tao/ORB.h" +#include "tao/ORB_Constants.h" +#include "tao/SystemException.h" + +#include "ace/Static_Object_Lock.h" +#include "ace/Recursive_Thread_Mutex.h" +#include "ace/Log_Msg.h" + +ACE_RCSID (PI, + ORBInitializer_Registry, + "$Id$") + +TAO::ORBInitializer_Registry::ORBInitializer_Registry (void) + : lock_ (), + initializers_ () +{ +} + +void +TAO::ORBInitializer_Registry::register_orb_initializer ( + PortableInterceptor::ORBInitializer_ptr init + ACE_ENV_ARG_DECL) +{ + if (!CORBA::is_nil (init)) + { + ACE_GUARD (TAO_SYNCH_MUTEX, + guard, + this->lock_); + + // Increase the length of the ORBInitializer array by one. + size_t const cur_len = this->initializers_.size (); + size_t const new_len = cur_len + 1; + if (this->initializers_.size (new_len) != 0) + ACE_THROW (CORBA::INTERNAL ()); + + // Add the given ORBInitializer to the sequence. + this->initializers_[cur_len] = + PortableInterceptor::ORBInitializer::_duplicate (init); + } + else + ACE_THROW (CORBA::INV_OBJREF ( + CORBA::SystemException::_tao_minor_code ( + 0, + EINVAL), + CORBA::COMPLETED_NO)); +} + +void +TAO::ORBInitializer_Registry::pre_init ( + TAO_ORB_Core *orb_core, + int argc, + char *argv[], + PortableInterceptor::SlotId &slotid + ACE_ENV_ARG_DECL) +{ + ACE_GUARD (TAO_SYNCH_MUTEX, + guard, + this->lock_); + + size_t const initializer_count (this->initializers_.size ()); + + if (initializer_count > 0) + { + TAO_ORBInitInfo * orb_init_info_temp = 0; + + ACE_NEW_THROW_EX (orb_init_info_temp, + TAO_ORBInitInfo (orb_core, + argc, + argv, + slotid), + CORBA::NO_MEMORY ( + CORBA::SystemException::_tao_minor_code ( + 0, + ENOMEM), + CORBA::COMPLETED_NO)); + ACE_CHECK; + + TAO_ORBInitInfo_var orb_init_info_ = orb_init_info_temp; + + for (size_t i = 0; i < initializer_count; ++i) + { + this->initializers_[i]->pre_init (orb_init_info_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + slotid = orb_init_info_temp->slot_count (); + + // Invalidate the ORBInitInfo instance to prevent future + // modifications to the ORB. This behavior complies with the + // PortableInterceptor specification. + orb_init_info_temp->invalidate (); + } +} + +void +TAO::ORBInitializer_Registry::post_init ( + TAO_ORB_Core *orb_core, + int argc, + char *argv[], + PortableInterceptor::SlotId &slotid + ACE_ENV_ARG_DECL) +{ + ACE_GUARD (TAO_SYNCH_MUTEX, + guard, + this->lock_); + + size_t const initializer_count (this->initializers_.size ()); + + if (initializer_count > 0) + { + TAO_ORBInitInfo * orb_init_info_temp = 0; + + ACE_NEW_THROW_EX (orb_init_info_temp, + TAO_ORBInitInfo (orb_core, + argc, + argv, + slotid), + CORBA::NO_MEMORY ( + CORBA::SystemException::_tao_minor_code ( + 0, + ENOMEM), + CORBA::COMPLETED_NO)); + ACE_CHECK; + + TAO_ORBInitInfo_var orb_init_info_ = orb_init_info_temp; + + for (size_t i = 0; i < initializer_count; ++i) + { + this->initializers_[i]->post_init (orb_init_info_.in () + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + slotid = orb_init_info_->slot_count (); + + // Invalidate the ORBInitInfo instance to prevent future + // modifications to the ORB. This behavior complies with the + // PortableInterceptor specification. + orb_init_info_temp->invalidate (); + } +} + +ACE_STATIC_SVC_DEFINE (ORBInitializer_Registry, + ACE_TEXT ("ORBInitializer_Registry"), + ACE_SVC_OBJ_T, + &ACE_SVC_NAME (ORBInitializer_Registry), + ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, + 0) + +ACE_FACTORY_NAMESPACE_DEFINE (TAO_PI, ORBInitializer_Registry, TAO::ORBInitializer_Registry) + diff --git a/TAO/tao/PI/ORBInitializer_Registry.h b/TAO/tao/PI/ORBInitializer_Registry.h new file mode 100644 index 00000000000..97c92448b08 --- /dev/null +++ b/TAO/tao/PI/ORBInitializer_Registry.h @@ -0,0 +1,98 @@ +// -*- C++ -*- + +// =================================================================== +/** + * @file ORBInitializer_Registry.h + * + * $Id$ + * + * @author Ossama Othman <ossama@uci.edu> + */ +// =================================================================== + +#ifndef TAO_PI_ORB_INITIALIZER_REGISTRY_H +#define TAO_PI_ORB_INITIALIZER_REGISTRY_H + +#include /**/ "ace/pre.h" + +#include "pi_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Array_Base.h" +#include "ace/Service_Config.h" +#include "tao/CORBA_methods.h" +#include "tao/Objref_VarOut_T.h" +#include "ace/Thread_Mutex.h" +#include "tao/ORBInitializer_Registry_Adapter.h" + +#include "PI.h" + +namespace TAO +{ + /** + * @class ORBInitializer_Registry + * + * @brief Global list that contains all portable interceptor ORB + * initializers. + * + * @note This class should be instantiated via its instance() + * method. Normally this would be enforced by making the + * constructor protected but that forces a friend declaration + * containing a template type (TAO_Singleton) with a static + * member to be introduced. In turn, this potentially + * introduces problems in MS Windows DLL environments due to + * the occurance of multiple singleton instances. There + * should only be one! + */ + class TAO_PI_Export ORBInitializer_Registry + : public ORBInitializer_Registry_Adapter + { + public: + ORBInitializer_Registry (void); + + /// Register an ORBInitializer with the underlying ORBInitializer + /// array. + virtual void register_orb_initializer ( + PortableInterceptor::ORBInitializer_ptr init + ACE_ENV_ARG_DECL); + + /// Begin initialization of all registered ORBInitializers before + /// the ORB itself is initialized. + virtual void pre_init ( + TAO_ORB_Core *orb_core, + int argc, + char *argv[], + PortableInterceptor::SlotId &slotid + ACE_ENV_ARG_DECL); + + /// Complete initialization of all registered ORBInitializers after + /// the ORB has been initialized. + virtual void post_init ( + TAO_ORB_Core *orb_core, + int argc, + char *argv[], + PortableInterceptor::SlotId &slotid + ACE_ENV_ARG_DECL); + + private: + // Prevent copying + ORBInitializer_Registry (const ORBInitializer_Registry &); + void operator= (const ORBInitializer_Registry &); + + private: + TAO_SYNCH_MUTEX lock_; + + /// Dynamic array containing registered ORBInitializers. + ACE_Array_Base<PortableInterceptor::ORBInitializer_var> initializers_; + }; +} + +ACE_STATIC_SVC_DECLARE (ORBInitializer_Registry) +ACE_FACTORY_DECLARE (TAO_PI, ORBInitializer_Registry) + +#include /**/ "ace/post.h" + +#endif /* TAO_PI_ORB_INITIALIZER_REGISTRY_H */ diff --git a/TAO/tao/PI/PI.cpp b/TAO/tao/PI/PI.cpp new file mode 100644 index 00000000000..270e0ced030 --- /dev/null +++ b/TAO/tao/PI/PI.cpp @@ -0,0 +1,14 @@ +#include "PI.h" +#include "ORBInitializer_Registry.h" +#include "PolicyFactory_Loader.h" + +ACE_RCSID (PI, + PI, + "$Id$") + +int +TAO_PI_Init::Initializer (void) +{ + return ACE_Service_Config::process_directive (ace_svc_desc_ORBInitializer_Registry); +} + diff --git a/TAO/tao/PI/PI.h b/TAO/tao/PI/PI.h new file mode 100644 index 00000000000..760c56f7d27 --- /dev/null +++ b/TAO/tao/PI/PI.h @@ -0,0 +1,60 @@ +// -*- C++ -*- + +// =================================================================== +/** + * @file PI.h + * + * $Id$ + * + * @author Johnny Willemsen <jwillemsen@remedy.nl> + */ +// =================================================================== + +#ifndef TAO_PI_H +#define TAO_PI_H + +#include /**/ "ace/pre.h" + +#include "pi_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +/** + * @class TAO_PI_Init + * + */ +class TAO_PI_Export TAO_PI_Init +{ +public: + + /// Used to force the initialization of the ORB code. + static int Initializer (void); +}; + +#if defined(ACE_HAS_BROKEN_STATIC_CONSTRUCTORS) + +typedef int (*TAO_Module_Initializer) (void); + +static TAO_Module_Initializer +TAO_Requires_PI_Initializer = + &TAO_PI_Init::Initializer; + +#else + +static int +TAO_Requires_PI_Initializer = + TAO_PI_Init::Initializer (); + +#endif /* ACE_HAS_BROKEN_STATIC_CONSTRUCTORS */ + +#include /**/ "ace/post.h" + +#define TAO_PI_SAFE_INCLUDE +#include "ORBInitializerC.h" +#include "PolicyFactoryC.h" +#include "ORBInitInfoC.h" +#undef TAO_PI_SAFE_INCLUDE + +#endif /* TAO_PI_H */ diff --git a/TAO/tao/PolicyFactory.pidl b/TAO/tao/PI/PolicyFactory.pidl index 57a5366b279..57a5366b279 100644 --- a/TAO/tao/PolicyFactory.pidl +++ b/TAO/tao/PI/PolicyFactory.pidl diff --git a/TAO/tao/PolicyFactoryA.cpp b/TAO/tao/PI/PolicyFactoryA.cpp index b00f549d49b..d0ecbffbf57 100644 --- a/TAO/tao/PolicyFactoryA.cpp +++ b/TAO/tao/PI/PolicyFactoryA.cpp @@ -35,7 +35,7 @@ #include "tao/Any_Impl_T.h" // TAO_IDL - Generated from -// be/be_visitor_typecode/objref_typecode.cpp:76 +// be\be_visitor_typecode/objref_typecode.cpp:76 static TAO::TypeCode::Objref<char const *, TAO::Null_RefCount_Policy> @@ -53,7 +53,7 @@ namespace PortableInterceptor // TAO_IDL - Generated from -// be/be_visitor_interface/any_op_cs.cpp:50 +// be\be_visitor_interface/any_op_cs.cpp:50 namespace TAO { diff --git a/TAO/tao/PolicyFactoryC.cpp b/TAO/tao/PI/PolicyFactoryC.cpp index 070362161df..9e58888ac22 100644 --- a/TAO/tao/PolicyFactoryC.cpp +++ b/TAO/tao/PI/PolicyFactoryC.cpp @@ -88,7 +88,7 @@ PortableInterceptor::PolicyFactory::PolicyFactory (void) PortableInterceptor::PolicyFactory::~PolicyFactory (void) {} -void +void PortableInterceptor::PolicyFactory::_tao_any_destructor (void *_tao_void_pointer) { PolicyFactory *_tao_tmp_pointer = @@ -106,10 +106,10 @@ PortableInterceptor::PolicyFactory::_narrow ( { return PolicyFactory::_nil (); } - + PolicyFactory_ptr proxy = dynamic_cast<PolicyFactory_ptr> (_tao_objref); - + return PolicyFactory::_duplicate (proxy); } @@ -123,10 +123,10 @@ PortableInterceptor::PolicyFactory::_unchecked_narrow ( { return PolicyFactory::_nil (); } - + PolicyFactory_ptr proxy = dynamic_cast<PolicyFactory_ptr> (_tao_objref); - + return PolicyFactory::_duplicate (proxy); } @@ -137,7 +137,7 @@ PortableInterceptor::PolicyFactory::_duplicate (PolicyFactory_ptr obj) { obj->_add_ref (); } - + return obj; } diff --git a/TAO/tao/PolicyFactoryC.h b/TAO/tao/PI/PolicyFactoryC.h index 3f605106599..e4e9410ec0e 100644 --- a/TAO/tao/PolicyFactoryC.h +++ b/TAO/tao/PI/PolicyFactoryC.h @@ -40,13 +40,14 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/TAO_Export.h" +#include "tao/PI/pi_export.h" #include "tao/ORB.h" #include "tao/SystemException.h" #include "tao/Environment.h" #include "tao/Object.h" #include "tao/TypeCode_Constants.h" #include "tao/Any.h" +#include "tao/TypeCode.h" #include "tao/Objref_VarOut_T.h" #include "tao/PolicyC.h" @@ -54,7 +55,7 @@ #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO #endif -#define TAO_EXPORT_MACRO TAO_Export +#define TAO_EXPORT_MACRO TAO_PI_Export #if defined(_MSC_VER) #pragma warning(push) @@ -70,22 +71,22 @@ namespace PortableInterceptor { - + // TAO_IDL - Generated from // .\be\be_interface.cpp:598 #if !defined (_PORTABLEINTERCEPTOR_POLICYFACTORY__VAR_OUT_CH_) #define _PORTABLEINTERCEPTOR_POLICYFACTORY__VAR_OUT_CH_ - + class PolicyFactory; typedef PolicyFactory *PolicyFactory_ptr; - + typedef TAO_Objref_Var_T< PolicyFactory > PolicyFactory_var; - + typedef TAO_Objref_Out_T< PolicyFactory @@ -93,45 +94,45 @@ namespace PortableInterceptor PolicyFactory_out; #endif /* end #if !defined */ - + // TAO_IDL - Generated from // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_interface/interface_ch.cpp:54 #if !defined (_PORTABLEINTERCEPTOR_POLICYFACTORY_CH_) #define _PORTABLEINTERCEPTOR_POLICYFACTORY_CH_ - - class TAO_Export PolicyFactory + + class TAO_PI_Export PolicyFactory : public virtual CORBA::Object { public: typedef PolicyFactory_ptr _ptr_type; typedef PolicyFactory_var _var_type; - + // The static operations. static PolicyFactory_ptr _duplicate (PolicyFactory_ptr obj); - + static void _tao_release (PolicyFactory_ptr obj); - + static PolicyFactory_ptr _narrow ( CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - + static PolicyFactory_ptr _unchecked_narrow ( CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - + static PolicyFactory_ptr _nil (void) { return static_cast<PolicyFactory_ptr> (0); } - + static void _tao_any_destructor (void *); - + // TAO_IDL - Generated from // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_operation/operation_ch.cpp:46 - + virtual ::CORBA::Policy_ptr create_policy ( ::CORBA::PolicyType type, const ::CORBA::Any & value @@ -141,7 +142,7 @@ namespace PortableInterceptor CORBA::SystemException, ::CORBA::PolicyError )) = 0; - + // Hand-crafted addition. virtual ::CORBA::Policy_ptr _create_policy ( CORBA::PolicyType type @@ -154,42 +155,42 @@ namespace PortableInterceptor // TAO_IDL - Generated from // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_interface/interface_ch.cpp:210 - + virtual CORBA::Boolean _is_a ( const char *type_id ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - + virtual const char* _interface_repository_id (void) const; virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); - + protected: // Abstract or local interface only. PolicyFactory (void); - + virtual ~PolicyFactory (void); - + private: // Private and unimplemented for concrete interfaces. PolicyFactory (const PolicyFactory &); - + void operator= (const PolicyFactory &); }; #endif /* end #if !defined */ - + // TAO_IDL - Generated from - // c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_typecode/typecode_decl.cpp:44 - - extern TAO_Export ::CORBA::TypeCode_ptr const _tc_PolicyFactory; + // be\be_visitor_typecode/typecode_decl.cpp:44 + + extern TAO_PI_Export ::CORBA::TypeCode_ptr const _tc_PolicyFactory; // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_module/module_ch.cpp:66 +// be\be_visitor_module/module_ch.cpp:66 } // module PortableInterceptor // TAO_IDL - Generated from -// .\be\be_visitor_traits.cpp:61 +// be\be_visitor_traits.cpp:61 // Traits specializations. namespace TAO @@ -197,9 +198,9 @@ namespace TAO #if !defined (_PORTABLEINTERCEPTOR_POLICYFACTORY__TRAITS_CH_) #define _PORTABLEINTERCEPTOR_POLICYFACTORY__TRAITS_CH_ - + template<> - struct TAO_Export Objref_Traits< ::PortableInterceptor::PolicyFactory> + struct TAO_PI_Export Objref_Traits< ::PortableInterceptor::PolicyFactory> { static ::PortableInterceptor::PolicyFactory_ptr duplicate ( ::PortableInterceptor::PolicyFactory_ptr @@ -218,14 +219,14 @@ namespace TAO } // TAO_IDL - Generated from -// c:\ace\latest\ace_wrappers\tao\tao_idl\be\be_visitor_interface/any_op_ch.cpp:52 +// be\be_visitor_interface/any_op_ch.cpp:52 -TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::PolicyFactory_ptr); // copying -TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::PolicyFactory_ptr *); // non-copying -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::PolicyFactory_ptr &); +TAO_PI_Export void operator<<= (CORBA::Any &, PortableInterceptor::PolicyFactory_ptr); // copying +TAO_PI_Export void operator<<= (CORBA::Any &, PortableInterceptor::PolicyFactory_ptr *); // non-copying +TAO_PI_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::PolicyFactory_ptr &); // TAO_IDL - Generated from -// .\be\be_codegen.cpp:955 +// be\be_codegen.cpp:955 #if defined(_MSC_VER) #pragma warning(pop) diff --git a/TAO/tao/PI/PolicyFactoryS.h b/TAO/tao/PI/PolicyFactoryS.h new file mode 100644 index 00000000000..17b1360599e --- /dev/null +++ b/TAO/tao/PI/PolicyFactoryS.h @@ -0,0 +1,28 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// Skeleton file generation suppressed with command line option -SS diff --git a/TAO/tao/PI/PolicyFactory_Loader.cpp b/TAO/tao/PI/PolicyFactory_Loader.cpp new file mode 100644 index 00000000000..bea75ef3a0f --- /dev/null +++ b/TAO/tao/PI/PolicyFactory_Loader.cpp @@ -0,0 +1,46 @@ +/* -*- C++ -*- */ + +// ================================================================= +/** + * @file PolicyFactory_Loader.cpp + * + * $Id$ + * + * @author Johnny Willemsen <jwillemsen@remedy.nl> + * + */ +// ================================================================= + +#include "PolicyFactory_Loader.h" +#include "PolicyFactory_Registry.h" + +#include "tao/ORB.h" +#include "tao/debug.h" + +ACE_RCSID (PI, + PolicyFactory_Loader, + "$Id$") + +TAO::PolicyFactory_Registry_Adapter* +TAO_PolicyFactory_Loader::create (void) +{ + TAO::PolicyFactory_Registry_Adapter* obj = 0; + ACE_NEW_RETURN (obj, + TAO_PolicyFactory_Registry, + 0); + return obj; +} + +int +TAO_PolicyFactory_Loader::Initializer (void) +{ + return ACE_Service_Config::process_directive (ace_svc_desc_TAO_PolicyFactory_Loader); +} + +ACE_STATIC_SVC_DEFINE (TAO_PolicyFactory_Loader, + ACE_TEXT ("PolicyFactory_Loader"), + ACE_SVC_OBJ_T, + &ACE_SVC_NAME (TAO_PolicyFactory_Loader), + ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, + 0) +ACE_FACTORY_DEFINE (TAO_PI, TAO_PolicyFactory_Loader) diff --git a/TAO/tao/PI/PolicyFactory_Loader.h b/TAO/tao/PI/PolicyFactory_Loader.h new file mode 100644 index 00000000000..90dc4534e42 --- /dev/null +++ b/TAO/tao/PI/PolicyFactory_Loader.h @@ -0,0 +1,59 @@ +/* -*- C++ -*- */ + + +//============================================================================= +/** + * @file PolicyFactory_Loader.h + * + * $Id$ + * + * @author Johnny Willemsen <jwillemsen@remedy.nl> + */ +//============================================================================= + + +#ifndef TAO_POLICYFACTORY_LOADER_H +#define TAO_POLICYFACTORY_LOADER_H + +#include /**/ "ace/pre.h" + +#include "pi_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/PolicyFactory_Registry_Factory.h" +#include "ace/Service_Config.h" + +class TAO_PI_Export TAO_PolicyFactory_Loader + : public TAO_PolicyFactory_Registry_Factory +{ +public: + /// Creates a Codec factory and returns it. + virtual TAO::PolicyFactory_Registry_Adapter* create (void); + + /// Used to force the initialization of the ORB code. + static int Initializer (void); +}; + +ACE_STATIC_SVC_DECLARE (TAO_PolicyFactory_Loader) +ACE_FACTORY_DECLARE (TAO_PI, TAO_PolicyFactory_Loader) + +#if defined(ACE_HAS_BROKEN_STATIC_CONSTRUCTORS) + +typedef int (*TAO_Module_Initializer) (void); + +static TAO_Module_Initializer +TAO_Requires_PolicyFactory_Initializer = &TAO_PolicyFactory_Loader::Initializer; + +#else + +static int +TAO_Requires_PolicyFactory_Initializer = TAO_PolicyFactory_Loader::Initializer (); + +#endif /* ACE_HAS_BROKEN_STATIC_CONSTRUCTORS */ + +#include /**/ "ace/post.h" + +#endif /* TAO_POLICYFACTORY_LOADER_H */ diff --git a/TAO/tao/PolicyFactory_Registry.cpp b/TAO/tao/PI/PolicyFactory_Registry.cpp index 2ed088d4afe..7999bbecc3c 100644 --- a/TAO/tao/PolicyFactory_Registry.cpp +++ b/TAO/tao/PI/PolicyFactory_Registry.cpp @@ -1,11 +1,10 @@ #include "PolicyFactory_Registry.h" -#include "PortableInterceptorC.h" -#include "ORB_Constants.h" -#include "SystemException.h" -#include "PolicyC.h" +#include "PolicyFactoryC.h" +#include "tao/ORB_Constants.h" +#include "tao/SystemException.h" +#include "tao/PolicyC.h" - -ACE_RCSID (tao, +ACE_RCSID (PI, PolicyFactory_Registry, "$Id$") @@ -118,21 +117,3 @@ TAO_PolicyFactory_Registry::factory_exists (CORBA::PolicyType & type) const return (this->factories_.find (type) == 0); } - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_Map_Entry<CORBA::PolicyType, PortableInterceptor::PolicyFactory_ptr>; -template class ACE_Map_Iterator_Base<CORBA::PolicyType, PortableInterceptor::PolicyFactory_ptr, ACE_Null_Mutex>; -template class ACE_Map_Iterator<CORBA::PolicyType, PortableInterceptor::PolicyFactory_ptr, ACE_Null_Mutex>; -template class ACE_Map_Reverse_Iterator<CORBA::PolicyType, PortableInterceptor::PolicyFactory_ptr, ACE_Null_Mutex>; -template class ACE_Map_Manager<CORBA::PolicyType, PortableInterceptor::PolicyFactory_ptr, ACE_Null_Mutex>; - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_Map_Entry<CORBA::PolicyType, PortableInterceptor::PolicyFactory_ptr> -#pragma instantiate ACE_Map_Iterator_Base<CORBA::PolicyType, PortableInterceptor::PolicyFactory_ptr, ACE_Null_Mutex> -#pragma instantiate ACE_Map_Iterator<CORBA::PolicyType, PortableInterceptor::PolicyFactory_ptr, ACE_Null_Mutex> -#pragma instantiate ACE_Map_Reverse_Iterator<CORBA::PolicyType, PortableInterceptor::PolicyFactory_ptr, ACE_Null_Mutex> -#pragma instantiate ACE_Map_Manager<CORBA::PolicyType, PortableInterceptor::PolicyFactory_ptr, ACE_Null_Mutex> - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/PolicyFactory_Registry.h b/TAO/tao/PI/PolicyFactory_Registry.h index 4ca44e31975..05a5747d112 100644 --- a/TAO/tao/PolicyFactory_Registry.h +++ b/TAO/tao/PI/PolicyFactory_Registry.h @@ -7,6 +7,7 @@ * $Id$ * * @author Ossama Othman <ossama@dre.vanderbilt.edu> + * @author Johnny Willemsen <jwillemsen@remedy.nl> */ // =================================================================== @@ -15,38 +16,17 @@ #include /**/ "ace/pre.h" -#include "TAO_Export.h" +#include "pi_export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "Basic_Types.h" - #include "ace/Map_Manager.h" #include "ace/Null_Mutex.h" #include "ace/CORBA_macros.h" - -//-- Forward Declarations-- -namespace CORBA -{ - typedef ULong PolicyType; - - class Policy; - typedef Policy *Policy_ptr; - - class Any; - - class Environment; -} - -namespace PortableInterceptor -{ - class PolicyFactory; - typedef PolicyFactory *PolicyFactory_ptr; -} - -class TAO_ORB_Core; +#include "tao/Basic_Types.h" +#include "tao/PolicyFactory_Registry_Adapter.h" /** * @class TAO_PolicyFactory_Registry @@ -56,7 +36,8 @@ class TAO_ORB_Core; * ORB-specific registry that contains all portable interceptor * policy factories. */ -class TAO_Export TAO_PolicyFactory_Registry +class TAO_PI_Export TAO_PolicyFactory_Registry + : public TAO::PolicyFactory_Registry_Adapter { public: diff --git a/TAO/tao/PI/pi_export.h b/TAO/tao/PI/pi_export.h new file mode 100644 index 00000000000..73f09e95644 --- /dev/null +++ b/TAO/tao/PI/pi_export.h @@ -0,0 +1,40 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl +// ------------------------------ +#ifndef TAO_PI_EXPORT_H +#define TAO_PI_EXPORT_H + +#include "ace/config-all.h" + +#if defined (TAO_AS_STATIC_LIBS) +# if !defined (TAO_PI_HAS_DLL) +# define TAO_PI_HAS_DLL 0 +# endif /* ! TAO_PI_HAS_DLL */ +#else +# if !defined (TAO_PI_HAS_DLL) +# define TAO_PI_HAS_DLL 1 +# endif /* ! TAO_PI_HAS_DLL */ +#endif + +#if defined (TAO_PI_HAS_DLL) && (TAO_PI_HAS_DLL == 1) +# if defined (TAO_PI_BUILD_DLL) +# define TAO_PI_Export ACE_Proper_Export_Flag +# define TAO_PI_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define TAO_PI_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* TAO_PI_BUILD_DLL */ +# define TAO_PI_Export ACE_Proper_Import_Flag +# define TAO_PI_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define TAO_PI_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* TAO_PI_BUILD_DLL */ +#else /* TAO_PI_HAS_DLL == 1 */ +# define TAO_PI_Export +# define TAO_PI_SINGLETON_DECLARATION(T) +# define TAO_PI_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* TAO_PI_HAS_DLL == 1 */ + +#endif /* TAO_PI_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/tao/PolicyFactory_Registry_Adapter.cpp b/TAO/tao/PolicyFactory_Registry_Adapter.cpp new file mode 100644 index 00000000000..93dbc3093f2 --- /dev/null +++ b/TAO/tao/PolicyFactory_Registry_Adapter.cpp @@ -0,0 +1,14 @@ +//$Id$ + +#include "PolicyFactory_Registry_Adapter.h" + +ACE_RCSID( tao, + PolicyFactory_Registry_Adapter, + "$Id$"); + +namespace TAO +{ + PolicyFactory_Registry_Adapter::~PolicyFactory_Registry_Adapter (void) + { + } +} diff --git a/TAO/tao/PolicyFactory_Registry_Adapter.h b/TAO/tao/PolicyFactory_Registry_Adapter.h new file mode 100644 index 00000000000..11e911cc0c3 --- /dev/null +++ b/TAO/tao/PolicyFactory_Registry_Adapter.h @@ -0,0 +1,88 @@ +// -*- C++ -*- + +// =================================================================== +/** + * @file PolicyFactory_Registry_Adapter.h + * + * $Id$ + * + * @author Johnny Willemsen <jwillemsen@remedy.nl> + */ +// =================================================================== + +#ifndef TAO_POLICY_FACTORY_REGISTRY_ADAPTER_H +#define TAO_POLICY_FACTORY_REGISTRY_ADAPTER_H + +#include /**/ "ace/pre.h" + +#include "tao/TAO_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/CORBA_macros.h" +#include "Basic_Types.h" + +//-- Forward Declarations-- +namespace CORBA +{ + typedef ULong PolicyType; + + class Policy; + typedef Policy *Policy_ptr; + + class Any; + + class Environment; +} + +namespace PortableInterceptor +{ + class PolicyFactory; + typedef PolicyFactory *PolicyFactory_ptr; +} + +namespace TAO +{ + /** + * @class PolicyFactory_Registry_Adapter + * + * @brief ORB-specific PortableInterceptor::PolicyFactory registry. + * + * Class that offers an interface to the ORB to load and manipulate + * PolicyFactory_Registry + */ + class TAO_Export PolicyFactory_Registry_Adapter + { + public: + ~PolicyFactory_Registry_Adapter (void); + + /// Register a PolicyFactory with the underlying PolicyFactory + /// sequence. This method should only be called during ORB + /// initialization. + virtual void register_policy_factory ( + CORBA::PolicyType type, + PortableInterceptor::PolicyFactory_ptr policy_factory + ACE_ENV_ARG_DECL) = 0; + + /// Construct a policy of the given type with the information + /// contained in the CORBA::Any @a value. + virtual CORBA::Policy_ptr create_policy (CORBA::PolicyType type, + const CORBA::Any &value + ACE_ENV_ARG_DECL) = 0; + + /// Create an empty policy, usually to be filled in later by + /// demarshaling. + virtual CORBA::Policy_ptr _create_policy (CORBA::PolicyType type + ACE_ENV_ARG_DECL) = 0; + + /// Check if a @c PolicyFactory corresponding to the given type, + /// exists. + virtual bool factory_exists (CORBA::PolicyType & type) const = 0; + }; +} + +#include /**/ "ace/post.h" + +#endif /* TAO_POLICY_FACTORY_REGISTRY_ADAPTER_H */ diff --git a/TAO/tao/PolicyFactory_Registry_Factory.h b/TAO/tao/PolicyFactory_Registry_Factory.h new file mode 100644 index 00000000000..f8a86ff8fad --- /dev/null +++ b/TAO/tao/PolicyFactory_Registry_Factory.h @@ -0,0 +1,40 @@ +// ================================================================ +/** + * @file PolicyFactory_Registry_Factory.h + * + * $Id$ + * + * @author Carlos O'Ryan (coryan@cs.wustl.edu) + */ +// ================================================================ + +#ifndef TAO_POLICYFACTORY_REGISTRY_FACTORY_H +#define TAO_POLICYFACTORY_REGISTRY_FACTORY_H + +#include /**/ "ace/pre.h" + +#include "tao/TAO_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Service_Object.h" + +namespace TAO +{ + class PolicyFactory_Registry_Adapter; +} + +/** + * @class TAO_PolicyFactory_Registry_Factory + */ +class TAO_Export TAO_PolicyFactory_Registry_Factory : + public ACE_Service_Object +{ +public: + virtual TAO::PolicyFactory_Registry_Adapter* create (void) = 0; +}; + +#include /**/ "ace/post.h" +#endif /* TAO_OBJECT_LOADER_H */ diff --git a/TAO/tao/PortableInterceptor.pidl b/TAO/tao/PortableInterceptor.pidl index b753e9bacfe..1869495e41f 100644 --- a/TAO/tao/PortableInterceptor.pidl +++ b/TAO/tao/PortableInterceptor.pidl @@ -22,7 +22,7 @@ * The command used to generate code is: * * tao_idl - * -o orig -Gp -Gd -Ge 1 -GA -Sc -SS -Sci + * -o orig -Gp -Gd -Ge 1 -Sc -SS -Sci * -Wb,export_include="tao/TAO_Export.h" * -Wb,export_macro=TAO_Export * -Wb,pre_include="ace/pre.h" @@ -37,12 +37,9 @@ #include <PI_Forward.pidl> #include <Messaging_SyncScope.pidl> -#include <ORBInitializer.pidl> -#include <ORBInitInfo.pidl> #include <InvalidSlot.pidl> #include <ClientRequestInfo.pidl> #include <ServerRequestInfo.pidl> -#include <PolicyFactory.pidl> #include <ClientRequestInterceptor.pidl> #include <ServerRequestInterceptor.pidl> #include <PICurrent.pidl> diff --git a/TAO/tao/PortableInterceptorA.cpp b/TAO/tao/PortableInterceptorA.cpp deleted file mode 100644 index 52ad477c487..00000000000 --- a/TAO/tao/PortableInterceptorA.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// -*- C++ -*- -// -// $Id$ - -// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** -// TAO and the TAO IDL Compiler have been developed by: -// Center for Distributed Object Computing -// Washington University -// St. Louis, MO -// USA -// http://www.cs.wustl.edu/~schmidt/doc-center.html -// and -// Distributed Object Computing Laboratory -// University of California at Irvine -// Irvine, CA -// USA -// http://doc.ece.uci.edu/ -// and -// Institute for Software Integrated Systems -// Vanderbilt University -// Nashville, TN -// USA -// http://www.isis.vanderbilt.edu/ -// -// Information about TAO is available at: -// http://www.cs.wustl.edu/~schmidt/TAO.html - -#include "PortableInterceptorC.h" -#include "tao/Null_RefCount_Policy.h" -#include "tao/TypeCode_Constants.h" -#include "tao/Alias_TypeCode_Static.h" -#include "tao/String_TypeCode_Static.h" -#include "tao/CDR.h" -#include "tao/Any.h" diff --git a/TAO/tao/PortableInterceptorC.cpp b/TAO/tao/PortableInterceptorC.cpp index bbba41a147c..1b9324e8bfd 100644 --- a/TAO/tao/PortableInterceptorC.cpp +++ b/TAO/tao/PortableInterceptorC.cpp @@ -31,6 +31,10 @@ #include "PortableInterceptorC.h" #include "tao/CDR.h" +#include "tao/Null_RefCount_Policy.h" +#include "tao/TypeCode_Constants.h" +#include "tao/Alias_TypeCode_Static.h" +#include "tao/String_TypeCode_Static.h" #if defined (__BORLANDC__) #pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig diff --git a/TAO/tao/PortableInterceptorC.h b/TAO/tao/PortableInterceptorC.h index bc811a748e7..3b81a12fa86 100644 --- a/TAO/tao/PortableInterceptorC.h +++ b/TAO/tao/PortableInterceptorC.h @@ -47,12 +47,9 @@ #include "tao/PI_ForwardC.h" #include "tao/Messaging_SyncScopeC.h" -#include "tao/ORBInitializerC.h" -#include "tao/ORBInitInfoC.h" #include "tao/InvalidSlotC.h" #include "tao/ClientRequestInfoC.h" #include "tao/ServerRequestInfoC.h" -#include "tao/PolicyFactoryC.h" #include "tao/ClientRequestInterceptorC.h" #include "tao/ServerRequestInterceptorC.h" #include "tao/PICurrentC.h" diff --git a/TAO/tao/PortableServer.mpc b/TAO/tao/PortableServer.mpc index a839d48bc48..c7f76be7704 100644 --- a/TAO/tao/PortableServer.mpc +++ b/TAO/tao/PortableServer.mpc @@ -1,5 +1,5 @@ //$Id$ -project : taolib, core { +project : taolib, core, pi { sharedname = TAO_PortableServer dynamicflags = TAO_PORTABLESERVER_BUILD_DLL diff --git a/TAO/tao/PortableServer/Default_Policy_Validator.cpp b/TAO/tao/PortableServer/Default_Policy_Validator.cpp index 0da0643dced..e3b7c8a597b 100644 --- a/TAO/tao/PortableServer/Default_Policy_Validator.cpp +++ b/TAO/tao/PortableServer/Default_Policy_Validator.cpp @@ -3,6 +3,7 @@ #include "Default_Policy_Validator.h" #include "tao/ORB_Core.h" #include "tao/Policy_Set.h" +#include "tao/PolicyFactory_Registry_Adapter.h" #include "PortableServer.h" ACE_RCSID (PortableServer, @@ -136,7 +137,8 @@ TAO_POA_Default_Policy_Validator::legal_policy_impl (CORBA::PolicyType type) || type == PortableServer::IMPLICIT_ACTIVATION_POLICY_ID || type == PortableServer::SERVANT_RETENTION_POLICY_ID || type == PortableServer::REQUEST_PROCESSING_POLICY_ID - || this->orb_core_.policy_factory_registry ()->factory_exists (type)); + || (this->orb_core_.policy_factory_registry () != 0 && + this->orb_core_.policy_factory_registry ()->factory_exists (type))); } void diff --git a/TAO/tao/PortableServer/PortableServer_ORBInitializer.cpp b/TAO/tao/PortableServer/PortableServer_ORBInitializer.cpp index d116a64af7a..4776d14df27 100644 --- a/TAO/tao/PortableServer/PortableServer_ORBInitializer.cpp +++ b/TAO/tao/PortableServer/PortableServer_ORBInitializer.cpp @@ -4,7 +4,7 @@ #include "PortableServer_PolicyFactory.h" #include "PortableServer.h" #include "POA_Current.h" -#include "tao/ORBInitInfo.h" +#include "tao/PI/ORBInitInfo.h" #include "tao/debug.h" #include "tao/ORB_Core.h" diff --git a/TAO/tao/PortableServer/PortableServer_ORBInitializer.h b/TAO/tao/PortableServer/PortableServer_ORBInitializer.h index faa502a2468..72f985ec6f7 100644 --- a/TAO/tao/PortableServer/PortableServer_ORBInitializer.h +++ b/TAO/tao/PortableServer/PortableServer_ORBInitializer.h @@ -21,7 +21,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/ORBInitializerC.h" +#include "tao/PI/PI.h" #include "tao/LocalObject.h" /// Forward Declarations diff --git a/TAO/tao/PortableServer/PortableServer_PolicyFactory.h b/TAO/tao/PortableServer/PortableServer_PolicyFactory.h index c4b4da1f45d..32b841e0561 100644 --- a/TAO/tao/PortableServer/PortableServer_PolicyFactory.h +++ b/TAO/tao/PortableServer/PortableServer_PolicyFactory.h @@ -21,7 +21,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/PolicyFactoryC.h" +#include "tao/PI/PI.h" #include "tao/LocalObject.h" /// Policy factory for all PortableServer related policies. diff --git a/TAO/tao/RTCORBA.mpc b/TAO/tao/RTCORBA.mpc index 1f4e661efcd..b2f52e02b67 100644 --- a/TAO/tao/RTCORBA.mpc +++ b/TAO/tao/RTCORBA.mpc @@ -1,5 +1,5 @@ //$Id$ -project : taolib, core { +project : taolib, core, pi { sharedname = TAO_RTCORBA dynamicflags = TAO_RTCORBA_BUILD_DLL requires += rt_corba @@ -7,10 +7,9 @@ project : taolib, core { Source_Files { RTCORBA } - + Header_Files { RTCORBA -// RTCORBA_includeC.h } Inline_Files { diff --git a/TAO/tao/RTCORBA/RT_ORBInitializer.cpp b/TAO/tao/RTCORBA/RT_ORBInitializer.cpp index e32a57262ea..285881291f5 100644 --- a/TAO/tao/RTCORBA/RT_ORBInitializer.cpp +++ b/TAO/tao/RTCORBA/RT_ORBInitializer.cpp @@ -29,7 +29,7 @@ ACE_RCSID (RTCORBA, #include "tao/Exception.h" #include "tao/ORB_Core.h" -#include "tao/ORBInitInfo.h" +#include "tao/PI/ORBInitInfo.h" #include "tao/debug.h" #include "ace/Service_Repository.h" diff --git a/TAO/tao/RTCORBA/RT_PolicyFactory.h b/TAO/tao/RTCORBA/RT_PolicyFactory.h index 078bdfdd440..3fa55b3afe8 100644 --- a/TAO/tao/RTCORBA/RT_PolicyFactory.h +++ b/TAO/tao/RTCORBA/RT_PolicyFactory.h @@ -27,7 +27,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/PortableInterceptorC.h" +#include "tao/PI/PI.h" #include "tao/LocalObject.h" // This is to remove "inherits via dominance" warnings from MSVC. diff --git a/TAO/tao/RTScheduling/RTScheduler_Initializer.cpp b/TAO/tao/RTScheduling/RTScheduler_Initializer.cpp index e9c18aec522..6a2de345e4b 100644 --- a/TAO/tao/RTScheduling/RTScheduler_Initializer.cpp +++ b/TAO/tao/RTScheduling/RTScheduler_Initializer.cpp @@ -13,7 +13,7 @@ ACE_RCSID (TAO, RTScheduler_Initializer, "$Id$") #include "tao/Exception.h" #include "tao/ORB_Core.h" -#include "tao/ORBInitInfo.h" +#include "tao/PI/ORBInitInfo.h" #include "tao/debug.h" #include "ace/Service_Repository.h" #include "ace/Svc_Conf.h" @@ -92,7 +92,7 @@ void ACE_ENV_ARG_PARAMETER); ACE_CHECK; - Server_Interceptor *server_interceptor; + Server_Interceptor *server_interceptor = 0; ACE_NEW_THROW_EX (server_interceptor, Server_Interceptor (this->current_), CORBA::NO_MEMORY ( diff --git a/TAO/tao/RTScheduling/RTScheduler_Initializer.h b/TAO/tao/RTScheduling/RTScheduler_Initializer.h index 15b069094dd..075af17a661 100644 --- a/TAO/tao/RTScheduling/RTScheduler_Initializer.h +++ b/TAO/tao/RTScheduling/RTScheduler_Initializer.h @@ -23,10 +23,9 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/PortableInterceptorC.h" +#include "tao/PI/PI.h" #include "tao/LocalObject.h" - // This is to remove "inherits via dominance" warnings from MSVC. // MSVC is being a little too paranoid. #if defined(_MSC_VER) diff --git a/TAO/tao/Utils.mpc b/TAO/tao/Utils.mpc index 423012a91c9..1e7a57b467c 100644 --- a/TAO/tao/Utils.mpc +++ b/TAO/tao/Utils.mpc @@ -1,5 +1,5 @@ // $Id$ -project : taolib, core, portableserver { +project : taolib, core, portableserver, pi { sharedname = TAO_Utils dynamicflags = TAO_UTILS_BUILD_DLL diff --git a/TAO/tao/Utils/RIR_Narrow.h b/TAO/tao/Utils/RIR_Narrow.h index 7f71ac52c87..1493567ebfe 100644 --- a/TAO/tao/Utils/RIR_Narrow.h +++ b/TAO/tao/Utils/RIR_Narrow.h @@ -18,7 +18,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/PortableInterceptorC.h" +#include "tao/PI/PI.h" namespace TAO diff --git a/TAO/tao/tao.mpc b/TAO/tao/tao.mpc index a0722476e0e..abcccd81f30 100644 --- a/TAO/tao/tao.mpc +++ b/TAO/tao/tao.mpc @@ -130,8 +130,6 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core { Invocation_Adapter.cpp Invocation_Base.cpp Invocation_Endpoint_Selectors.cpp - IOP_CodecA.cpp - IOP_CodecC.cpp IOP_IORA.cpp IOP_IORC.cpp IOPC.cpp @@ -183,17 +181,12 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core { OctetSeqC.cpp operation_details.cpp ORB.cpp + ORBInitializer_Registry.cpp orb_typesA.cpp orb_typesC.cpp ORB_Core.cpp ORB_Core_Auto_Ptr.cpp ORB_Table.cpp - ORBInitializer_Registry.cpp - ORBInitializerA.cpp - ORBInitializerC.cpp - ORBInitInfo.cpp - ORBInitInfoA.cpp - ORBInitInfoC.cpp ParameterModeA.cpp ParameterModeC.cpp params.cpp @@ -218,11 +211,8 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core { Policy_Validator.cpp PolicyA.cpp PolicyC.cpp - PolicyFactoryA.cpp - PolicyFactoryC.cpp - PolicyFactory_Registry.cpp + PolicyFactory_Registry_Adapter.cpp PollableC.cpp - PortableInterceptorA.cpp PortableInterceptorC.cpp PredefinedType_Seq_Tmplinst.cpp Principal.cpp @@ -481,7 +471,6 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core { Invocation_Endpoint_Selectors.h Invocation_Utils.h IOPC.h - IOP_CodecC.h IOP_IORC.h IOPS.h IOPS_T.h @@ -544,10 +533,7 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core { ORB_Core.h ORB.h ORBInitializer_Registry.h - ORBInitializerC.h - ORBInitializerS.h - ORBInitInfo.h - ORBInitInfoS.h + ORBInitializer_Registry_Adapter.h ORB_Table.h orb_typesC.h orb_typesS.h @@ -567,8 +553,7 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core { Pluggable_Messaging.h Pluggable_Messaging_Utils.h PolicyC.h - PolicyFactory_Registry.h - PolicyFactoryS.h + PolicyFactory_Registry_Adapter.h Policy_ForwardC.h Policy_ForwardS.h Policy_Current.h |