From e69f13de644de2b6ff10dd7c6691a58c00ae1c35 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 16 Aug 2005 14:05:46 +0000 Subject: ChangeLogTag: Wed Aug 17 11:16:12 UTC 2005 Johnny Willemsen --- TAO/tao/AnyTypeCode/GIOPA.h | 1 + TAO/tao/AnyTypeCode/NVList_Adapter_Impl.cpp | 15 ++++++++++++ TAO/tao/AnyTypeCode/NVList_Adapter_Impl.h | 13 +++++++++- TAO/tao/GIOPC.cpp | 38 ++++++++++++++++------------- TAO/tao/GIOPC.h | 12 ++++++--- TAO/tao/NVList_Adapter.h | 1 - TAO/tao/ORB.cpp | 9 +++++++ 7 files changed, 66 insertions(+), 23 deletions(-) diff --git a/TAO/tao/AnyTypeCode/GIOPA.h b/TAO/tao/AnyTypeCode/GIOPA.h index ed20321b28c..e314e72e9e2 100644 --- a/TAO/tao/AnyTypeCode/GIOPA.h +++ b/TAO/tao/AnyTypeCode/GIOPA.h @@ -36,6 +36,7 @@ #include "tao/AnyTypeCode/TAO_AnyTypeCode_Export.h" #include "tao/GIOPC.h" #include "tao/AnyTypeCode/IOP_IORA.h" +#include "tao/AnyTypeCode/OctetSeqA.h" // TAO_IDL - Generated from diff --git a/TAO/tao/AnyTypeCode/NVList_Adapter_Impl.cpp b/TAO/tao/AnyTypeCode/NVList_Adapter_Impl.cpp index e32b4059bb6..212a10a3dbf 100644 --- a/TAO/tao/AnyTypeCode/NVList_Adapter_Impl.cpp +++ b/TAO/tao/AnyTypeCode/NVList_Adapter_Impl.cpp @@ -62,3 +62,18 @@ TAO_NVList_Adapter_Impl::create_named_value ( CORBA::COMPLETED_NO)); } +int +TAO_NVList_Adapter_Impl::Initializer (void) +{ + return ACE_Service_Config::process_directive (ace_svc_desc_TAO_NVList_Adapter_Impl); +} + +ACE_STATIC_SVC_DEFINE (TAO_NVList_Adapter_Impl, + ACE_TEXT ("TAO_NVList_Adapter"), + ACE_SVC_OBJ_T, + &ACE_SVC_NAME (TAO_NVList_Adapter_Impl), + ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, + 0) +ACE_FACTORY_DEFINE (TAO_AnyTypeCode, TAO_NVList_Adapter_Impl) + + diff --git a/TAO/tao/AnyTypeCode/NVList_Adapter_Impl.h b/TAO/tao/AnyTypeCode/NVList_Adapter_Impl.h index 6c4d11f5c8c..60593941e08 100644 --- a/TAO/tao/AnyTypeCode/NVList_Adapter_Impl.h +++ b/TAO/tao/AnyTypeCode/NVList_Adapter_Impl.h @@ -22,11 +22,12 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "tao/NVList_Adapter.h" +#include "ace/Service_Config.h" /** * @class TAO_NVList_Adapter */ -class TAO_AnyTypeCode_Export TAO_NVList_Adapter_Impl +class TAO_AnyTypeCode_Export TAO_NVList_Adapter_Impl : public TAO_NVList_Adapter { public: @@ -38,8 +39,18 @@ public: virtual void create_named_value ( CORBA::NamedValue_ptr &nv ACE_ENV_ARG_DECL); + + /// Used to force the initialization of the NVList adapter + static int Initializer (void); }; +ACE_STATIC_SVC_DECLARE (TAO_NVList_Adapter_Impl) +ACE_FACTORY_DECLARE (TAO_AnyTypeCode, TAO_NVList_Adapter_Impl) + +static int +TAO_Requires_NVList_Adapter_Impl_Initializer = + TAO_NVList_Adapter_Impl::Initializer (); + #include /**/ "ace/post.h" #endif /* TAO_NVLIST_ADAPTER_IMPL_H */ diff --git a/TAO/tao/GIOPC.cpp b/TAO/tao/GIOPC.cpp index 317e74ea64e..c969f09d9c0 100644 --- a/TAO/tao/GIOPC.cpp +++ b/TAO/tao/GIOPC.cpp @@ -34,6 +34,10 @@ #include "tao/ORB_Core.h" #include "ace/OS_NS_string.h" +#if !defined (__ACE_INLINE__) +#include "GIOPC.inl" +#endif /* !defined INLINE */ + // TAO_IDL - Generated from // be\be_visitor_arg_traits.cpp:70 @@ -43,10 +47,10 @@ namespace TAO } -// TAO_IDL - Generated from +// TAO_IDL - Generated from // be\be_visitor_structure/structure_cs.cpp:66 -void +void GIOP::Version::_tao_any_destructor ( void *_tao_void_pointer ) @@ -56,10 +60,10 @@ GIOP::Version::_tao_any_destructor ( delete _tao_tmp_pointer; } -// TAO_IDL - Generated from +// TAO_IDL - Generated from // be\be_visitor_structure/structure_cs.cpp:66 -void +void GIOP::IORAddressingInfo::_tao_any_destructor ( void *_tao_void_pointer ) @@ -154,10 +158,10 @@ GIOP::TargetAddress::operator= (const ::GIOP::TargetAddress &u) { return *this; } - + this->_reset (u.disc_, 0); this->disc_ = u.disc_; - + switch (this->disc_) { case 0: @@ -211,7 +215,7 @@ GIOP::TargetAddress::operator= (const ::GIOP::TargetAddress &u) default: break; } - + return *this; } @@ -220,7 +224,7 @@ void GIOP::TargetAddress::_reset (CORBA::Short, CORBA::Boolean /*finalize*/) { switch (this->disc_) { - + case 0: delete this->u_.object_key_; this->u_.object_key_ = 0; @@ -296,9 +300,9 @@ CORBA::Boolean operator<< ( { return false; } - + CORBA::Boolean result = true; - + switch (_tao_union._d ()) { case 0: @@ -319,7 +323,7 @@ CORBA::Boolean operator<< ( default: break; } - + return result; } @@ -333,16 +337,16 @@ CORBA::Boolean operator>> ( { return false; } - + CORBA::Boolean result = true; - + switch (_tao_discriminant) { case 0: { CORBA::OctetSeq _tao_union_tmp; result = strm >> _tao_union_tmp; - + if (result) { _tao_union.object_key (_tao_union_tmp); @@ -354,7 +358,7 @@ CORBA::Boolean operator>> ( { IOP::TaggedProfile _tao_union_tmp; result = strm >> _tao_union_tmp; - + if (result) { _tao_union.profile (_tao_union_tmp); @@ -366,7 +370,7 @@ CORBA::Boolean operator>> ( { GIOP::IORAddressingInfo _tao_union_tmp; result = strm >> _tao_union_tmp; - + if (result) { _tao_union.ior (_tao_union_tmp); @@ -378,6 +382,6 @@ CORBA::Boolean operator>> ( _tao_union._d (_tao_discriminant); break; } - + return result; } diff --git a/TAO/tao/GIOPC.h b/TAO/tao/GIOPC.h index 45227dc4166..e85e137e6c0 100644 --- a/TAO/tao/GIOPC.h +++ b/TAO/tao/GIOPC.h @@ -203,15 +203,15 @@ namespace GIOP void ior (const ACE_NESTED_CLASS (GIOP, IORAddressingInfo) &); const ACE_NESTED_CLASS (GIOP, IORAddressingInfo) &ior (void) const; ACE_NESTED_CLASS (GIOP, IORAddressingInfo) &ior (void); - + // TAO_IDL - Generated from // be\be_visitor_union/union_ch.cpp:147 - + void _default (void); private: CORBA::Short disc_; CORBA::Short holder_; - + union { // TAO_IDL - Generated from @@ -224,7 +224,7 @@ namespace GIOP // be\be_visitor_union_branch/private_ch.cpp:526 ACE_NESTED_CLASS (GIOP, IORAddressingInfo) *ior_; } u_; - + // TAO extension - frees any allocated storage. void _reset (CORBA::Short, CORBA::Boolean /* finalize */); }; @@ -265,6 +265,10 @@ TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, GIOP::TargetAddress &); // TAO_IDL - Generated from // be\be_codegen.cpp:1062 +#if defined (__ACE_INLINE__) +#include "GIOPC.inl" +#endif /* defined INLINE */ + #if defined(_MSC_VER) #pragma warning(pop) #endif /* _MSC_VER */ diff --git a/TAO/tao/NVList_Adapter.h b/TAO/tao/NVList_Adapter.h index 378795c8f42..207d5c2e014 100644 --- a/TAO/tao/NVList_Adapter.h +++ b/TAO/tao/NVList_Adapter.h @@ -55,6 +55,5 @@ public: }; - #include /**/ "ace/post.h" #endif /* TAO_NVLIST_ADAPTER_H */ diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index a5a832afee6..78d820649b8 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -291,6 +291,10 @@ CORBA::ORB::create_list (CORBA::Long count, if (adapter == 0) { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("ORB unable to find the ") + ACE_TEXT ("NVList Adapter instance"))); ACE_THROW (CORBA::INTERNAL ()); } @@ -356,6 +360,11 @@ CORBA::ORB::create_named_value (CORBA::NamedValue_ptr &nv if (adapter == 0) { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("ORB unable to find the ") + ACE_TEXT ("NVList Adapter instance"))); + ACE_THROW (CORBA::INTERNAL ()); } -- cgit v1.2.1