From 21098e0556c0095f5aeb69e47fa945d35e1ee25b Mon Sep 17 00:00:00 2001 From: nanbor Date: Wed, 25 Aug 1999 22:18:47 +0000 Subject: *** empty log message *** --- TAO/ChangeLog-99c | 50 ++++++++++++++++++++++ TAO/TAO_IDL/be/be_codegen.cpp | 7 ++- TAO/TAO_IDL/be/be_helper.cpp | 2 +- .../be/be_visitor_interface/interface_cs.cpp | 24 +++++------ TAO/tao/InterceptorC.cpp | 46 ++++++++++++++++++-- TAO/tao/InterceptorC.h | 25 +---------- TAO/tao/InterceptorC.i | 17 +------- TAO/tao/InterceptorS.cpp | 2 +- TAO/tao/InterceptorS.h | 2 +- 9 files changed, 114 insertions(+), 61 deletions(-) diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index dcf847cdea9..b3165f5d42d 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,53 @@ +Wed Aug 25 16:49:08 1999 Nanbor Wang + + * TAO_IDL/be/be_codegen.cpp: Let *C.cpp include *S.h when + generating LC objref. + + * TAO_IDL/be/be_helper.cpp: Added the RCS $Id$ keyword in the + first line of copyright info so it's easier to check in + generated files. + + * Using the -Gl flag of tao_idl: For protable interceptor, I use + the following lines to process the Interceptor.pidl file: + + tao_idl -Gl -Wb,export_macro=TAO_Export Interceptor.pidl + + The following manually tweakings on the generated files are + necessary: + + + Delete the InterceptorS_T.* and InterceptorS.i. + + + InterceptorC.h: Removed inclusions of "CORBAC.h" and + "IOPC.h". Removed implementations of CDR insert/extract + oeprators for Cookies. + + + InterceptorC.{i,cpp}: Removed definitions of CDR + insert/extract operators for Cookies. + + + InterceptorS.h: Removed inclusions of "CORBAC.h" and + "IOPC.h". + + Removed inclusions of "InterceptorS_T.h" and + "InterceptorS.i". + + + InterceptorS.cpp: Removed inclusion of "InterceptorS.i" + + * TAO_IDL/be/be_visitor_interface/interface_cs.cpp + (visit_interface): Fixed generating of locality constraint + objref in _narrow. + + We need _duplicate method for lc objref also. + + * tao/CORBA.pidl: Added some missing definitions for it to work + with Interceptor.pidl. + + * tao/Interceptor.pidl: Portable Interceptor IDL definitons. + + * tao/InterceptorC.{h,i,cpp}: + * tao/InterceptorS.{h,cpp}: Added new interceptor IDL generated files. + +<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + Wed Aug 25 10:16:11 1999 David L. Levine * orbsvcs/orbsvcs/EC_Gateway_UDP.cpp (handle_input): diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index c7553969330..531783da149 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -328,10 +328,9 @@ TAO_CodeGen::start_client_stubs (const char *fname) *this->client_stubs_ << "#include \"" << idl_global->be_get_client_hdr_fname (1) << "\"\n\n"; -#if 0 // Nanbor's collocation change - *this->client_stubs_ << "#include \"" << - idl_global->be_get_server_hdr_fname (1) << "\"\n\n"; -#endif /* Nanbor */ + if (idl_global->gen_locality_constraint ()) + *this->client_stubs_ << "#include \"" << + idl_global->be_get_server_hdr_fname (1) << "\"\n\n"; // generate the code that includes the inline file if not included in the // header file diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp index 5d8df5c6d4b..8b26ab72842 100644 --- a/TAO/TAO_IDL/be/be_helper.cpp +++ b/TAO/TAO_IDL/be/be_helper.cpp @@ -26,7 +26,7 @@ ACE_RCSID(be, be_helper, "$Id$") static const char copyright [] = -"/* -*- C++ -*- */\n\n" +"/* -*- C++ -*- $Id$ */\n\n" "// ****** Code generated by the The ACE ORB (TAO) IDL Compiler *******\n" "// TAO and the TAO IDL Compiler have been developed by the Center for\n" "// Distributed Object Computing at Washington University, St. Louis.\n" diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp index a72a3e0df90..ce7007db0cb 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp @@ -101,17 +101,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node) << be_nl << "if (retv != 0)" << be_idt_nl << "return retv;" << be_uidt << be_uidt_nl << "}" << be_uidt_nl; - *os << "return new " << node->full_name () << "(stub);" << be_uidt_nl - << "}" << be_nl << be_nl; - - // The _duplicate method - *os << node->full_name () << "_ptr " << be_nl - << node->full_name () << "::_duplicate (" - << node->full_name () << "_ptr obj)" << be_nl - << "{" << be_idt_nl - << "if (!CORBA::is_nil (obj))" << be_idt_nl - << "obj->_incr_refcnt ();" << be_uidt_nl - << "return obj;" << be_uidt_nl; + *os << "return new " << node->full_name () << "(stub);" << be_uidt_nl; } else { @@ -128,12 +118,22 @@ be_visitor_interface_cs::visit_interface (be_interface *node) // Locality constraint objects alway use "direct" collocated // implementation. *os << "return new " << node->full_coll_name (be_interface::DIRECT) - << "(" << be_idt << be_idt_nl << "ACE_reinterpret_cast (" + << "(" << be_idt << be_idt_nl << "ACE_reinterpret_cast (POA_" << node->full_name () << "_ptr, servant)," << be_nl << "0" << be_uidt_nl << ");" << be_uidt << be_uidt_nl; } *os << "}" << be_nl << be_nl; + // The _duplicate method + *os << node->full_name () << "_ptr " << be_nl + << node->full_name () << "::_duplicate (" + << node->full_name () << "_ptr obj)" << be_nl + << "{" << be_idt_nl + << "if (!CORBA::is_nil (obj))" << be_idt_nl + << "obj->_incr_refcnt ();" << be_uidt_nl + << "return obj;" << be_uidt_nl + << "}" << be_nl << be_nl; + // generate code for the elements of the interface if (this->visit_scope (node) == -1) { diff --git a/TAO/tao/InterceptorC.cpp b/TAO/tao/InterceptorC.cpp index 444e3cbfee5..e044aa0509f 100644 --- a/TAO/tao/InterceptorC.cpp +++ b/TAO/tao/InterceptorC.cpp @@ -1,4 +1,4 @@ -/* $Id$ -*- C++ -*- */ +/* -*- C++ -*- $Id$ */ // ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* // TAO and the TAO IDL Compiler have been developed by the Center for @@ -7,9 +7,9 @@ // Information about TAO is available at: // http://www.cs.wustl.edu/~schmidt/TAO.html -#include "corbafwd.h" #include "InterceptorC.h" -#include "InterceptorS.cpp" + +#include "InterceptorS.h" #if !defined (__ACE_INLINE__) #include "InterceptorC.i" @@ -38,6 +38,14 @@ PortableInterceptor::Cookie_ptr PortableInterceptor::Cookie::_narrow ( ); } +PortableInterceptor::Cookie_ptr +PortableInterceptor::Cookie::_duplicate (PortableInterceptor::Cookie_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->_incr_refcnt (); + return obj; +} + CORBA::Boolean PortableInterceptor::Cookie::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) { if ( @@ -234,6 +242,14 @@ PortableInterceptor::RequestInfo_ptr PortableInterceptor::RequestInfo::_narrow ( ); } +PortableInterceptor::RequestInfo_ptr +PortableInterceptor::RequestInfo::_duplicate (PortableInterceptor::RequestInfo_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->_incr_refcnt (); + return obj; +} + CORBA::Boolean PortableInterceptor::RequestInfo::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) { if ( @@ -283,6 +299,14 @@ PortableInterceptor::Interceptor_ptr PortableInterceptor::Interceptor::_narrow ( ); } +PortableInterceptor::Interceptor_ptr +PortableInterceptor::Interceptor::_duplicate (PortableInterceptor::Interceptor_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->_incr_refcnt (); + return obj; +} + CORBA::Boolean PortableInterceptor::Interceptor::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) { if ( @@ -332,6 +356,14 @@ PortableInterceptor::ServerRequestInterceptor_ptr PortableInterceptor::ServerReq ); } +PortableInterceptor::ServerRequestInterceptor_ptr +PortableInterceptor::ServerRequestInterceptor::_duplicate (PortableInterceptor::ServerRequestInterceptor_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->_incr_refcnt (); + return obj; +} + CORBA::Boolean PortableInterceptor::ServerRequestInterceptor::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) { if ( @@ -382,6 +414,14 @@ PortableInterceptor::ClientRequestInterceptor_ptr PortableInterceptor::ClientReq ); } +PortableInterceptor::ClientRequestInterceptor_ptr +PortableInterceptor::ClientRequestInterceptor::_duplicate (PortableInterceptor::ClientRequestInterceptor_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->_incr_refcnt (); + return obj; +} + CORBA::Boolean PortableInterceptor::ClientRequestInterceptor::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) { if ( diff --git a/TAO/tao/InterceptorC.h b/TAO/tao/InterceptorC.h index 7eb7a494765..537618aeab7 100644 --- a/TAO/tao/InterceptorC.h +++ b/TAO/tao/InterceptorC.h @@ -1,4 +1,4 @@ -/* $Id$ -*- C++ -*- */ +/* -*- C++ -*- $Id$ */ // ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* // TAO and the TAO IDL Compiler have been developed by the Center for @@ -10,7 +10,7 @@ #ifndef _TAO_IDL_INTERCEPTORC_H_ #define _TAO_IDL_INTERCEPTORC_H_ -#include "corba.h" +#include "tao/corba.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -879,27 +879,6 @@ CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, PortableInterceptor:: void TAO_Export operator<<= (CORBA::Any &, PortableInterceptor::ClientRequestInterceptor_ptr); CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, PortableInterceptor::ClientRequestInterceptor *&); -#ifndef __ACE_INLINE__ - - -#if !defined _TAO_CDR_OP_PortableInterceptor_Cookies_H_ -#define _TAO_CDR_OP_PortableInterceptor_Cookies_H_ - -CORBA::Boolean TAO_Export operator<< ( - TAO_OutputCDR &, - const PortableInterceptor::Cookies & - ); -CORBA::Boolean TAO_Export operator>> ( - TAO_InputCDR &, - PortableInterceptor::Cookies & - ); - -#endif /* _TAO_CDR_OP_PortableInterceptor_Cookies_H_ */ - - -#endif /* __ACE_INLINE__ */ - - #if defined (__ACE_INLINE__) #include "InterceptorC.i" #endif /* defined INLINE */ diff --git a/TAO/tao/InterceptorC.i b/TAO/tao/InterceptorC.i index a588119a1a9..a1ad11bde72 100644 --- a/TAO/tao/InterceptorC.i +++ b/TAO/tao/InterceptorC.i @@ -1,4 +1,4 @@ -/* $Id$ -*- C++ -*- */ +/* -*- C++ -*- $Id$ */ // ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* // TAO and the TAO IDL Compiler have been developed by the Center for @@ -1277,18 +1277,3 @@ PortableInterceptor::ClientRequestInterceptor_out::operator-> (void) #endif /* end #if !defined */ - - -#if !defined _TAO_CDR_OP_PortableInterceptor_Cookies_I_ -#define _TAO_CDR_OP_PortableInterceptor_Cookies_I_ - -CORBA::Boolean TAO_Export operator<< ( - TAO_OutputCDR &, - const PortableInterceptor::Cookies & - ); -CORBA::Boolean TAO_Export operator>> ( - TAO_InputCDR &, - PortableInterceptor::Cookies & - ); - -#endif /* _TAO_CDR_OP_PortableInterceptor_Cookies_I_ */ diff --git a/TAO/tao/InterceptorS.cpp b/TAO/tao/InterceptorS.cpp index 33d233fac67..c2ab7934f38 100644 --- a/TAO/tao/InterceptorS.cpp +++ b/TAO/tao/InterceptorS.cpp @@ -1,4 +1,4 @@ -/* $Id$ -*- C++ -*- */ +/* -*- C++ -*- $Id$ */ // ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* // TAO and the TAO IDL Compiler have been developed by the Center for diff --git a/TAO/tao/InterceptorS.h b/TAO/tao/InterceptorS.h index e54b9aa0a7e..82b4bf91805 100644 --- a/TAO/tao/InterceptorS.h +++ b/TAO/tao/InterceptorS.h @@ -1,4 +1,4 @@ -/* $Id$ -*- C++ -*- */ +/* -*- C++ -*- $Id$ */ // ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* // TAO and the TAO IDL Compiler have been developed by the Center for -- cgit v1.2.1