diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-28 20:25:24 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-28 20:25:24 +0000 |
commit | 7072ce5e849fe27818e7dc4bfd3eaa4c4020db50 (patch) | |
tree | dfa736c22e776abb30b08df45f797e84050c20af | |
parent | 27a94c3be11ca08ea6082ad91ceff7c914f32d24 (diff) | |
download | ATCD-7072ce5e849fe27818e7dc4bfd3eaa4c4020db50.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/ChangeLog-99c | 13 | ||||
-rw-r--r-- | TAO/tao/DynAnyC.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/DynAnyC.h | 26 | ||||
-rw-r--r-- | TAO/tao/DynAnyC.i | 2 | ||||
-rw-r--r-- | TAO/tao/DynAny_i.cpp | 77 | ||||
-rw-r--r-- | TAO/tao/DynAny_i.h | 96 | ||||
-rw-r--r-- | TAO/tao/DynArray_i.cpp | 39 | ||||
-rw-r--r-- | TAO/tao/DynArray_i.h | 94 | ||||
-rw-r--r-- | TAO/tao/DynEnum_i.cpp | 14 | ||||
-rw-r--r-- | TAO/tao/DynEnum_i.h | 92 | ||||
-rw-r--r-- | TAO/tao/DynSequence_i.cpp | 39 | ||||
-rw-r--r-- | TAO/tao/DynSequence_i.h | 96 | ||||
-rw-r--r-- | TAO/tao/DynStruct_i.cpp | 39 | ||||
-rw-r--r-- | TAO/tao/DynStruct_i.h | 94 | ||||
-rw-r--r-- | TAO/tao/DynUnion_i.cpp | 114 | ||||
-rw-r--r-- | TAO/tao/DynUnion_i.h | 102 |
16 files changed, 468 insertions, 471 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index 7520f8c2d38..9ffeefd9656 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,16 @@ +Sun Mar 28 14:20:25 1999 Jeff Parsons <parsons@cs.wustl.edu> + + * tao/DynAnyC.{h,i,cpp}: + * tao/DynAny_i.{h,cpp}: + * tao/DynArray_i.{h,cpp}: + * tao/DynEnum_i.{h,cpp}: + * tao/DynSequence_i.{h,cpp}: + * tao/DynStruct_i.{h,cpp}: + * tao/DynUnion_i.{h,cpp}: + Changed over TAO_IN_ENV to ACE_TRY_ENV and + ACE_NEW_THROW_RETURN to ACE_NEW_THROW_EX/ACE_CHECK_RETURN. + Also replaced a few Any_ptr/delete pairs with Any_vars. + Sun Mar 28 11:39:36 1999 Nanbor Wang <nanbor@cs.wustl.edu> * examples/Simple/grid/Grid_Client_i.cpp: Added #include diff --git a/TAO/tao/DynAnyC.cpp b/TAO/tao/DynAnyC.cpp index 9f9ca33ae4e..f4140e06ee7 100644 --- a/TAO/tao/DynAnyC.cpp +++ b/TAO/tao/DynAnyC.cpp @@ -18,7 +18,7 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html // // -// Modified by Jeff Parsons <jp4@cs.wustl.edu> +// Modified by Jeff Parsons <parsons@cs.wustl.edu> // // ====================================================================== diff --git a/TAO/tao/DynAnyC.h b/TAO/tao/DynAnyC.h index e26ed3d1305..735b1c4807a 100644 --- a/TAO/tao/DynAnyC.h +++ b/TAO/tao/DynAnyC.h @@ -18,7 +18,7 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html // // -// Modified by Jeff Parsons <jp4@cs.wustl.edu> +// Modified by Jeff Parsons <parsons@cs.wustl.edu> // // ============================================================================ @@ -126,7 +126,7 @@ public: static CORBA_DynAny_ptr _duplicate (CORBA_DynAny_ptr obj); static CORBA_DynAny_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &TAO_IN_ENV = + CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); static CORBA_DynAny_ptr _nil (void); @@ -488,7 +488,7 @@ public: ); virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, - CORBA::Environment &TAO_IN_ENV = + CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); virtual const char* _interface_repository_id (void) const; @@ -590,7 +590,7 @@ public: static CORBA_DynEnum_ptr _duplicate (CORBA_DynEnum_ptr obj); static CORBA_DynEnum_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &TAO_IN_ENV = + CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); static CORBA_DynEnum_ptr _nil (void); @@ -615,7 +615,7 @@ public: ); virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, - CORBA::Environment &TAO_IN_ENV = + CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); virtual const char* _interface_repository_id (void) const; @@ -1083,7 +1083,7 @@ public: static CORBA_DynStruct_ptr _duplicate (CORBA_DynStruct_ptr obj); static CORBA_DynStruct_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &TAO_IN_ENV = + CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); static CORBA_DynStruct_ptr _nil (void); @@ -1107,7 +1107,7 @@ public: ); virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, - CORBA::Environment &TAO_IN_ENV = + CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); virtual const char* _interface_repository_id (void) const; @@ -1209,7 +1209,7 @@ public: static CORBA_DynUnion_ptr _duplicate (CORBA_DynUnion_ptr obj); static CORBA_DynUnion_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &TAO_IN_ENV = + CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); static CORBA_DynUnion_ptr _nil (void); @@ -1250,7 +1250,7 @@ public: ); virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, - CORBA::Environment &TAO_IN_ENV = + CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); virtual const char* _interface_repository_id (void) const; @@ -1651,7 +1651,7 @@ public: static CORBA_DynSequence_ptr _duplicate (CORBA_DynSequence_ptr obj); static CORBA_DynSequence_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &TAO_IN_ENV = + CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); static CORBA_DynSequence_ptr _nil (void); @@ -1676,7 +1676,7 @@ public: ); virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, - CORBA::Environment &TAO_IN_ENV = + CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); virtual const char* _interface_repository_id (void) const; @@ -1778,7 +1778,7 @@ public: static CORBA_DynArray_ptr _duplicate (CORBA_DynArray_ptr obj); static CORBA_DynArray_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &TAO_IN_ENV = + CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); static CORBA_DynArray_ptr _nil (void); @@ -1794,7 +1794,7 @@ public: ); virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, - CORBA::Environment &TAO_IN_ENV = + CORBA::Environment &ACE_TRY_ENV = CORBA::Environment::default_environment () ); virtual const char* _interface_repository_id (void) const; diff --git a/TAO/tao/DynAnyC.i b/TAO/tao/DynAnyC.i index d9f0423cba5..89dde7d1b3c 100644 --- a/TAO/tao/DynAnyC.i +++ b/TAO/tao/DynAnyC.i @@ -18,7 +18,7 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html // // -// Modified by Jeff Parsons <jp4@cs.wustl.edu> +// Modified by Jeff Parsons <parsons@cs.wustl.edu> // // ====================================================================== diff --git a/TAO/tao/DynAny_i.cpp b/TAO/tao/DynAny_i.cpp index f15ad5bb867..b6418e1b9d1 100644 --- a/TAO/tao/DynAny_i.cpp +++ b/TAO/tao/DynAny_i.cpp @@ -9,7 +9,7 @@ // DynAny_i.cpp // // = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> +// Jeff Parsons <parsons@cs.wustl.edu> // // ================================================================= @@ -520,23 +520,20 @@ TAO_DynAny_i::get_wchar (CORBA::Environment &env) CORBA::Any_ptr TAO_DynAny_i::get_any (CORBA::Environment& ACE_TRY_ENV) { - // @@ Jeff: Why don't you use CORBA_Any_var which will clean up the - // memory for you automatically? - CORBA_Any_ptr val; + CORBA_Any_var val; - ACE_NEW_THROW_EX (val, + ACE_NEW_THROW_EX (val.out (), CORBA_Any, CORBA::NO_MEMORY ()); ACE_CHECK_RETURN (0); - if (!(this->value_ >>= *val)) + if (!(this->value_ >>= *val.out ())) { - delete val; val = 0; ACE_THROW_RETURN (CORBA_DynAny::TypeMismatch (), 0); } - return val; + return val._retn (); } ////////////////////////////////////////////////////////////////////////// @@ -629,74 +626,74 @@ TAO_DynAny_i::create_dyn_any (const CORBA_Any& any, CORBA_DynAny_ptr TAO_DynAny_i::create_basic_dyn_any (CORBA_TypeCode_ptr tc, - CORBA::Environment& TAO_IN_ENV) + CORBA::Environment& ACE_TRY_ENV) { TAO_DynAny_i* dp; - ACE_NEW_THROW_RETURN (dp, - TAO_DynAny_i (tc), - CORBA::NO_MEMORY (), - CORBA_DynAny::_nil ()); - return dp->_this (TAO_IN_ENV); + ACE_NEW_THROW_EX (dp, + TAO_DynAny_i (tc), + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (CORBA_DynAny::_nil ()); + return dp->_this (ACE_TRY_ENV); } CORBA_DynStruct_ptr TAO_DynAny_i::create_dyn_struct (CORBA_TypeCode_ptr tc, - CORBA::Environment& TAO_IN_ENV) + CORBA::Environment& ACE_TRY_ENV) { TAO_DynStruct_i* dp; - ACE_NEW_THROW_RETURN (dp, - TAO_DynStruct_i (tc), - CORBA::NO_MEMORY (), - CORBA_DynStruct::_nil ()); - return dp->_this (TAO_IN_ENV); + ACE_NEW_THROW_EX (dp, + TAO_DynStruct_i (tc), + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (CORBA_DynStruct::_nil ()); + return dp->_this (ACE_TRY_ENV); } CORBA_DynSequence_ptr TAO_DynAny_i::create_dyn_sequence (CORBA_TypeCode_ptr tc, - CORBA::Environment& TAO_IN_ENV) + CORBA::Environment& ACE_TRY_ENV) { TAO_DynSequence_i* dp; - ACE_NEW_THROW_RETURN (dp, + ACE_NEW_THROW_EX (dp, TAO_DynSequence_i (tc), - CORBA::NO_MEMORY (), - CORBA_DynSequence::_nil ()); - return dp->_this (TAO_IN_ENV); + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (CORBA_DynSequence::_nil ()); + return dp->_this (ACE_TRY_ENV); } CORBA_DynArray_ptr TAO_DynAny_i::create_dyn_array (CORBA_TypeCode_ptr tc, - CORBA::Environment& TAO_IN_ENV) + CORBA::Environment& ACE_TRY_ENV) { TAO_DynArray_i* dp; - ACE_NEW_THROW_RETURN (dp, + ACE_NEW_THROW_EX (dp, TAO_DynArray_i (tc), - CORBA::NO_MEMORY (), - CORBA_DynArray::_nil ()); - return dp->_this (TAO_IN_ENV); + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (CORBA_DynArray::_nil ()); + return dp->_this (ACE_TRY_ENV); } CORBA_DynUnion_ptr TAO_DynAny_i::create_dyn_union (CORBA_TypeCode_ptr tc, - CORBA::Environment& TAO_IN_ENV) + CORBA::Environment& ACE_TRY_ENV) { TAO_DynUnion_i* dp; - ACE_NEW_THROW_RETURN (dp, + ACE_NEW_THROW_EX (dp, TAO_DynUnion_i (tc), - CORBA::NO_MEMORY (), - CORBA_DynUnion::_nil ()); - return dp->_this (TAO_IN_ENV); + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (CORBA_DynUnion::_nil ()); + return dp->_this (ACE_TRY_ENV); } CORBA_DynEnum_ptr TAO_DynAny_i::create_dyn_enum (CORBA_TypeCode_ptr tc, - CORBA::Environment& TAO_IN_ENV) + CORBA::Environment& ACE_TRY_ENV) { TAO_DynEnum_i* dp; - ACE_NEW_THROW_RETURN (dp, + ACE_NEW_THROW_EX (dp, TAO_DynEnum_i (tc), - CORBA::NO_MEMORY (), - CORBA_DynEnum::_nil ()); - return dp->_this (TAO_IN_ENV); + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (CORBA_DynEnum::_nil ()); + return dp->_this (ACE_TRY_ENV); } CORBA_DynAny_ptr diff --git a/TAO/tao/DynAny_i.h b/TAO/tao/DynAny_i.h index 63fe1e668bf..394b21fff78 100644 --- a/TAO/tao/DynAny_i.h +++ b/TAO/tao/DynAny_i.h @@ -9,7 +9,7 @@ // DynAny_i.h // // = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> +// Jeff Parsons <parsons@cs.wustl.edu> // // ========================================================================= @@ -44,26 +44,26 @@ public: // Functions common to all Dynamic Any types void assign (CORBA_DynAny_ptr dyn_any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Sets the value of the receiver to the value of the argument - CORBA_DynAny_ptr copy (CORBA::Environment &TAO_IN_ENV); + CORBA_DynAny_ptr copy (CORBA::Environment &ACE_TRY_ENV); // Creates a copy - void destroy (CORBA::Environment &TAO_IN_ENV); + void destroy (CORBA::Environment &ACE_TRY_ENV); // Makes sure the contents are disposed of correctly void from_any (const CORBA::Any& any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Assigns value from an Any argument - CORBA::Any_ptr to_any (CORBA::Environment &TAO_IN_ENV); + CORBA::Any_ptr to_any (CORBA::Environment &ACE_TRY_ENV); // Outputs contents as an Any CORBA::TypeCode_ptr type (CORBA::Environment &); // Returns the (constant) type - CORBA_DynAny_ptr current_component (CORBA::Environment &TAO_IN_ENV); + CORBA_DynAny_ptr current_component (CORBA::Environment &ACE_TRY_ENV); // In this class, there is only one CORBA::Boolean next (CORBA::Environment &); @@ -79,102 +79,102 @@ public: // Insert and get functions void insert_boolean (CORBA::Boolean value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_octet (CORBA::Octet value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_char (CORBA::Char value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_short (CORBA::Short value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ushort (CORBA::UShort value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_long (CORBA::Long value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ulong (CORBA::ULong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_float (CORBA::Float value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_double (CORBA::Double value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_string (const char * value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_reference (CORBA::Object_ptr value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_typecode (CORBA::TypeCode_ptr value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_longlong (CORBA::LongLong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ulonglong (CORBA::ULongLong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_wchar (CORBA::WChar value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_any (const CORBA::Any& value, - CORBA::Environment &TAO_IN_ENV); - CORBA::Boolean get_boolean (CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); + CORBA::Boolean get_boolean (CORBA::Environment &ACE_TRY_ENV); - CORBA::Octet get_octet (CORBA::Environment &TAO_IN_ENV); + CORBA::Octet get_octet (CORBA::Environment &ACE_TRY_ENV); - CORBA::Char get_char (CORBA::Environment &TAO_IN_ENV); + CORBA::Char get_char (CORBA::Environment &ACE_TRY_ENV); - CORBA::Short get_short (CORBA::Environment &TAO_IN_ENV); + CORBA::Short get_short (CORBA::Environment &ACE_TRY_ENV); - CORBA::UShort get_ushort (CORBA::Environment &TAO_IN_ENV); + CORBA::UShort get_ushort (CORBA::Environment &ACE_TRY_ENV); - CORBA::Long get_long (CORBA::Environment &TAO_IN_ENV); + CORBA::Long get_long (CORBA::Environment &ACE_TRY_ENV); - CORBA::ULong get_ulong (CORBA::Environment &TAO_IN_ENV); + CORBA::ULong get_ulong (CORBA::Environment &ACE_TRY_ENV); - CORBA::Float get_float (CORBA::Environment &TAO_IN_ENV); + CORBA::Float get_float (CORBA::Environment &ACE_TRY_ENV); - CORBA::Double get_double (CORBA::Environment &TAO_IN_ENV); + CORBA::Double get_double (CORBA::Environment &ACE_TRY_ENV); - char * get_string (CORBA::Environment &TAO_IN_ENV); + char * get_string (CORBA::Environment &ACE_TRY_ENV); - CORBA::Object_ptr get_reference (CORBA::Environment &TAO_IN_ENV); + CORBA::Object_ptr get_reference (CORBA::Environment &ACE_TRY_ENV); - CORBA::TypeCode_ptr get_typecode (CORBA::Environment &TAO_IN_ENV); + CORBA::TypeCode_ptr get_typecode (CORBA::Environment &ACE_TRY_ENV); - CORBA::LongLong get_longlong (CORBA::Environment &TAO_IN_ENV); + CORBA::LongLong get_longlong (CORBA::Environment &ACE_TRY_ENV); - CORBA::ULongLong get_ulonglong (CORBA::Environment &TAO_IN_ENV); + CORBA::ULongLong get_ulonglong (CORBA::Environment &ACE_TRY_ENV); - CORBA::WChar get_wchar (CORBA::Environment &TAO_IN_ENV); + CORBA::WChar get_wchar (CORBA::Environment &ACE_TRY_ENV); - CORBA::Any_ptr get_any (CORBA::Environment &TAO_IN_ENV); + CORBA::Any_ptr get_any (CORBA::Environment &ACE_TRY_ENV); // The ORB DynAny-factory functions will call these so we don't need to // keep an orb pointer in each DynAny object. static CORBA_DynAny_ptr create_dyn_any (const CORBA_Any& any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); static CORBA_DynAny_ptr create_basic_dyn_any (CORBA_TypeCode_ptr tc, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); static CORBA_DynStruct_ptr create_dyn_struct (CORBA_TypeCode_ptr tc, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); static CORBA_DynSequence_ptr create_dyn_sequence (CORBA_TypeCode_ptr tc, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); static CORBA_DynArray_ptr create_dyn_array (CORBA_TypeCode_ptr tc, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); static CORBA_DynUnion_ptr create_dyn_union (CORBA_TypeCode_ptr tc, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); static CORBA_DynEnum_ptr create_dyn_enum (CORBA_TypeCode_ptr tc, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // And an extra generic one (not required in the spec) // that calls one of the above passing a typecode. // Comes in handy in implementing some versions of current_component(). static CORBA_DynAny_ptr create_dyn_any (CORBA_TypeCode_ptr tc, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); static CORBA::TCKind unalias (CORBA_TypeCode_ptr tc, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Utility, in case we have tk_alias. private: diff --git a/TAO/tao/DynArray_i.cpp b/TAO/tao/DynArray_i.cpp index ffc622f93e2..8234be6f51e 100644 --- a/TAO/tao/DynArray_i.cpp +++ b/TAO/tao/DynArray_i.cpp @@ -9,7 +9,7 @@ // DynArray_i.cpp // // = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> +// Jeff Parsons <parsons@cs.wustl.edu> // // ==================================================================== @@ -104,7 +104,7 @@ TAO_DynArray_i::~TAO_DynArray_i (void) // Functions specific to DynArray AnySeq_ptr -TAO_DynArray_i::get_elements (CORBA::Environment& TAO_IN_ENV) +TAO_DynArray_i::get_elements (CORBA::Environment& ACE_TRY_ENV) { CORBA::ULong length = this->da_members_.size (); @@ -114,10 +114,10 @@ TAO_DynArray_i::get_elements (CORBA::Environment& TAO_IN_ENV) // Arg only sets maximum, so... AnySeq_ptr elements; - ACE_NEW_THROW_RETURN (elements, - AnySeq (length), - CORBA::NO_MEMORY (), - 0); + ACE_NEW_THROW_EX (elements, + AnySeq (length), + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (0); // ...we must do this explicitly. elements->length (length); @@ -125,9 +125,8 @@ TAO_DynArray_i::get_elements (CORBA::Environment& TAO_IN_ENV) // Initialize each Any. for (CORBA::ULong i = 0; i < length; i++) { - CORBA::Any_ptr temp = this->da_members_[i]->to_any (TAO_IN_ENV); - (*elements)[i] = *temp; - delete temp; + CORBA::Any_var temp = this->da_members_[i]->to_any (ACE_TRY_ENV); + (*elements)[i] = temp.in (); } return elements; @@ -249,23 +248,23 @@ TAO_DynArray_i::from_any (const CORBA_Any& any, } CORBA::Any_ptr -TAO_DynArray_i::to_any (CORBA::Environment& TAO_IN_ENV) +TAO_DynArray_i::to_any (CORBA::Environment& ACE_TRY_ENV) { TAO_OutputCDR out_cdr; - CORBA_TypeCode_ptr field_tc = this->get_element_type (TAO_IN_ENV); + CORBA_TypeCode_ptr field_tc = this->get_element_type (ACE_TRY_ENV); for (CORBA::ULong i = 0; i < this->da_members_.size (); i++) { // Each component must have been initialized. if (!this->da_members_[i].in ()) { - TAO_IN_ENV.exception (new CORBA_DynAny::Invalid); + ACE_TRY_ENV.exception (new CORBA_DynAny::Invalid); return 0; } // Recursive step - CORBA_Any_ptr field_any = this->da_members_[i]->to_any (TAO_IN_ENV); + CORBA_Any_var field_any = this->da_members_[i]->to_any (ACE_TRY_ENV); ACE_Message_Block* field_mb = field_any->_tao_get_cdr (); @@ -273,19 +272,17 @@ TAO_DynArray_i::to_any (CORBA::Environment& TAO_IN_ENV) out_cdr.append (field_tc, &field_cdr, - TAO_IN_ENV); - - delete field_any; + ACE_TRY_ENV); } TAO_InputCDR in_cdr (out_cdr); CORBA_Any* retval; - ACE_NEW_THROW_RETURN (retval, - CORBA_Any (this->type (TAO_IN_ENV), - in_cdr.start ()), - CORBA::NO_MEMORY (), - 0); + ACE_NEW_THROW_EX (retval, + CORBA_Any (this->type (ACE_TRY_ENV), + in_cdr.start ()), + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (0); return retval; } diff --git a/TAO/tao/DynArray_i.h b/TAO/tao/DynArray_i.h index e3b1d0522c1..f03e745669c 100644 --- a/TAO/tao/DynArray_i.h +++ b/TAO/tao/DynArray_i.h @@ -10,7 +10,7 @@ // DynArray_i.h // // = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> +// Jeff Parsons <parsons@cs.wustl.edu> // // =================================================================== @@ -49,118 +49,118 @@ public: // Assign/dump elements using IDL defined type AnySeq - AnySeq_ptr get_elements (CORBA::Environment &TAO_IN_ENV); + AnySeq_ptr get_elements (CORBA::Environment &ACE_TRY_ENV); void set_elements (const AnySeq& value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Functions common to all Dynamic Any types void assign (CORBA_DynAny_ptr dyn_any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Sets the value of the receiver to the value of the argument - CORBA_DynAny_ptr copy (CORBA::Environment &TAO_IN_ENV); + CORBA_DynAny_ptr copy (CORBA::Environment &ACE_TRY_ENV); // Creates a copy - void destroy (CORBA::Environment &TAO_IN_ENV); + void destroy (CORBA::Environment &ACE_TRY_ENV); // Makes sure the contents are disposed of correctly void from_any (const CORBA::Any& any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Assigns value from an Any argument - CORBA::Any_ptr to_any (CORBA::Environment &TAO_IN_ENV); + CORBA::Any_ptr to_any (CORBA::Environment &ACE_TRY_ENV); // Outputs contents as an Any - CORBA::TypeCode_ptr type (CORBA::Environment &TAO_IN_ENV); + CORBA::TypeCode_ptr type (CORBA::Environment &ACE_TRY_ENV); // Returns the (constant) type - CORBA_DynAny_ptr current_component (CORBA::Environment &TAO_IN_ENV); + CORBA_DynAny_ptr current_component (CORBA::Environment &ACE_TRY_ENV); // Used in iterating through the contents - CORBA::Boolean next (CORBA::Environment &TAO_IN_ENV); + CORBA::Boolean next (CORBA::Environment &ACE_TRY_ENV); // Returns next component CORBA::Boolean seek (CORBA::Long index, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Jump to component at <index> - void rewind (CORBA::Environment &TAO_IN_ENV); + void rewind (CORBA::Environment &ACE_TRY_ENV); // Makes first component the current one // Insert and get functions void insert_boolean (CORBA::Boolean value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_octet (CORBA::Octet value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_char (CORBA::Char value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_short (CORBA::Short value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ushort (CORBA::UShort value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_long (CORBA::Long value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ulong (CORBA::ULong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_float (CORBA::Float value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_double (CORBA::Double value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_string (const char * value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_reference (CORBA::Object_ptr value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_typecode (CORBA::TypeCode_ptr value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_longlong (CORBA::LongLong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ulonglong (CORBA::ULongLong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_wchar (CORBA::WChar value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_any (const CORBA::Any& value, - CORBA::Environment &TAO_IN_ENV); - CORBA::Boolean get_boolean (CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); + CORBA::Boolean get_boolean (CORBA::Environment &ACE_TRY_ENV); - CORBA::Octet get_octet (CORBA::Environment &TAO_IN_ENV); + CORBA::Octet get_octet (CORBA::Environment &ACE_TRY_ENV); - CORBA::Char get_char (CORBA::Environment &TAO_IN_ENV); + CORBA::Char get_char (CORBA::Environment &ACE_TRY_ENV); - CORBA::Short get_short (CORBA::Environment &TAO_IN_ENV); + CORBA::Short get_short (CORBA::Environment &ACE_TRY_ENV); - CORBA::UShort get_ushort (CORBA::Environment &TAO_IN_ENV); + CORBA::UShort get_ushort (CORBA::Environment &ACE_TRY_ENV); - CORBA::Long get_long (CORBA::Environment &TAO_IN_ENV); + CORBA::Long get_long (CORBA::Environment &ACE_TRY_ENV); - CORBA::ULong get_ulong (CORBA::Environment &TAO_IN_ENV); + CORBA::ULong get_ulong (CORBA::Environment &ACE_TRY_ENV); - CORBA::Float get_float (CORBA::Environment &TAO_IN_ENV); + CORBA::Float get_float (CORBA::Environment &ACE_TRY_ENV); - CORBA::Double get_double (CORBA::Environment &TAO_IN_ENV); + CORBA::Double get_double (CORBA::Environment &ACE_TRY_ENV); - char * get_string (CORBA::Environment &TAO_IN_ENV); + char * get_string (CORBA::Environment &ACE_TRY_ENV); - CORBA::Object_ptr get_reference (CORBA::Environment &TAO_IN_ENV); + CORBA::Object_ptr get_reference (CORBA::Environment &ACE_TRY_ENV); - CORBA::TypeCode_ptr get_typecode (CORBA::Environment &TAO_IN_ENV); + CORBA::TypeCode_ptr get_typecode (CORBA::Environment &ACE_TRY_ENV); - CORBA::LongLong get_longlong (CORBA::Environment &TAO_IN_ENV); + CORBA::LongLong get_longlong (CORBA::Environment &ACE_TRY_ENV); - CORBA::ULongLong get_ulonglong (CORBA::Environment &TAO_IN_ENV); + CORBA::ULongLong get_ulonglong (CORBA::Environment &ACE_TRY_ENV); - CORBA::WChar get_wchar (CORBA::Environment &TAO_IN_ENV); + CORBA::WChar get_wchar (CORBA::Environment &ACE_TRY_ENV); - CORBA::Any_ptr get_any (CORBA::Environment &TAO_IN_ENV); + CORBA::Any_ptr get_any (CORBA::Environment &ACE_TRY_ENV); private: - CORBA::TypeCode_ptr get_element_type (CORBA::Environment &TAO_IN_ENV); + CORBA::TypeCode_ptr get_element_type (CORBA::Environment &ACE_TRY_ENV); // Returns the type of elements contained in the array. CORBA::ULong get_arg_length (CORBA::TypeCode_ptr tc, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Gets the length of the array from the typecode CORBA::TypeCode_var type_; diff --git a/TAO/tao/DynEnum_i.cpp b/TAO/tao/DynEnum_i.cpp index bf4a5bd25dc..3df444c0a02 100644 --- a/TAO/tao/DynEnum_i.cpp +++ b/TAO/tao/DynEnum_i.cpp @@ -9,7 +9,7 @@ // DynEnum_i.cpp // // = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> +// Jeff Parsons <parsons@cs.wustl.edu> // // =================================================================== @@ -158,18 +158,18 @@ TAO_DynEnum_i::from_any (const CORBA_Any& any, } CORBA::Any_ptr -TAO_DynEnum_i::to_any (CORBA::Environment& TAO_IN_ENV) +TAO_DynEnum_i::to_any (CORBA::Environment& ACE_TRY_ENV) { TAO_OutputCDR out_cdr; out_cdr.write_ulong (this->value_); CORBA_Any* retval; - ACE_NEW_THROW_RETURN (retval, - CORBA_Any (this->type_.in (), - out_cdr.begin ()), - CORBA::NO_MEMORY (), - 0); + ACE_NEW_THROW_EX (retval, + CORBA_Any (this->type_.in (), + out_cdr.begin ()), + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (0); return retval; } diff --git a/TAO/tao/DynEnum_i.h b/TAO/tao/DynEnum_i.h index 09ec319c65c..5253f22187e 100644 --- a/TAO/tao/DynEnum_i.h +++ b/TAO/tao/DynEnum_i.h @@ -10,7 +10,7 @@ // DynEnum_i.h // // = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> +// Jeff Parsons <parsons@cs.wustl.edu> // // ======================================================================== @@ -48,49 +48,49 @@ public: // Functions specific to DynEnum // Get and set methods for enum's string and numeric value - char* value_as_string (CORBA::Environment &TAO_IN_ENV); + char* value_as_string (CORBA::Environment &ACE_TRY_ENV); void value_as_string (const char* value_as_string, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); CORBA::ULong value_as_ulong (CORBA::Environment&); void value_as_ulong (CORBA::ULong value_as_ulong, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Functions common to all Dynamic Any types void assign (CORBA_DynAny_ptr dyn_any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Sets the value of the receiver to the value of the argument - CORBA_DynAny_ptr copy (CORBA::Environment &TAO_IN_ENV); + CORBA_DynAny_ptr copy (CORBA::Environment &ACE_TRY_ENV); // Creates a copy - void destroy (CORBA::Environment &TAO_IN_ENV); + void destroy (CORBA::Environment &ACE_TRY_ENV); // Makes sure the contents are disposed of correctly void from_any (const CORBA::Any& any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Assigns value from an Any argument - CORBA::Any_ptr to_any (CORBA::Environment &TAO_IN_ENV); + CORBA::Any_ptr to_any (CORBA::Environment &ACE_TRY_ENV); // Outputs contents as an Any - CORBA::TypeCode_ptr type (CORBA::Environment &TAO_IN_ENV); + CORBA::TypeCode_ptr type (CORBA::Environment &ACE_TRY_ENV); // Returns the (constant) type - CORBA_DynAny_ptr current_component (CORBA::Environment &TAO_IN_ENV); + CORBA_DynAny_ptr current_component (CORBA::Environment &ACE_TRY_ENV); // Used in iterating through the contents - CORBA::Boolean next (CORBA::Environment &TAO_IN_ENV); + CORBA::Boolean next (CORBA::Environment &ACE_TRY_ENV); // Returns next component CORBA::Boolean seek (CORBA::Long index, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Jump to component at <index> - void rewind (CORBA::Environment &TAO_IN_ENV); + void rewind (CORBA::Environment &ACE_TRY_ENV); // Makes first component the current one // Insert and get functions @@ -99,68 +99,68 @@ public: // their presence, they will just throw an exception void insert_boolean (CORBA::Boolean value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_octet (CORBA::Octet value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_char (CORBA::Char value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_short (CORBA::Short value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ushort (CORBA::UShort value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_long (CORBA::Long value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ulong (CORBA::ULong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_float (CORBA::Float value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_double (CORBA::Double value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_string (const char * value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_reference (CORBA::Object_ptr value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_typecode (CORBA::TypeCode_ptr value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_longlong (CORBA::LongLong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ulonglong (CORBA::ULongLong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_wchar (CORBA::WChar value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_any (const CORBA::Any& value, - CORBA::Environment &TAO_IN_ENV); - CORBA::Boolean get_boolean (CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); + CORBA::Boolean get_boolean (CORBA::Environment &ACE_TRY_ENV); - CORBA::Octet get_octet (CORBA::Environment &TAO_IN_ENV); + CORBA::Octet get_octet (CORBA::Environment &ACE_TRY_ENV); - CORBA::Char get_char (CORBA::Environment &TAO_IN_ENV); + CORBA::Char get_char (CORBA::Environment &ACE_TRY_ENV); - CORBA::Short get_short (CORBA::Environment &TAO_IN_ENV); + CORBA::Short get_short (CORBA::Environment &ACE_TRY_ENV); - CORBA::UShort get_ushort (CORBA::Environment &TAO_IN_ENV); + CORBA::UShort get_ushort (CORBA::Environment &ACE_TRY_ENV); - CORBA::Long get_long (CORBA::Environment &TAO_IN_ENV); + CORBA::Long get_long (CORBA::Environment &ACE_TRY_ENV); - CORBA::ULong get_ulong (CORBA::Environment &TAO_IN_ENV); + CORBA::ULong get_ulong (CORBA::Environment &ACE_TRY_ENV); - CORBA::Float get_float (CORBA::Environment &TAO_IN_ENV); + CORBA::Float get_float (CORBA::Environment &ACE_TRY_ENV); - CORBA::Double get_double (CORBA::Environment &TAO_IN_ENV); + CORBA::Double get_double (CORBA::Environment &ACE_TRY_ENV); - char * get_string (CORBA::Environment &TAO_IN_ENV); + char * get_string (CORBA::Environment &ACE_TRY_ENV); - CORBA::Object_ptr get_reference (CORBA::Environment &TAO_IN_ENV); + CORBA::Object_ptr get_reference (CORBA::Environment &ACE_TRY_ENV); - CORBA::TypeCode_ptr get_typecode (CORBA::Environment &TAO_IN_ENV); + CORBA::TypeCode_ptr get_typecode (CORBA::Environment &ACE_TRY_ENV); - CORBA::LongLong get_longlong (CORBA::Environment &TAO_IN_ENV); + CORBA::LongLong get_longlong (CORBA::Environment &ACE_TRY_ENV); - CORBA::ULongLong get_ulonglong (CORBA::Environment &TAO_IN_ENV); + CORBA::ULongLong get_ulonglong (CORBA::Environment &ACE_TRY_ENV); - CORBA::WChar get_wchar (CORBA::Environment &TAO_IN_ENV); + CORBA::WChar get_wchar (CORBA::Environment &ACE_TRY_ENV); - CORBA::Any_ptr get_any (CORBA::Environment &TAO_IN_ENV); + CORBA::Any_ptr get_any (CORBA::Environment &ACE_TRY_ENV); private: CORBA::TypeCode_var type_; diff --git a/TAO/tao/DynSequence_i.cpp b/TAO/tao/DynSequence_i.cpp index 083cd3241cd..2fa61870277 100644 --- a/TAO/tao/DynSequence_i.cpp +++ b/TAO/tao/DynSequence_i.cpp @@ -9,7 +9,7 @@ // DynSequence_i.cpp // // = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> +// Jeff Parsons <parsons@cs.wustl.edu> // // =================================================================== @@ -113,7 +113,7 @@ TAO_DynSequence_i::length (CORBA::ULong length, } AnySeq_ptr -TAO_DynSequence_i::get_elements (CORBA::Environment& TAO_IN_ENV) +TAO_DynSequence_i::get_elements (CORBA::Environment& ACE_TRY_ENV) { CORBA::ULong length = this->da_members_.size (); @@ -121,10 +121,10 @@ TAO_DynSequence_i::get_elements (CORBA::Environment& TAO_IN_ENV) return 0; AnySeq_ptr elements; - ACE_NEW_THROW_RETURN (elements, - AnySeq (length), - CORBA::NO_MEMORY (), - 0); + ACE_NEW_THROW_EX (elements, + AnySeq (length), + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (0); // We must do this explicitly. elements->length (length); @@ -132,9 +132,8 @@ TAO_DynSequence_i::get_elements (CORBA::Environment& TAO_IN_ENV) // Initialize each Any. for (CORBA::ULong i = 0; i < length; i++) { - CORBA::Any_ptr temp = this->da_members_[i]->to_any (TAO_IN_ENV); - (*elements)[i] = *temp; - delete temp; + CORBA::Any_var temp = this->da_members_[i]->to_any (ACE_TRY_ENV); + (*elements)[i] = temp.in (); } return elements; @@ -266,25 +265,25 @@ TAO_DynSequence_i::from_any (const CORBA_Any& any, } CORBA::Any_ptr -TAO_DynSequence_i::to_any (CORBA::Environment& TAO_IN_ENV) +TAO_DynSequence_i::to_any (CORBA::Environment& ACE_TRY_ENV) { TAO_OutputCDR out_cdr; out_cdr.write_ulong (this->da_members_.size ()); - CORBA_TypeCode_ptr field_tc = this->get_element_type (TAO_IN_ENV); + CORBA_TypeCode_ptr field_tc = this->get_element_type (ACE_TRY_ENV); for (CORBA::ULong i = 0; i < this->da_members_.size (); i++) { // Each component must have been initialized. if (!this->da_members_[i].in ()) { - TAO_IN_ENV.exception (new CORBA_DynAny::Invalid); + ACE_TRY_ENV.exception (new CORBA_DynAny::Invalid); return 0; } // Recursive step - CORBA_Any_ptr field_any = this->da_members_[i]->to_any (TAO_IN_ENV); + CORBA_Any_var field_any = this->da_members_[i]->to_any (ACE_TRY_ENV); ACE_Message_Block* field_mb = field_any->_tao_get_cdr (); @@ -292,19 +291,17 @@ TAO_DynSequence_i::to_any (CORBA::Environment& TAO_IN_ENV) out_cdr.append (field_tc, &field_cdr, - TAO_IN_ENV); - - delete field_any; + ACE_TRY_ENV); } TAO_InputCDR in_cdr (out_cdr); CORBA_Any* retval; - ACE_NEW_THROW_RETURN (retval, - CORBA_Any (this->type (TAO_IN_ENV), - in_cdr.start ()), - CORBA::NO_MEMORY (), - 0); + ACE_NEW_THROW_EX (retval, + CORBA_Any (this->type (ACE_TRY_ENV), + in_cdr.start ()), + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (0); return retval; } diff --git a/TAO/tao/DynSequence_i.h b/TAO/tao/DynSequence_i.h index d80441d6c25..d22c8a060a4 100644 --- a/TAO/tao/DynSequence_i.h +++ b/TAO/tao/DynSequence_i.h @@ -10,7 +10,7 @@ // DynSequence_i.h // // = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> +// Jeff Parsons <parsons@cs.wustl.edu> // // =================================================================== @@ -49,121 +49,121 @@ public: // Get and set length of sequence - CORBA::ULong length (CORBA::Environment &TAO_IN_ENV); + CORBA::ULong length (CORBA::Environment &ACE_TRY_ENV); void length (CORBA::ULong length, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Assign and dump elements using IDL defined type AnySeq - AnySeq_ptr get_elements (CORBA::Environment &TAO_IN_ENV); + AnySeq_ptr get_elements (CORBA::Environment &ACE_TRY_ENV); void set_elements (const AnySeq& value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Functions common to all Dynamic Any types void assign (CORBA_DynAny_ptr dyn_any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Sets the value of the receiver to the value of the argument - CORBA_DynAny_ptr copy (CORBA::Environment &TAO_IN_ENV); + CORBA_DynAny_ptr copy (CORBA::Environment &ACE_TRY_ENV); // Creates a copy - void destroy (CORBA::Environment &TAO_IN_ENV); + void destroy (CORBA::Environment &ACE_TRY_ENV); // Makes sure the contents are disposed of correctly void from_any (const CORBA::Any& any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Assigns value from an Any argument - CORBA::Any_ptr to_any (CORBA::Environment &TAO_IN_ENV); + CORBA::Any_ptr to_any (CORBA::Environment &ACE_TRY_ENV); // Outputs contents as an Any - CORBA::TypeCode_ptr type (CORBA::Environment &TAO_IN_ENV); + CORBA::TypeCode_ptr type (CORBA::Environment &ACE_TRY_ENV); // Returns the (constant) type - CORBA_DynAny_ptr current_component (CORBA::Environment &TAO_IN_ENV); + CORBA_DynAny_ptr current_component (CORBA::Environment &ACE_TRY_ENV); // Used in iterating through the contents - CORBA::Boolean next (CORBA::Environment &TAO_IN_ENV); + CORBA::Boolean next (CORBA::Environment &ACE_TRY_ENV); // Returns next component CORBA::Boolean seek (CORBA::Long index, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Jump to component at <index> - void rewind (CORBA::Environment &TAO_IN_ENV); + void rewind (CORBA::Environment &ACE_TRY_ENV); // Makes first component the current one // Insert and get functions void insert_boolean (CORBA::Boolean value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_octet (CORBA::Octet value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_char (CORBA::Char value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_short (CORBA::Short value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ushort (CORBA::UShort value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_long (CORBA::Long value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ulong (CORBA::ULong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_float (CORBA::Float value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_double (CORBA::Double value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_string (const char * value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_reference (CORBA::Object_ptr value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_typecode (CORBA::TypeCode_ptr value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_longlong (CORBA::LongLong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ulonglong (CORBA::ULongLong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_wchar (CORBA::WChar value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_any (const CORBA::Any& value, - CORBA::Environment &TAO_IN_ENV); - CORBA::Boolean get_boolean (CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); + CORBA::Boolean get_boolean (CORBA::Environment &ACE_TRY_ENV); - CORBA::Octet get_octet (CORBA::Environment &TAO_IN_ENV); + CORBA::Octet get_octet (CORBA::Environment &ACE_TRY_ENV); - CORBA::Char get_char (CORBA::Environment &TAO_IN_ENV); + CORBA::Char get_char (CORBA::Environment &ACE_TRY_ENV); - CORBA::Short get_short (CORBA::Environment &TAO_IN_ENV); + CORBA::Short get_short (CORBA::Environment &ACE_TRY_ENV); - CORBA::UShort get_ushort (CORBA::Environment &TAO_IN_ENV); + CORBA::UShort get_ushort (CORBA::Environment &ACE_TRY_ENV); - CORBA::Long get_long (CORBA::Environment &TAO_IN_ENV); + CORBA::Long get_long (CORBA::Environment &ACE_TRY_ENV); - CORBA::ULong get_ulong (CORBA::Environment &TAO_IN_ENV); + CORBA::ULong get_ulong (CORBA::Environment &ACE_TRY_ENV); - CORBA::Float get_float (CORBA::Environment &TAO_IN_ENV); + CORBA::Float get_float (CORBA::Environment &ACE_TRY_ENV); - CORBA::Double get_double (CORBA::Environment &TAO_IN_ENV); + CORBA::Double get_double (CORBA::Environment &ACE_TRY_ENV); - char * get_string (CORBA::Environment &TAO_IN_ENV); + char * get_string (CORBA::Environment &ACE_TRY_ENV); - CORBA::Object_ptr get_reference (CORBA::Environment &TAO_IN_ENV); + CORBA::Object_ptr get_reference (CORBA::Environment &ACE_TRY_ENV); - CORBA::TypeCode_ptr get_typecode (CORBA::Environment &TAO_IN_ENV); + CORBA::TypeCode_ptr get_typecode (CORBA::Environment &ACE_TRY_ENV); - CORBA::LongLong get_longlong (CORBA::Environment &TAO_IN_ENV); + CORBA::LongLong get_longlong (CORBA::Environment &ACE_TRY_ENV); - CORBA::ULongLong get_ulonglong (CORBA::Environment &TAO_IN_ENV); + CORBA::ULongLong get_ulonglong (CORBA::Environment &ACE_TRY_ENV); - CORBA::WChar get_wchar (CORBA::Environment &TAO_IN_ENV); + CORBA::WChar get_wchar (CORBA::Environment &ACE_TRY_ENV); - CORBA::Any_ptr get_any (CORBA::Environment &TAO_IN_ENV); + CORBA::Any_ptr get_any (CORBA::Environment &ACE_TRY_ENV); private: - CORBA::TypeCode_ptr get_element_type (CORBA::Environment &TAO_IN_ENV); + CORBA::TypeCode_ptr get_element_type (CORBA::Environment &ACE_TRY_ENV); // Utility, turns the type of elements contained in the sequence. CORBA::TypeCode_var type_; diff --git a/TAO/tao/DynStruct_i.cpp b/TAO/tao/DynStruct_i.cpp index 626dbd3a4ce..24c833303b7 100644 --- a/TAO/tao/DynStruct_i.cpp +++ b/TAO/tao/DynStruct_i.cpp @@ -9,7 +9,7 @@ // DynStruct_i.cpp // // = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> +// Jeff Parsons <parsons@cs.wustl.edu> // // ==================================================================== @@ -116,15 +116,15 @@ TAO_DynStruct_i::current_member_kind (CORBA::Environment& env) } NameValuePairSeq* -TAO_DynStruct_i::get_members (CORBA::Environment& TAO_IN_ENV) +TAO_DynStruct_i::get_members (CORBA::Environment& ACE_TRY_ENV) { CORBA::ULong length = this->da_members_.size (); NameValuePairSeq* members; - ACE_NEW_THROW_RETURN (members, - NameValuePairSeq (length), - CORBA::NO_MEMORY (), - 0); + ACE_NEW_THROW_EX (members, + NameValuePairSeq (length), + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (0); // We must do this explicitly. members->length (length); @@ -135,9 +135,8 @@ TAO_DynStruct_i::get_members (CORBA::Environment& TAO_IN_ENV) (*members)[i].id = CORBA::string_dup (this->type_.in ()->member_name (i)); - CORBA::Any_ptr temp = this->da_members_[i]->to_any (TAO_IN_ENV); - (*members)[i].value = *temp; - delete temp; + CORBA::Any_var temp = this->da_members_[i]->to_any (ACE_TRY_ENV); + (*members)[i].value = temp.in (); } return members; @@ -251,7 +250,7 @@ TAO_DynStruct_i::from_any (const CORBA_Any& any, } CORBA::Any_ptr -TAO_DynStruct_i::to_any (CORBA::Environment& TAO_IN_ENV) +TAO_DynStruct_i::to_any (CORBA::Environment& ACE_TRY_ENV) { TAO_OutputCDR out_cdr; @@ -260,14 +259,14 @@ TAO_DynStruct_i::to_any (CORBA::Environment& TAO_IN_ENV) // Each component must have been initialied. if (!this->da_members_[i].in ()) { - TAO_IN_ENV.exception (new CORBA_DynAny::Invalid); + ACE_TRY_ENV.exception (new CORBA_DynAny::Invalid); return 0; } - CORBA_TypeCode_ptr field_tc = this->da_members_[i]->type (TAO_IN_ENV); + CORBA_TypeCode_ptr field_tc = this->da_members_[i]->type (ACE_TRY_ENV); // Recursive step - CORBA_Any_ptr field_any = this->da_members_[i]->to_any (TAO_IN_ENV); + CORBA_Any_var field_any = this->da_members_[i]->to_any (ACE_TRY_ENV); ACE_Message_Block* field_mb = field_any->_tao_get_cdr (); @@ -275,19 +274,17 @@ TAO_DynStruct_i::to_any (CORBA::Environment& TAO_IN_ENV) out_cdr.append (field_tc, &field_cdr, - TAO_IN_ENV); - - delete field_any; + ACE_TRY_ENV); } TAO_InputCDR in_cdr (out_cdr); CORBA_Any* retval; - ACE_NEW_THROW_RETURN (retval, - CORBA_Any (this->type (TAO_IN_ENV), - in_cdr.start ()), - CORBA::NO_MEMORY (), - 0); + ACE_NEW_THROW_EX (retval, + CORBA_Any (this->type (ACE_TRY_ENV), + in_cdr.start ()), + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (0); return retval; } diff --git a/TAO/tao/DynStruct_i.h b/TAO/tao/DynStruct_i.h index 90f5150588c..fa58914b68c 100644 --- a/TAO/tao/DynStruct_i.h +++ b/TAO/tao/DynStruct_i.h @@ -10,7 +10,7 @@ // DynStruct_i.h // // = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> +// Jeff Parsons <parsons@cs.wustl.edu> // // ======================================================================== @@ -47,118 +47,118 @@ public: // Functions specific to DynStruct - FieldName current_member_name (CORBA::Environment &TAO_IN_ENV); + FieldName current_member_name (CORBA::Environment &ACE_TRY_ENV); // FieldName is IDL typedef for string - CORBA::TCKind current_member_kind (CORBA::Environment &TAO_IN_ENV); + CORBA::TCKind current_member_kind (CORBA::Environment &ACE_TRY_ENV); // Assign and dump elements using IDL defined type NameValuePairSeq - NameValuePairSeq* get_members (CORBA::Environment &TAO_IN_ENV); + NameValuePairSeq* get_members (CORBA::Environment &ACE_TRY_ENV); void set_members (const NameValuePairSeq& value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Functions common to all Dynamic Any types void assign (CORBA_DynAny_ptr dyn_any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Sets the value of the receiver to the value of the argument - CORBA_DynAny_ptr copy (CORBA::Environment &TAO_IN_ENV); + CORBA_DynAny_ptr copy (CORBA::Environment &ACE_TRY_ENV); // Creates a copy - void destroy (CORBA::Environment &TAO_IN_ENV); + void destroy (CORBA::Environment &ACE_TRY_ENV); // Makes sure the contents are disposed of correctly void from_any (const CORBA::Any& any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Assigns value from an Any argument - CORBA::Any_ptr to_any (CORBA::Environment &TAO_IN_ENV); + CORBA::Any_ptr to_any (CORBA::Environment &ACE_TRY_ENV); // Outputs contents as an Any - CORBA::TypeCode_ptr type (CORBA::Environment &TAO_IN_ENV); + CORBA::TypeCode_ptr type (CORBA::Environment &ACE_TRY_ENV); // Returns the (constant) type - CORBA_DynAny_ptr current_component (CORBA::Environment &TAO_IN_ENV); + CORBA_DynAny_ptr current_component (CORBA::Environment &ACE_TRY_ENV); // Used in iterating through the contents - CORBA::Boolean next (CORBA::Environment &TAO_IN_ENV); + CORBA::Boolean next (CORBA::Environment &ACE_TRY_ENV); // Returns next component CORBA::Boolean seek (CORBA::Long index, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Jump to component at <index> - void rewind (CORBA::Environment &TAO_IN_ENV); + void rewind (CORBA::Environment &ACE_TRY_ENV); // Makes first component the current one // Insert and get functions void insert_boolean (CORBA::Boolean value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_octet (CORBA::Octet value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_char (CORBA::Char value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_short (CORBA::Short value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ushort (CORBA::UShort value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_long (CORBA::Long value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ulong (CORBA::ULong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_float (CORBA::Float value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_double (CORBA::Double value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_string (const char * value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_reference (CORBA::Object_ptr value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_typecode (CORBA::TypeCode_ptr value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_longlong (CORBA::LongLong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ulonglong (CORBA::ULongLong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_wchar (CORBA::WChar value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_any (const CORBA::Any& value, - CORBA::Environment &TAO_IN_ENV); - CORBA::Boolean get_boolean (CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); + CORBA::Boolean get_boolean (CORBA::Environment &ACE_TRY_ENV); - CORBA::Octet get_octet (CORBA::Environment &TAO_IN_ENV); + CORBA::Octet get_octet (CORBA::Environment &ACE_TRY_ENV); - CORBA::Char get_char (CORBA::Environment &TAO_IN_ENV); + CORBA::Char get_char (CORBA::Environment &ACE_TRY_ENV); - CORBA::Short get_short (CORBA::Environment &TAO_IN_ENV); + CORBA::Short get_short (CORBA::Environment &ACE_TRY_ENV); - CORBA::UShort get_ushort (CORBA::Environment &TAO_IN_ENV); + CORBA::UShort get_ushort (CORBA::Environment &ACE_TRY_ENV); - CORBA::Long get_long (CORBA::Environment &TAO_IN_ENV); + CORBA::Long get_long (CORBA::Environment &ACE_TRY_ENV); - CORBA::ULong get_ulong (CORBA::Environment &TAO_IN_ENV); + CORBA::ULong get_ulong (CORBA::Environment &ACE_TRY_ENV); - CORBA::Float get_float (CORBA::Environment &TAO_IN_ENV); + CORBA::Float get_float (CORBA::Environment &ACE_TRY_ENV); - CORBA::Double get_double (CORBA::Environment &TAO_IN_ENV); + CORBA::Double get_double (CORBA::Environment &ACE_TRY_ENV); - char * get_string (CORBA::Environment &TAO_IN_ENV); + char * get_string (CORBA::Environment &ACE_TRY_ENV); - CORBA::Object_ptr get_reference (CORBA::Environment &TAO_IN_ENV); + CORBA::Object_ptr get_reference (CORBA::Environment &ACE_TRY_ENV); - CORBA::TypeCode_ptr get_typecode (CORBA::Environment &TAO_IN_ENV); + CORBA::TypeCode_ptr get_typecode (CORBA::Environment &ACE_TRY_ENV); - CORBA::LongLong get_longlong (CORBA::Environment &TAO_IN_ENV); + CORBA::LongLong get_longlong (CORBA::Environment &ACE_TRY_ENV); - CORBA::ULongLong get_ulonglong (CORBA::Environment &TAO_IN_ENV); + CORBA::ULongLong get_ulonglong (CORBA::Environment &ACE_TRY_ENV); - CORBA::WChar get_wchar (CORBA::Environment &TAO_IN_ENV); + CORBA::WChar get_wchar (CORBA::Environment &ACE_TRY_ENV); - CORBA::Any_ptr get_any (CORBA::Environment &TAO_IN_ENV); + CORBA::Any_ptr get_any (CORBA::Environment &ACE_TRY_ENV); private: CORBA::TypeCode_var type_; diff --git a/TAO/tao/DynUnion_i.cpp b/TAO/tao/DynUnion_i.cpp index c7cff33b668..d1882cd0f86 100644 --- a/TAO/tao/DynUnion_i.cpp +++ b/TAO/tao/DynUnion_i.cpp @@ -9,7 +9,7 @@ // DynUnion_i.cpp // // = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> +// Jeff Parsons <parsons@cs.wustl.edu> // // ==================================================================== @@ -211,12 +211,12 @@ TAO_DynUnion_i::from_any (const CORBA_Any& any, } CORBA::Any_ptr -TAO_DynUnion_i::to_any (CORBA::Environment& TAO_IN_ENV) +TAO_DynUnion_i::to_any (CORBA::Environment& ACE_TRY_ENV) { // Both Dynanys must have been initialied. if (this->member_.in () == 0 || this->discriminator_.in () == 0) { - TAO_IN_ENV.exception (new CORBA_DynAny::Invalid); + ACE_TRY_ENV.exception (new CORBA_DynAny::Invalid); return 0; } @@ -224,9 +224,9 @@ TAO_DynUnion_i::to_any (CORBA::Environment& TAO_IN_ENV) // Add the discriminator to the CDR stream. - CORBA_TypeCode_ptr disc_tc = this->discriminator_->type (TAO_IN_ENV); + CORBA_TypeCode_ptr disc_tc = this->discriminator_->type (ACE_TRY_ENV); - CORBA_Any_ptr disc_any = this->discriminator_->to_any (TAO_IN_ENV); + CORBA_Any_var disc_any = this->discriminator_->to_any (ACE_TRY_ENV); ACE_Message_Block* disc_mb = disc_any->_tao_get_cdr (); @@ -234,15 +234,13 @@ TAO_DynUnion_i::to_any (CORBA::Environment& TAO_IN_ENV) out_cdr.append (disc_tc, &disc_cdr, - TAO_IN_ENV); - - delete disc_any; + ACE_TRY_ENV); // Add the member to the CDR stream. - CORBA_TypeCode_ptr member_tc = this->member_->type (TAO_IN_ENV); + CORBA_TypeCode_ptr member_tc = this->member_->type (ACE_TRY_ENV); - CORBA_Any_ptr member_any = this->member_->to_any (TAO_IN_ENV); + CORBA_Any_var member_any = this->member_->to_any (ACE_TRY_ENV); ACE_Message_Block* member_mb = member_any->_tao_get_cdr (); @@ -250,19 +248,17 @@ TAO_DynUnion_i::to_any (CORBA::Environment& TAO_IN_ENV) out_cdr.append (member_tc, &member_cdr, - TAO_IN_ENV); - - delete member_any; + ACE_TRY_ENV); // Make the Any. TAO_InputCDR in_cdr (out_cdr); CORBA_Any* retval; - ACE_NEW_THROW_RETURN (retval, - CORBA_Any (this->type (TAO_IN_ENV), - in_cdr.start ()), - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - 0); + ACE_NEW_THROW_EX (retval, + CORBA_Any (this->type (ACE_TRY_ENV), + in_cdr.start ()), + CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); return retval; } @@ -1264,77 +1260,77 @@ TAO_DynUnion_i::Enum_extractor::check_match (const CORBA_Any& inside_any, // Functor factory. DU_Extractor_base* TAO_DynUnion_i::get_extractor (CORBA::TCKind kind, - CORBA::Environment& TAO_IN_ENV) + CORBA::Environment& ACE_TRY_ENV) { DU_Extractor_base* retval; switch (kind) { case CORBA::tk_short: - ACE_NEW_THROW_RETURN (retval, - DU_Extractor<CORBA::Short>, - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - 0); + ACE_NEW_THROW_EX (retval, + DU_Extractor<CORBA::Short>, + CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); return retval; case CORBA::tk_long: - ACE_NEW_THROW_RETURN (retval, - DU_Extractor<CORBA::Long>, - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - 0); + ACE_NEW_THROW_EX (retval, + DU_Extractor<CORBA::Long>, + CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); return retval; case CORBA::tk_ushort: - ACE_NEW_THROW_RETURN (retval, - DU_Extractor<CORBA::UShort>, - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - 0); + ACE_NEW_THROW_EX (retval, + DU_Extractor<CORBA::UShort>, + CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); return retval; case CORBA::tk_ulong: - ACE_NEW_THROW_RETURN (retval, - DU_Extractor<CORBA::ULong>, - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - 0); + ACE_NEW_THROW_EX (retval, + DU_Extractor<CORBA::ULong>, + CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); return retval; case CORBA::tk_boolean: - ACE_NEW_THROW_RETURN (retval, - DU_Extractor<CORBA::Boolean>, - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - 0); + ACE_NEW_THROW_EX (retval, + DU_Extractor<CORBA::Boolean>, + CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); return retval; case CORBA::tk_char: - ACE_NEW_THROW_RETURN (retval, - DU_Extractor<CORBA::Char>, - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - 0); + ACE_NEW_THROW_EX (retval, + DU_Extractor<CORBA::Char>, + CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); return retval; // For platforms without native 64-bit ints . . . #if !defined (ACE_LACKS_LONGLONG_T) case CORBA::tk_longlong: - ACE_NEW_THROW_RETURN (retval, - DU_Extractor<CORBA::LongLong>, - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - 0); + ACE_NEW_THROW_EX (retval, + DU_Extractor<CORBA::LongLong>, + CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); return retval; #endif /* ACE_LACKS_LONGLONG_T */ case CORBA::tk_ulonglong: - ACE_NEW_THROW_RETURN (retval, - DU_Extractor<CORBA::ULongLong>, - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - 0); + ACE_NEW_THROW_EX (retval, + DU_Extractor<CORBA::ULongLong>, + CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); return retval; case CORBA::tk_wchar: - ACE_NEW_THROW_RETURN (retval, - WChar_extractor, - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - 0); + ACE_NEW_THROW_EX (retval, + WChar_extractor, + CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); return retval; case CORBA::tk_enum: - ACE_NEW_THROW_RETURN (retval, - Enum_extractor, - CORBA::NO_MEMORY (CORBA::COMPLETED_NO), - 0); + ACE_NEW_THROW_EX (retval, + Enum_extractor, + CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); return retval; default: return 0; diff --git a/TAO/tao/DynUnion_i.h b/TAO/tao/DynUnion_i.h index 0dd2ff6c4ec..744021ad40e 100644 --- a/TAO/tao/DynUnion_i.h +++ b/TAO/tao/DynUnion_i.h @@ -10,7 +10,7 @@ // DynUnion_i.h // // = AUTHOR -// Jeff Parsons <jp4@cs.wustl.edu> +// Jeff Parsons <parsons@cs.wustl.edu> // // ======================================================================== @@ -43,7 +43,7 @@ public: // Functions specific to DynUnion - CORBA::Boolean set_as_default (CORBA::Environment &TAO_IN_ENV); + CORBA::Boolean set_as_default (CORBA::Environment &ACE_TRY_ENV); // Does union have a default member? void set_as_default (CORBA::Boolean set_as_default, @@ -53,122 +53,122 @@ public: CORBA_DynAny_ptr discriminator (CORBA::Environment&); // Returns the discriminator (which is a DynAny) - CORBA::TCKind discriminator_kind (CORBA::Environment &TAO_IN_ENV); + CORBA::TCKind discriminator_kind (CORBA::Environment &ACE_TRY_ENV); // Returns TCKind of discriminator - CORBA_DynAny_ptr member (CORBA::Environment &TAO_IN_ENV); + CORBA_DynAny_ptr member (CORBA::Environment &ACE_TRY_ENV); // Returns active member // Get and set for member name - char* member_name (CORBA::Environment &TAO_IN_ENV); + char* member_name (CORBA::Environment &ACE_TRY_ENV); void member_name (const char* member_name, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); - CORBA::TCKind member_kind (CORBA::Environment &TAO_IN_ENV); + CORBA::TCKind member_kind (CORBA::Environment &ACE_TRY_ENV); // Returns TCKind of active member // Functions common to all Dynamic Any types void assign (CORBA_DynAny_ptr dyn_any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Sets the value of the receiver to the value of the argument - CORBA_DynAny_ptr copy (CORBA::Environment &TAO_IN_ENV); + CORBA_DynAny_ptr copy (CORBA::Environment &ACE_TRY_ENV); // Creates a copy - void destroy (CORBA::Environment &TAO_IN_ENV); + void destroy (CORBA::Environment &ACE_TRY_ENV); // Makes sure the contents are disposed of correctly void from_any (const CORBA::Any& any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Assigns value from an Any argument - CORBA::Any_ptr to_any (CORBA::Environment &TAO_IN_ENV); + CORBA::Any_ptr to_any (CORBA::Environment &ACE_TRY_ENV); // Outputs contents as an Any - CORBA::TypeCode_ptr type (CORBA::Environment &TAO_IN_ENV); + CORBA::TypeCode_ptr type (CORBA::Environment &ACE_TRY_ENV); // Returns the (constant) type - CORBA_DynAny_ptr current_component (CORBA::Environment &TAO_IN_ENV); + CORBA_DynAny_ptr current_component (CORBA::Environment &ACE_TRY_ENV); // Used in iterating through the contents - CORBA::Boolean next (CORBA::Environment &TAO_IN_ENV); + CORBA::Boolean next (CORBA::Environment &ACE_TRY_ENV); // Returns next component CORBA::Boolean seek (CORBA::Long index, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Jump to component at <index> - void rewind (CORBA::Environment &TAO_IN_ENV); + void rewind (CORBA::Environment &ACE_TRY_ENV); // Makes first component the current one // Insert and get functions void insert_boolean (CORBA::Boolean value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_octet (CORBA::Octet value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_char (CORBA::Char value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_short (CORBA::Short value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ushort (CORBA::UShort value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_long (CORBA::Long value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ulong (CORBA::ULong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_float (CORBA::Float value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_double (CORBA::Double value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_string (const char * value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_reference (CORBA::Object_ptr value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_typecode (CORBA::TypeCode_ptr value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_longlong (CORBA::LongLong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_ulonglong (CORBA::ULongLong value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_wchar (CORBA::WChar value, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); void insert_any (const CORBA::Any& value, - CORBA::Environment &TAO_IN_ENV); - CORBA::Boolean get_boolean (CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); + CORBA::Boolean get_boolean (CORBA::Environment &ACE_TRY_ENV); - CORBA::Octet get_octet (CORBA::Environment &TAO_IN_ENV); + CORBA::Octet get_octet (CORBA::Environment &ACE_TRY_ENV); - CORBA::Char get_char (CORBA::Environment &TAO_IN_ENV); + CORBA::Char get_char (CORBA::Environment &ACE_TRY_ENV); - CORBA::Short get_short (CORBA::Environment &TAO_IN_ENV); + CORBA::Short get_short (CORBA::Environment &ACE_TRY_ENV); - CORBA::UShort get_ushort (CORBA::Environment &TAO_IN_ENV); + CORBA::UShort get_ushort (CORBA::Environment &ACE_TRY_ENV); - CORBA::Long get_long (CORBA::Environment &TAO_IN_ENV); + CORBA::Long get_long (CORBA::Environment &ACE_TRY_ENV); - CORBA::ULong get_ulong (CORBA::Environment &TAO_IN_ENV); + CORBA::ULong get_ulong (CORBA::Environment &ACE_TRY_ENV); - CORBA::Float get_float (CORBA::Environment &TAO_IN_ENV); + CORBA::Float get_float (CORBA::Environment &ACE_TRY_ENV); - CORBA::Double get_double (CORBA::Environment &TAO_IN_ENV); + CORBA::Double get_double (CORBA::Environment &ACE_TRY_ENV); - char * get_string (CORBA::Environment &TAO_IN_ENV); + char * get_string (CORBA::Environment &ACE_TRY_ENV); - CORBA::Object_ptr get_reference (CORBA::Environment &TAO_IN_ENV); + CORBA::Object_ptr get_reference (CORBA::Environment &ACE_TRY_ENV); - CORBA::TypeCode_ptr get_typecode (CORBA::Environment &TAO_IN_ENV); + CORBA::TypeCode_ptr get_typecode (CORBA::Environment &ACE_TRY_ENV); - CORBA::LongLong get_longlong (CORBA::Environment &TAO_IN_ENV); + CORBA::LongLong get_longlong (CORBA::Environment &ACE_TRY_ENV); - CORBA::ULongLong get_ulonglong (CORBA::Environment &TAO_IN_ENV); + CORBA::ULongLong get_ulonglong (CORBA::Environment &ACE_TRY_ENV); - CORBA::WChar get_wchar (CORBA::Environment &TAO_IN_ENV); + CORBA::WChar get_wchar (CORBA::Environment &ACE_TRY_ENV); - CORBA::Any_ptr get_any (CORBA::Environment &TAO_IN_ENV); + CORBA::Any_ptr get_any (CORBA::Environment &ACE_TRY_ENV); private: CORBA_DynAny_var member_; @@ -212,11 +212,11 @@ private: }; DU_Extractor_base* get_extractor (CORBA::TCKind kind, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Returns a pointer to the correct extractor class. void set_from_any(const CORBA_Any& any, - CORBA::Environment &TAO_IN_ENV); + CORBA::Environment &ACE_TRY_ENV); // Code common to the constructor from an Any arg and the member // function from_any(). }; |