diff options
Diffstat (limited to 'TAO/tao/CONV_FRAMEC.cpp')
-rw-r--r-- | TAO/tao/CONV_FRAMEC.cpp | 234 |
1 files changed, 87 insertions, 147 deletions
diff --git a/TAO/tao/CONV_FRAMEC.cpp b/TAO/tao/CONV_FRAMEC.cpp index 8b4978ab66a..c9f880f52c1 100644 --- a/TAO/tao/CONV_FRAMEC.cpp +++ b/TAO/tao/CONV_FRAMEC.cpp @@ -24,6 +24,27 @@ #include "tao/CONV_FRAMEC.i" #endif /* !defined INLINE */ +void +CONV_FRAME::CodeSetComponent::_tao_any_destructor (void* x) +{ + CONV_FRAME::CodeSetComponent *tmp = ACE_static_cast(CONV_FRAME::CodeSetComponent*,x); + delete tmp; +} + +void +CONV_FRAME::CodeSetComponentInfo::_tao_any_destructor (void* x) +{ + CONV_FRAME::CodeSetComponentInfo *tmp = ACE_static_cast(CONV_FRAME::CodeSetComponentInfo*,x); + delete tmp; +} + +void +CONV_FRAME::CodeSetContext::_tao_any_destructor (void* x) +{ + CONV_FRAME::CodeSetContext *tmp = ACE_static_cast(CONV_FRAME::CodeSetContext*,x); + delete tmp; +} + static const CORBA::Long _oc_CONV_FRAME_CodeSetId[] = { TAO_ENCAP_BYTE_ORDER, // byte order @@ -269,52 +290,27 @@ TAO_NAMESPACE_END void operator<<= (CORBA::Any &_tao_any, const CONV_FRAME::CodeSetComponent &_tao_elem) // copying { - CONV_FRAME::CodeSetComponent *_any_val = 0; - ACE_NEW (_any_val, CONV_FRAME::CodeSetComponent (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << *_any_val; - _tao_any._tao_replace ( - CONV_FRAME::_tc_CodeSetComponent, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + CONV_FRAME::_tc_CodeSetComponent, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } void operator<<= (CORBA::Any &_tao_any, CONV_FRAME::CodeSetComponent *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - CONV_FRAME::_tc_CodeSetComponent, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + CONV_FRAME::_tc_CodeSetComponent, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + CONV_FRAME::CodeSetComponent::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetComponent *&_tao_elem) @@ -346,9 +342,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetCompo CONV_FRAME::_tc_CodeSetComponent, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CONV_FRAME::CodeSetComponent::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -362,7 +357,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetCompo { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -396,10 +391,9 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSe ((CORBA::Any *)&_tao_any)->_tao_replace ( CONV_FRAME::_tc_CodeSetComponent, 1, - ACE_reinterpret_cast (void *, ACE_const_cast (CONV_FRAME::CodeSetComponent *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; + ACE_const_cast (CONV_FRAME::CodeSetComponent *&, _tao_elem), + CONV_FRAME::CodeSetComponent::_tao_any_destructor + ); return 1; } else @@ -413,7 +407,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSe { delete ACE_const_cast (CONV_FRAME::CodeSetComponent *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -421,52 +415,27 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSe void operator<<= (CORBA::Any &_tao_any, const CONV_FRAME::CodeSetComponentInfo &_tao_elem) // copying { - CONV_FRAME::CodeSetComponentInfo *_any_val = 0; - ACE_NEW (_any_val, CONV_FRAME::CodeSetComponentInfo (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << *_any_val; - _tao_any._tao_replace ( - CONV_FRAME::_tc_CodeSetComponentInfo, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + CONV_FRAME::_tc_CodeSetComponentInfo, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } void operator<<= (CORBA::Any &_tao_any, CONV_FRAME::CodeSetComponentInfo *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - CONV_FRAME::_tc_CodeSetComponentInfo, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + CONV_FRAME::_tc_CodeSetComponentInfo, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + CONV_FRAME::CodeSetComponentInfo::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetComponentInfo *&_tao_elem) @@ -498,9 +467,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetCompo CONV_FRAME::_tc_CodeSetComponentInfo, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CONV_FRAME::CodeSetComponentInfo::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -514,7 +482,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetCompo { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -549,9 +517,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSe CONV_FRAME::_tc_CodeSetComponentInfo, 1, ACE_reinterpret_cast (void *, ACE_const_cast (CONV_FRAME::CodeSetComponentInfo *&, _tao_elem)), - ACE_TRY_ENV + CONV_FRAME::CodeSetComponentInfo::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -565,7 +532,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSe { delete ACE_const_cast (CONV_FRAME::CodeSetComponentInfo *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -573,52 +540,27 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSe void operator<<= (CORBA::Any &_tao_any, const CONV_FRAME::CodeSetContext &_tao_elem) // copying { - CONV_FRAME::CodeSetContext *_any_val = 0; - ACE_NEW (_any_val, CONV_FRAME::CodeSetContext (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << *_any_val; - _tao_any._tao_replace ( - CONV_FRAME::_tc_CodeSetContext, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + CONV_FRAME::_tc_CodeSetContext, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } void operator<<= (CORBA::Any &_tao_any, CONV_FRAME::CodeSetContext *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - CONV_FRAME::_tc_CodeSetContext, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + CONV_FRAME::_tc_CodeSetContext, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + CONV_FRAME::CodeSetContext::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetContext *&_tao_elem) @@ -650,9 +592,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetConte CONV_FRAME::_tc_CodeSetContext, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CONV_FRAME::CodeSetContext::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -666,7 +607,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetConte { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -701,9 +642,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSe CONV_FRAME::_tc_CodeSetContext, 1, ACE_reinterpret_cast (void *, ACE_const_cast (CONV_FRAME::CodeSetContext *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; + CONV_FRAME::CodeSetContext::_tao_any_destructor + ); return 1; } else @@ -717,7 +657,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSe { delete ACE_const_cast (CONV_FRAME::CodeSetContext *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; |