diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-07-28 15:55:43 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-07-28 15:55:43 +0000 |
commit | ec8cc5a39d34fcbf4d0991fe6446dd509aeb1ab3 (patch) | |
tree | c0479ceb71cb7d3bb5bf04a69b02852e24133cee | |
parent | bb113fd1e968db9613b96bf25e246645bd41e9fd (diff) | |
download | ATCD-ec8cc5a39d34fcbf4d0991fe6446dd509aeb1ab3.tar.gz |
ChangeLogTag: Mon Jul 28 10:48:49 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 25 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp | 31 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/Any_Dual_Impl_T.cpp | 27 | ||||
-rw-r--r-- | TAO/tao/Any_Dual_Impl_T.inl | 8 |
5 files changed, 64 insertions, 31 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 268ac890494..4f3b8389bd9 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,28 @@ +Mon Jul 28 10:48:49 2003 Jeff Parsons <j.parsons@vanderbilt.edu> + + * TAO_IDL/be/be_visitor_exception/any_op_cs.cpp: + + Added generation of specialization for the + TAO::Any_Dual_Impl_T<...>::demarshal_value method, for + user exceptions. Bala will soon check in a specialization + of the entire class for system exceptions. + + * TAO_IDL/be/be_visitor_exception/exception_ch.cpp: + + Removed the '_NOT_USED' part of environment variable for + _tao_decode and _tao_encode methods. The implementation of + both these methods may throw CORBA::MARSHAL. + + * tao/Any_Dual_Impl_T.cpp: + * tao/Any_Dual_Impl_T.inl: + + Reverted my changes to the demarshal_value method in + + Thu Jul 24 11:35:31 2003 Jeff Parsons <j.parsons@vanderbilt.edu> + + since we now have an alternate approach in the changes + described above. + Mon Jul 28 10:13:30 2003 Jeff Parsons <j.parsons@vanderbilt.edu> * be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp: diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp index 4437767b344..f330d3ecb05 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp @@ -47,11 +47,38 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from " << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + << "// " << __FILE__ << ":" << __LINE__; + + *os << be_nl << be_nl + << "ACE_TEMPLATE_SPECIALIZATION" << be_nl + << "CORBA::Boolean" << be_nl + << "TAO::Any_Dual_Impl_T<" << node->name () + << ">::demarshal_value (" << be_idt << be_idt_nl + << "TAO_InputCDR & cdr" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "CORBA::String_var id;" << be_nl << be_nl + << "if ((cdr >> id.out ()) == 0)" << be_idt_nl + << "{" << be_idt_nl + << "return 0;" << be_uidt_nl + << "}" << be_uidt_nl << be_nl + << "ACE_TRY_NEW_ENV" << be_idt_nl + << "{" << be_idt_nl + << "this->value_->_tao_decode (cdr ACE_ENV_ARG_PARAMETER);" << be_nl + << "ACE_TRY_CHECK;" << be_uidt_nl + << "}" << be_uidt_nl + << "ACE_CATCHANY" << be_idt_nl + << "{" << be_idt_nl + << "return 0;" << be_uidt_nl + << "}" << be_uidt_nl + << "ACE_ENDTRY;" << be_nl << be_nl + << "return 1;" << be_uidt_nl + << "}"; // Copying insertion operator. - *os << "// Copying insertion." << be_nl + *os << be_nl << be_nl + << "// Copying insertion." << be_nl << "void operator<<= (" << be_idt << be_idt_nl << "CORBA::Any &_tao_any," << be_nl << "const " << node->name () << " &_tao_elem" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp index 00312fe9793..15718142328 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp @@ -96,11 +96,11 @@ int be_visitor_exception_ch::visit_exception (be_exception *node) << "virtual void _raise (void);\n" << be_nl << "virtual void _tao_encode (" << be_idt << be_idt_nl << "TAO_OutputCDR &" << be_nl - << "ACE_ENV_ARG_DECL_NOT_USED" << be_uidt_nl + << "ACE_ENV_ARG_DECL" << be_uidt_nl << ") const;" << be_uidt_nl << be_nl << "virtual void _tao_decode (" << be_idt << be_idt_nl << "TAO_InputCDR &" << be_nl - << "ACE_ENV_ARG_DECL_NOT_USED" << be_uidt_nl + << "ACE_ENV_ARG_DECL" << be_uidt_nl << ");" << be_uidt; // Generate constructor that takes each member as a parameter. We need a diff --git a/TAO/tao/Any_Dual_Impl_T.cpp b/TAO/tao/Any_Dual_Impl_T.cpp index 0e47f4ad9ff..374308fe3de 100644 --- a/TAO/tao/Any_Dual_Impl_T.cpp +++ b/TAO/tao/Any_Dual_Impl_T.cpp @@ -178,33 +178,6 @@ TAO::Any_Dual_Impl_T<T>::free_value (void) } template<typename T> -CORBA::Boolean -TAO::Any_Dual_Impl_T<T>::demarshal_value (TAO_InputCDR &cdr) -{ - CORBA::TCKind kind = - ACE_static_cast (CORBA::TCKind, this->type_->kind_); - - if (kind == CORBA::tk_except) - { - // If we are here, we must deal with the fact that the CDR - // operators for exceptions are not symmetrical - the - // insertion operator marshals the repository id, but the - // extraction operator does not demarshal it (the invocation - // class does that). Even if this Any is contained in an - // UnknownUserException, the Any was constructed with a - // message block that still contains the id string. - CORBA::String_var id; - - if ((cdr >> id.out ()) == 0) - { - return 0; - } - } - - return (cdr >> *this->value_); -} - -template<typename T> void TAO::Any_Dual_Impl_T<T>::_tao_decode (TAO_InputCDR &cdr ACE_ENV_ARG_DECL) diff --git a/TAO/tao/Any_Dual_Impl_T.inl b/TAO/tao/Any_Dual_Impl_T.inl index 82cf4358d88..bf3ecd90e33 100644 --- a/TAO/tao/Any_Dual_Impl_T.inl +++ b/TAO/tao/Any_Dual_Impl_T.inl @@ -10,6 +10,14 @@ TAO::Any_Dual_Impl_T<T>::marshal_value (TAO_OutputCDR &cdr) template<typename T> ACE_INLINE +CORBA::Boolean +TAO::Any_Dual_Impl_T<T>::demarshal_value (TAO_InputCDR &cdr) +{ + return (cdr >> *this->value_); +} + +template<typename T> +ACE_INLINE const void * TAO::Any_Dual_Impl_T<T>::value (void) const { |