From 2508b33ec379978a90f6565aa3f4f718e1c93afc Mon Sep 17 00:00:00 2001 From: parsons Date: Tue, 2 Sep 2003 15:51:56 +0000 Subject: ChangeLogTag: Tue Sep 2 10:47:26 2003 Jeff Parsons --- TAO/ChangeLog_ref | 13 +++++ TAO/TAO_IDL/be/be_codegen.cpp | 99 ++++++++++++++++++++----------------- TAO/TAO_IDL/be_include/be_codegen.h | 1 + 3 files changed, 69 insertions(+), 44 deletions(-) diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref index c13cc56a5ed..a779794619c 100644 --- a/TAO/ChangeLog_ref +++ b/TAO/ChangeLog_ref @@ -1,3 +1,16 @@ +Tue Sep 2 10:47:26 2003 Jeff Parsons + + * TAO_IDL/be_include/be_codegen.h: + * TAO_IDL/be/be_codegen.cpp: + + Added separate method for generating include file statements + in the skeleton source file, similar to what has already been + done for the stub header and source files. Also added + inclusion of tao/Object_T.h to the skeleton source file, + conditional on AMI being enabled. The reason in that we need + to call _unchecked_narrow() in the _this() method body of + the reply handler. + Mon Sep 1 19:13:01 2003 Balachandran Natarajan * tao/BiDir_GIOP/BiDirPolicyC.h: diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index b491325fb1a..85ee91fa7c1 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -642,50 +642,7 @@ TAO_CodeGen::start_server_skeletons (const char *fname) << be_global->be_get_server_hdr_fname (1) << "\""; - this->gen_standard_include (this->server_skeletons_, - "tao/PortableServer/Object_Adapter.h"); - this->gen_standard_include (this->server_skeletons_, - "tao/PortableServer/Operation_Table.h"); - this->gen_standard_include (this->server_skeletons_, - "tao/TAO_Server_Request.h"); - this->gen_standard_include (this->server_skeletons_, - "tao/ORB_Core.h"); - this->gen_standard_include (this->server_skeletons_, - "tao/Profile.h"); - this->gen_standard_include (this->server_skeletons_, - "tao/Stub.h"); - this->gen_standard_include (this->server_skeletons_, - "tao/IFR_Client_Adapter.h"); - - if (be_global->gen_thru_poa_collocation () - || be_global->gen_direct_collocation ()) - { - this->gen_arg_file_includes (this->server_skeletons_); - } - - // The following header must always be included. - this->gen_standard_include (this->server_skeletons_, - "tao/PortableInterceptor.h"); - - // Include Portable Interceptor related headers. - *this->server_skeletons_ << "\n#if TAO_HAS_INTERCEPTORS == 1"; - this->gen_standard_include (this->server_skeletons_, - "tao/RequestInfo_Util.h"); - this->gen_standard_include (this->server_skeletons_, - "tao/PICurrent.h"); - this->gen_standard_include (this->server_skeletons_, - "tao/PortableServer/ServerRequestInfo.h"); - this->gen_standard_include (this->server_skeletons_, - "tao/PortableServer/ServerInterceptorAdapter.h"); - *this->server_skeletons_ << "\n#endif /* TAO_HAS_INTERCEPTORS == 1 */\n"; - - this->gen_standard_include (this->server_skeletons_, - "ace/Dynamic_Service.h"); - // To get ACE_UNUSED_ARGS - this->gen_standard_include (this->server_skeletons_, - "ace/config-all.h"); - - + this->gen_skel_src_includes (); *this->server_skeletons_ << "\n\n#if defined (__BORLANDC__)\n" << "#pragma option -w-rvl -w-rch -w-ccc -w-aus\n" @@ -1422,6 +1379,60 @@ TAO_CodeGen::gen_stub_src_includes (void) this->gen_arg_file_includes (this->client_stubs_); } +void +TAO_CodeGen::gen_skel_src_includes (void) +{ + this->gen_standard_include (this->server_skeletons_, + "tao/PortableServer/Object_Adapter.h"); + this->gen_standard_include (this->server_skeletons_, + "tao/PortableServer/Operation_Table.h"); + this->gen_standard_include (this->server_skeletons_, + "tao/TAO_Server_Request.h"); + this->gen_standard_include (this->server_skeletons_, + "tao/ORB_Core.h"); + this->gen_standard_include (this->server_skeletons_, + "tao/Profile.h"); + this->gen_standard_include (this->server_skeletons_, + "tao/Stub.h"); + this->gen_standard_include (this->server_skeletons_, + "tao/IFR_Client_Adapter.h"); + + if (be_global->gen_thru_poa_collocation () + || be_global->gen_direct_collocation ()) + { + this->gen_arg_file_includes (this->server_skeletons_); + } + + // Need _unchecked_narrow () for reply handler _this() method. + if (be_global->ami_call_back () == I_TRUE) + { + this->gen_standard_include (this->server_skeletons_, + "tao/Object_T.h"); + } + + // The following header must always be included. + this->gen_standard_include (this->server_skeletons_, + "tao/PortableInterceptor.h"); + + // Include Portable Interceptor related headers. + *this->server_skeletons_ << "\n#if TAO_HAS_INTERCEPTORS == 1"; + this->gen_standard_include (this->server_skeletons_, + "tao/RequestInfo_Util.h"); + this->gen_standard_include (this->server_skeletons_, + "tao/PICurrent.h"); + this->gen_standard_include (this->server_skeletons_, + "tao/PortableServer/ServerRequestInfo.h"); + this->gen_standard_include (this->server_skeletons_, + "tao/PortableServer/ServerInterceptorAdapter.h"); + *this->server_skeletons_ << "\n#endif /* TAO_HAS_INTERCEPTORS == 1 */\n"; + + this->gen_standard_include (this->server_skeletons_, + "ace/Dynamic_Service.h"); + // To get ACE_UNUSED_ARGS + this->gen_standard_include (this->server_skeletons_, + "ace/config-all.h"); +} + void TAO_CodeGen::gen_seq_file_includes (void) { diff --git a/TAO/TAO_IDL/be_include/be_codegen.h b/TAO/TAO_IDL/be_include/be_codegen.h index e2698fbcf68..9d05e3576b7 100644 --- a/TAO/TAO_IDL/be_include/be_codegen.h +++ b/TAO/TAO_IDL/be_include/be_codegen.h @@ -383,6 +383,7 @@ private: // Utility methods for generating ORB file includes. void gen_stub_hdr_includes (void); void gen_stub_src_includes (void); + void gen_skel_src_includes (void); void gen_seq_file_includes (void); void gen_any_file_includes (void); void gen_var_file_includes (void); -- cgit v1.2.1