diff options
-rw-r--r-- | TAO/ChangeLog | 14 | ||||
-rw-r--r-- | TAO/tao/OctetSeqC.cpp | 64 | ||||
-rw-r--r-- | TAO/tao/OctetSeqC.h | 34 | ||||
-rw-r--r-- | TAO/tao/PortableServer/PortableServerC.cpp | 7 | ||||
-rw-r--r-- | TAO/tao/diffs/OctetSeq.diff | 106 |
5 files changed, 99 insertions, 126 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index f82811ca056..0d05aef4919 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,17 @@ +Thu Jun 12 14:05:56 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> + + * tao/OctetSeqC.h: + * tao/OctetSeqC.cpp: + * tao/OctetSeqC.i: Regenerated code for OctetSeq due to the change + "Tue Jun 10 10:05:34 2003 Jeff Parsons + <j.parsons@vanderbilt.edu>". + + * tao/diffs/OctetSeq.diff: Updated the diffs. + + * tao/PortableServer/PortableServerC.h: Removed duplicate + instantiations of Any_Dual_Impl_T<>. Thanks to Rob Andzik for + pointing this out. + Thu Jun 12 10:46:36 2003 Jeff Parsons <j.parsons@vanderbilt.edu> * orbsvcs/orbsvcs/IFRService/HomeDef_i.cpp: diff --git a/TAO/tao/OctetSeqC.cpp b/TAO/tao/OctetSeqC.cpp index dc8fa6b7ffa..e39a15c03d7 100644 --- a/TAO/tao/OctetSeqC.cpp +++ b/TAO/tao/OctetSeqC.cpp @@ -26,20 +26,11 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html // TAO_IDL - Generated from -// be/be_codegen.cpp:314 - +// be/be_codegen.cpp:351 #include "OctetSeqC.h" -#include "tao/Stub.h" -#include "tao/Invocation.h" -#include "tao/PortableInterceptor.h" -#include "Any_Dual_Impl_T.h" +#include "ORB_Core.h" -#if TAO_HAS_INTERCEPTORS == 1 -#include "tao/RequestInfo_Util.h" -#include "tao/ClientRequestInfo_i.h" -#include "tao/ClientInterceptorAdapter.h" -#endif /* TAO_HAS_INTERCEPTORS == 1 */ #if defined (__BORLANDC__) @@ -50,6 +41,9 @@ #include "OctetSeqC.i" #endif /* !defined INLINE */ +// TAO_IDL - Generated from +// be/be_visitor_sequence/sequence_cs.cpp:72 + #if !defined (_CORBA_OCTETSEQ_CS_) #define _CORBA_OCTETSEQ_CS_ @@ -258,7 +252,7 @@ CORBA::Boolean operator>>= ( #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ // TAO_IDL - Generated from -// be/be_visitor_sequence/cdr_op_cs.cpp:80 +// be/be_visitor_sequence/cdr_op_cs.cpp:105 #if !defined _TAO_CDR_OP_CORBA_OctetSeq_CPP_ #define _TAO_CDR_OP_CORBA_OctetSeq_CPP_ @@ -273,15 +267,21 @@ CORBA::Boolean operator<< ( if (strm << _tao_seq_len) { // Encode all elements. - CORBA::Boolean _tao_marshal_flag = 1; - for (CORBA::ULong i = 0; i < _tao_seq_len && _tao_marshal_flag; ++i) - { - _tao_marshal_flag = - (strm << CORBA::Any::from_octet (_tao_sequence[i])); - } +#if (TAO_NO_COPY_OCTET_SEQUENCES == 1) + { + TAO_Unbounded_Sequence<CORBA::Octet> *oseq = + ACE_static_cast (TAO_Unbounded_Sequence<CORBA::Octet>*, (CORBA::OctetSeq *)&_tao_sequence); + if (oseq->mb ()) + return strm.write_octet_array_mb (oseq->mb ()); + else + return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); + } - return _tao_marshal_flag; +#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */ + return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); + +#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */ } return 0; @@ -314,15 +314,29 @@ CORBA::Boolean operator>> ( } // Retrieve all the elements. - CORBA::Boolean _tao_marshal_flag = 1; - for (CORBA::ULong i = 0; i < _tao_seq_len && _tao_marshal_flag; ++i) +#if (TAO_NO_COPY_OCTET_SEQUENCES == 1) + if (ACE_BIT_DISABLED (strm.start ()->flags (), + ACE_Message_Block::DONT_DELETE)) + { + TAO_ORB_Core* orb_core = strm.orb_core (); + if (orb_core != 0 && + strm.orb_core ()->resource_factory ()-> + input_cdr_allocator_type_locked () == 1) { - _tao_marshal_flag = - (strm >> CORBA::Any::to_octet (_tao_sequence[i])); + TAO_Unbounded_Sequence<CORBA::Octet> *oseq = + ACE_static_cast(TAO_Unbounded_Sequence<CORBA::Octet>*, &_tao_sequence); + oseq->replace (_tao_seq_len, strm.start ()); + oseq->mb ()->wr_ptr (oseq->mb()->rd_ptr () + _tao_seq_len); + strm.skip_bytes (_tao_seq_len); + return 1; } - - return _tao_marshal_flag; + } + return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len); +#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */ + return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); + +#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */ } diff --git a/TAO/tao/OctetSeqC.h b/TAO/tao/OctetSeqC.h index f8ed3e7937d..043b25cafe9 100644 --- a/TAO/tao/OctetSeqC.h +++ b/TAO/tao/OctetSeqC.h @@ -27,10 +27,11 @@ // TAO_IDL - Generated from // be/be_codegen.cpp:151 -#ifndef _TAO_IDL_ORIG_OCTETSEQC_H_ -#define _TAO_IDL_ORIG_OCTETSEQC_H_ + +#ifndef _TAO_IDL_ORIG__OCTETSEQC_H_ +#define _TAO_IDL_ORIG__OCTETSEQC_H_ #include "ace/pre.h" -#include "tao/Sequence.h" +#include "tao/corbafwd.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -38,6 +39,8 @@ #include "tao/Seq_Var_T.h" #include "tao/Seq_Out_T.h" +#include "tao/Sequence.h" + #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO @@ -67,22 +70,22 @@ TAO_NAMESPACE CORBA { - + // TAO_IDL - Generated from - // be/be_visitor_sequence/sequence_ch.cpp:89 + // be/be_visitor_sequence/sequence_ch.cpp:100 #if !defined (_CORBA_OCTETSEQ_CH_) #define _CORBA_OCTETSEQ_CH_ - + class OctetSeq; - + typedef TAO_FixedSeq_Var_T< OctetSeq, CORBA::Octet > OctetSeq_var; - + typedef TAO_Seq_Out_T< OctetSeq, @@ -90,7 +93,7 @@ TAO_NAMESPACE CORBA CORBA::Octet > OctetSeq_out; - + class TAO_Export OctetSeq : public TAO_Unbounded_Sequence< @@ -103,14 +106,14 @@ TAO_NAMESPACE CORBA OctetSeq ( CORBA::ULong max, CORBA::ULong length, - CORBA::Octet* buffer, + CORBA::Octet* buffer, CORBA::Boolean release = 0 ); OctetSeq (const OctetSeq &); ~OctetSeq (void); - + static void _tao_any_destructor (void *); - + typedef OctetSeq_var _var_type; #if (TAO_NO_COPY_OCTET_SEQUENCES == 1) @@ -123,10 +126,10 @@ TAO_NAMESPACE CORBA }; #endif /* end #if !defined */ - + // TAO_IDL - Generated from // be/be_visitor_typecode/typecode_decl.cpp:44 - + TAO_NAMESPACE_STORAGE_CLASS ::CORBA::TypeCode_ptr _tc_OctetSeq; // TAO_IDL - Generated from @@ -171,7 +174,7 @@ TAO_Export CORBA::Boolean operator>> ( #endif /* __ACE_INLINE__ */ // TAO_IDL - Generated from -// be/be_codegen.cpp:1018 +// be/be_codegen.cpp:1055 #if defined (__ACE_INLINE__) #include "OctetSeqC.i" @@ -187,3 +190,4 @@ TAO_Export CORBA::Boolean operator>> ( #include "ace/post.h" #endif /* ifndef */ + diff --git a/TAO/tao/PortableServer/PortableServerC.cpp b/TAO/tao/PortableServer/PortableServerC.cpp index 1e8d522fcb4..5c625c2ca39 100644 --- a/TAO/tao/PortableServer/PortableServerC.cpp +++ b/TAO/tao/PortableServer/PortableServerC.cpp @@ -6255,13 +6255,6 @@ CORBA::Boolean operator>>= ( # pragma instantiate TAO::Any_Dual_Impl_T<PortableServer::POAList> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ - defined (ACE_HAS_GNU_REPO) - template class TAO::Any_Dual_Impl_T<PortableServer::ObjectId>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -# pragma instantiate TAO::Any_Dual_Impl_T<PortableServer::ObjectId> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - #if (TAO_HAS_MINIMUM_CORBA == 0) // TAO_IDL - Generated from diff --git a/TAO/tao/diffs/OctetSeq.diff b/TAO/tao/diffs/OctetSeq.diff index d448ba6dd43..c022ee29455 100644 --- a/TAO/tao/diffs/OctetSeq.diff +++ b/TAO/tao/diffs/OctetSeq.diff @@ -1,98 +1,46 @@ ---- orig/OctetSeqC.h 2003-04-25 22:07:24.000000000 -0500 -+++ OctetSeqC.h 2003-04-25 21:48:43.000000000 -0500 -@@ -27,20 +27,17 @@ +--- orig/OctetSeqC.h 2003-06-12 11:42:16.000000000 -0500 ++++ OctetSeqC.h 2003-06-12 11:44:18.000000000 -0500 +@@ -30,17 +30,17 @@ - // TAO_IDL - Generated from - // be/be_codegen.cpp:151 -- - #ifndef _TAO_IDL_ORIG_OCTETSEQC_H_ - #define _TAO_IDL_ORIG_OCTETSEQC_H_ + #ifndef _TAO_IDL_ORIG__OCTETSEQC_H_ + #define _TAO_IDL_ORIG__OCTETSEQC_H_ - #include "ace/pre.h" - -#include "tao/corba.h" -+#include "tao/Sequence.h" ++#include "tao/corbafwd.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -- --#include "tao/corbafwd.h" +#include "tao/Seq_Var_T.h" +#include "tao/Seq_Out_T.h" ++#include "tao/Sequence.h" + +-#include "tao/corbafwd.h" #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO -@@ -70,22 +67,22 @@ - - TAO_NAMESPACE CORBA - { -- -+ - // TAO_IDL - Generated from - // be/be_visitor_sequence/sequence_ch.cpp:89 - - #if !defined (_CORBA_OCTETSEQ_CH_) - #define _CORBA_OCTETSEQ_CH_ -- -+ - class OctetSeq; -- -+ - typedef - TAO_FixedSeq_Var_T< - OctetSeq, - CORBA::Octet - > - OctetSeq_var; -- -+ - typedef - TAO_Seq_Out_T< - OctetSeq, -@@ -93,7 +90,7 @@ - CORBA::Octet - > - OctetSeq_out; -- -+ - class TAO_Export OctetSeq - : public - TAO_Unbounded_Sequence< -@@ -106,14 +103,14 @@ - OctetSeq ( - CORBA::ULong max, - CORBA::ULong length, -- CORBA::Octet* buffer, -+ CORBA::Octet* buffer, - CORBA::Boolean release = 0 - ); - OctetSeq (const OctetSeq &); - ~OctetSeq (void); -- -+ - static void _tao_any_destructor (void *); -- -+ - typedef OctetSeq_var _var_type; - - #if (TAO_NO_COPY_OCTET_SEQUENCES == 1) -@@ -126,10 +123,10 @@ - }; +--- orig/OctetSeqC.cpp 2003-06-12 11:42:16.000000000 -0500 ++++ OctetSeqC.cpp 2003-06-12 12:36:18.000000000 -0500 +@@ -28,17 +28,9 @@ + // TAO_IDL - Generated from + // be/be_codegen.cpp:351 - #endif /* end #if !defined */ -- -+ - // TAO_IDL - Generated from - // be/be_visitor_typecode/typecode_decl.cpp:44 -- +- + #include "OctetSeqC.h" +-#include "tao/Stub.h" +-#include "tao/Invocation.h" +-#include "tao/PortableInterceptor.h" +- +-#if TAO_HAS_INTERCEPTORS == 1 +-#include "tao/RequestInfo_Util.h" +-#include "tao/ClientRequestInfo_i.h" +-#include "tao/ClientInterceptorAdapter.h" +-#endif /* TAO_HAS_INTERCEPTORS == 1 */ ++#include "ORB_Core.h" + - TAO_NAMESPACE_STORAGE_CLASS ::CORBA::TypeCode_ptr _tc_OctetSeq; - // TAO_IDL - Generated from -@@ -190,4 +187,3 @@ - #include "ace/post.h" - #endif /* ifndef */ -- + #if defined (__BORLANDC__) |