diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-01-25 19:19:27 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-01-25 19:19:27 +0000 |
commit | 83d7ed9edd866300f633597ca2b37750dde36cfd (patch) | |
tree | 903a8deac70916640b410b4bd9ff1dee8a83cc7b | |
parent | db5bcfdeb2a2f493308c9d60c39ae820b8f8e415 (diff) | |
download | ATCD-83d7ed9edd866300f633597ca2b37750dde36cfd.tar.gz |
Thu Jan 25 19:16:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
60 files changed, 556 insertions, 1133 deletions
diff --git a/TAO/tao/Adapter_Registry.cpp b/TAO/tao/Adapter_Registry.cpp index f51e5b6bf7f..29ed3a524a9 100644 --- a/TAO/tao/Adapter_Registry.cpp +++ b/TAO/tao/Adapter_Registry.cpp @@ -89,8 +89,8 @@ TAO_Adapter_Registry::insert (TAO_Adapter *adapter) if (this->adapters_[i]->priority () >= priority) { for (size_t j = this->adapters_count_ + 1; - j > i; - --j) + j > i; + --j) { this->adapters_[j] = this->adapters_[j - 1]; } @@ -139,7 +139,7 @@ TAO_Adapter_Registry::create_collocated_object (TAO_Stub *stub, // a servant so we need to give the rest of the adapters a chance to // initialise the stub and find a servant or forward us or whatever. for (CORBA::Long go_on = 1; go_on && i != this->adapters_count_; - ++i) + ++i) { // initialize_collocated_object only returns 0 if it has completely // initialised the object. @@ -174,8 +174,8 @@ TAO_Adapter * TAO_Adapter_Registry::find_adapter (const char *name) const { for (TAO_Adapter **i = this->adapters_; - i != this->adapters_ + this->adapters_count_; - ++i) + i != this->adapters_ + this->adapters_count_; + ++i) if (ACE_OS::strcmp ((*i)->name (), name) == 0) return *i; diff --git a/TAO/tao/AnyTypeCode/Any_Array_Impl_T.cpp b/TAO/tao/AnyTypeCode/Any_Array_Impl_T.cpp index 4f233f8040e..4a8c57146cf 100644 --- a/TAO/tao/AnyTypeCode/Any_Array_Impl_T.cpp +++ b/TAO/tao/AnyTypeCode/Any_Array_Impl_T.cpp @@ -65,9 +65,7 @@ TAO::Any_Array_Impl_T<T_slice, T_forany>::extract (const CORBA::Any & any, try { CORBA::TypeCode_ptr any_tc = any._tao_get_typecode (); - CORBA::Boolean const _tao_equiv = - any_tc->equivalent (tc - ); + CORBA::Boolean const _tao_equiv = any_tc->equivalent (tc); if (_tao_equiv == false) { @@ -103,8 +101,7 @@ TAO::Any_Array_Impl_T<T_slice, T_forany>::extract (const CORBA::Any & any, ); // We know this will work since the unencoded case is covered above. - TAO::Unknown_IDL_Type *unk = - dynamic_cast<TAO::Unknown_IDL_Type *> (impl); + TAO::Unknown_IDL_Type *unk = dynamic_cast<TAO::Unknown_IDL_Type *> (impl); // We don't want the rd_ptr of unk to move, in case it is // shared by another Any. This copies the state, not the buffer. @@ -124,11 +121,11 @@ TAO::Any_Array_Impl_T<T_slice, T_forany>::extract (const CORBA::Any & any, // Duplicated by Any_Impl base class constructor. ::CORBA::release (any_tc); } - catch ( ::CORBA::Exception& ex) + catch ( ::CORBA::Exception&) { } - return 0; + return false; } template<typename T_slice, typename T_forany> diff --git a/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp b/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp index 93f5e5848c1..35e375ce4df 100644 --- a/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp +++ b/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp @@ -23,8 +23,7 @@ namespace TAO : Any_Impl (0, tc), kind_ (CORBA::tk_null) { - this->kind_ = TAO::unaliased_kind (tc - ); + this->kind_ = TAO::unaliased_kind (tc); switch (this->kind_) { @@ -103,8 +102,7 @@ namespace TAO { CORBA::TypeCode_ptr any_tc = any._tao_get_typecode (); CORBA::Boolean _tao_equiv = - any_tc->equivalent (tc - ); + any_tc->equivalent (tc); if (!_tao_equiv) { @@ -123,8 +121,7 @@ namespace TAO return false; } - Any_Basic_Impl::assign_value (_tao_elem, - narrow_impl); + Any_Basic_Impl::assign_value (_tao_elem, narrow_impl); return true; } @@ -258,8 +255,7 @@ namespace TAO } void - Any_Basic_Impl::_tao_decode (TAO_InputCDR &cdr - ) + Any_Basic_Impl::_tao_decode (TAO_InputCDR &cdr) { if (! this->demarshal_value (cdr)) { diff --git a/TAO/tao/AnyTypeCode/Any_Basic_Impl_T.cpp b/TAO/tao/AnyTypeCode/Any_Basic_Impl_T.cpp index 79f8f0e2785..ca85a402171 100644 --- a/TAO/tao/AnyTypeCode/Any_Basic_Impl_T.cpp +++ b/TAO/tao/AnyTypeCode/Any_Basic_Impl_T.cpp @@ -56,8 +56,7 @@ TAO::Any_Basic_Impl_T<T>::extract (const CORBA::Any & any, try { CORBA::TypeCode_ptr any_tc = any._tao_get_typecode (); - CORBA::Boolean const _tao_equiv = any_tc->equivalent (tc - ); + CORBA::Boolean const _tao_equiv = any_tc->equivalent (tc); if (_tao_equiv == false) { @@ -142,8 +141,7 @@ TAO::Any_Basic_Impl_T<T>::create_empty (CORBA::TypeCode_ptr tc) template<typename T> void -TAO::Any_Basic_Impl_T<T>::_tao_decode (TAO_InputCDR &cdr - ) +TAO::Any_Basic_Impl_T<T>::_tao_decode (TAO_InputCDR &cdr) { if (! this->demarshal_value (cdr)) { diff --git a/TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp b/TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp index 31d096ee324..4fe6c209652 100644 --- a/TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp +++ b/TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp @@ -104,8 +104,7 @@ TAO::Any_Dual_Impl_T<T>::extract (const CORBA::Any & any, try { CORBA::TypeCode_ptr any_tc = any._tao_get_typecode (); - CORBA::Boolean _tao_equiv = any_tc->equivalent (tc - ); + CORBA::Boolean _tao_equiv = any_tc->equivalent (tc); if (_tao_equiv == false) { @@ -200,8 +199,7 @@ TAO::Any_Dual_Impl_T<T>::free_value (void) template<typename T> void -TAO::Any_Dual_Impl_T<T>::_tao_decode (TAO_InputCDR &cdr - ) +TAO::Any_Dual_Impl_T<T>::_tao_decode (TAO_InputCDR &cdr) { if (! this->demarshal_value (cdr)) { diff --git a/TAO/tao/AnyTypeCode/Any_Impl_T.cpp b/TAO/tao/AnyTypeCode/Any_Impl_T.cpp index 7f564c35d18..b42955f5e91 100644 --- a/TAO/tao/AnyTypeCode/Any_Impl_T.cpp +++ b/TAO/tao/AnyTypeCode/Any_Impl_T.cpp @@ -63,8 +63,7 @@ TAO::Any_Impl_T<T>::extract (const CORBA::Any & any, try { CORBA::TypeCode_ptr any_tc = any._tao_get_typecode (); - CORBA::Boolean _tao_equiv = any_tc->equivalent (tc - ); + CORBA::Boolean _tao_equiv = any_tc->equivalent (tc); if (_tao_equiv == 0) { @@ -177,8 +176,7 @@ TAO::Any_Impl_T<T>::free_value (void) template<typename T> void -TAO::Any_Impl_T<T>::_tao_decode (TAO_InputCDR &cdr - ) +TAO::Any_Impl_T<T>::_tao_decode (TAO_InputCDR &cdr) { if (! this->demarshal_value (cdr)) { diff --git a/TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp b/TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp index c1130d8fb92..e901e61fe3f 100644 --- a/TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp +++ b/TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp @@ -79,8 +79,7 @@ TAO::Any_Special_Impl_T<T, from_T, to_T>::extract (const CORBA::Any & any, _tao_destructor destructor, CORBA::TypeCode_ptr tc, const T *& _tao_elem, - CORBA::ULong bound - ) + CORBA::ULong bound) { _tao_elem = 0; @@ -101,8 +100,7 @@ TAO::Any_Special_Impl_T<T, from_T, to_T>::extract (const CORBA::Any & any, return false; } - CORBA::ULong length = - unaliased_any_type->length (); + CORBA::ULong length = unaliased_any_type->length (); if (length != bound) { @@ -171,9 +169,7 @@ TAO::Any_Special_Impl_T<T, from_T, to_T>::extract (const CORBA::Any & any, template<typename T, typename from_T, typename to_T> CORBA::Boolean -TAO::Any_Special_Impl_T<T, from_T, to_T>::marshal_value ( - TAO_OutputCDR &cdr - ) +TAO::Any_Special_Impl_T<T, from_T, to_T>::marshal_value (TAO_OutputCDR &cdr) { return (cdr << from_T (this->value_, this->bound_)); } @@ -201,10 +197,7 @@ TAO::Any_Special_Impl_T<T, from_T, to_T>::free_value (void) template<typename T, typename from_T, typename to_T> void -TAO::Any_Special_Impl_T<T, from_T, to_T>::_tao_decode ( - TAO_InputCDR &cdr - - ) +TAO::Any_Special_Impl_T<T, from_T, to_T>::_tao_decode (TAO_InputCDR &cdr) { if (this->value_destructor_ != 0) { diff --git a/TAO/tao/AnyTypeCode/Any_SystemException.cpp b/TAO/tao/AnyTypeCode/Any_SystemException.cpp index 6afaab98900..820e411234e 100644 --- a/TAO/tao/AnyTypeCode/Any_SystemException.cpp +++ b/TAO/tao/AnyTypeCode/Any_SystemException.cpp @@ -92,8 +92,7 @@ TAO::Any_SystemException::extract (const CORBA::Any & any, try { CORBA::TypeCode_ptr any_tc = any._tao_get_typecode (); - CORBA::Boolean const _tao_equiv = any_tc->equivalent (tc - ); + CORBA::Boolean const _tao_equiv = any_tc->equivalent (tc); if (_tao_equiv == false) { @@ -176,8 +175,7 @@ TAO::Any_SystemException::marshal_value (TAO_OutputCDR &cdr) { try { - this->value_->_tao_encode (cdr - ); + this->value_->_tao_encode (cdr); return true; } catch ( ::CORBA::Exception&) @@ -191,8 +189,7 @@ TAO::Any_SystemException::demarshal_value (TAO_InputCDR &cdr) { try { - this->value_->_tao_decode (cdr - ); + this->value_->_tao_decode (cdr); return true; } catch ( ::CORBA::Exception&) diff --git a/TAO/tao/AnyTypeCode/Any_Unknown_IDL_Type.cpp b/TAO/tao/AnyTypeCode/Any_Unknown_IDL_Type.cpp index c616ad4a139..fbf786b3232 100644 --- a/TAO/tao/AnyTypeCode/Any_Unknown_IDL_Type.cpp +++ b/TAO/tao/AnyTypeCode/Any_Unknown_IDL_Type.cpp @@ -27,8 +27,7 @@ TAO::Unknown_IDL_Type::lock_i (void) TAO::Unknown_IDL_Type::Unknown_IDL_Type ( CORBA::TypeCode_ptr tc, - TAO_InputCDR &cdr - ) + TAO_InputCDR &cdr) : TAO::Any_Impl (0, tc, true) , cdr_ (static_cast<ACE_Message_Block*>(0), lock_i ()) { @@ -65,8 +64,7 @@ TAO::Unknown_IDL_Type::marshal_value (TAO_OutputCDR &cdr) TAO::traverse_status status = TAO_Marshal_Object::perform_append (this->type_, &for_reading, - &cdr - ); + &cdr); if (status != TAO::TRAVERSE_CONTINUE) { @@ -105,8 +103,7 @@ TAO::Unknown_IDL_Type::_tao_byte_order (void) const return this->cdr_.byte_order (); } void -TAO::Unknown_IDL_Type::_tao_decode (TAO_InputCDR &cdr - ) +TAO::Unknown_IDL_Type::_tao_decode (TAO_InputCDR &cdr) { // @@ (JP) The following code depends on the fact that // TAO_InputCDR does not contain chained message blocks, @@ -118,9 +115,7 @@ TAO::Unknown_IDL_Type::_tao_decode (TAO_InputCDR &cdr // Skip over the next argument. TAO::traverse_status status = - TAO_Marshal_Object::perform_skip (this->type_, - &cdr - ); + TAO_Marshal_Object::perform_skip (this->type_, &cdr); if (status != TAO::TRAVERSE_CONTINUE) { @@ -207,11 +202,9 @@ TAO::Unknown_IDL_Type::to_value (CORBA::ValueBase *&val) const { try { - CORBA::ULong kind = - this->type_->kind (); + CORBA::ULong kind = this->type_->kind (); - CORBA::TypeCode_var tcvar = - CORBA::TypeCode::_duplicate (this->type_); + CORBA::TypeCode_var tcvar = CORBA::TypeCode::_duplicate (this->type_); while (kind == CORBA::tk_alias) { @@ -253,11 +246,9 @@ TAO::Unknown_IDL_Type::to_abstract_base (CORBA::AbstractBase_ptr &obj) const { try { - CORBA::ULong kind = - this->type_->kind (); + CORBA::ULong kind = this->type_->kind (); - CORBA::TypeCode_var tcvar = - CORBA::TypeCode::_duplicate (this->type_); + CORBA::TypeCode_var tcvar = CORBA::TypeCode::_duplicate (this->type_); while (kind == CORBA::tk_alias) { @@ -271,7 +262,7 @@ TAO::Unknown_IDL_Type::to_abstract_base (CORBA::AbstractBase_ptr &obj) const return false; } - TAO_ORB_Core *orb_core = this->cdr_.orb_core (); + TAO_ORB_Core *orb_core = this->cdr_.orb_core (); if (orb_core == 0) { orb_core = TAO_ORB_Core_instance (); @@ -285,8 +276,7 @@ TAO::Unknown_IDL_Type::to_abstract_base (CORBA::AbstractBase_ptr &obj) const } TAO_Valuetype_Adapter *adapter = orb_core->valuetype_adapter(); - return adapter->stream_to_abstract_base (this->cdr_, - obj); + return adapter->stream_to_abstract_base (this->cdr_, obj); } catch ( ::CORBA::Exception&) { diff --git a/TAO/tao/AnyTypeCode/Union_TypeCode_Static.cpp b/TAO/tao/AnyTypeCode/Union_TypeCode_Static.cpp index f79809e3af8..689a05fb2cd 100644 --- a/TAO/tao/AnyTypeCode/Union_TypeCode_Static.cpp +++ b/TAO/tao/AnyTypeCode/Union_TypeCode_Static.cpp @@ -109,23 +109,19 @@ TAO::TypeCode::Union<char const *, // this method, meaning that the CORBA::tk_union TypeCode methods // are supported. - CORBA::ULong const tc_count = - tc->member_count (); + CORBA::ULong const tc_count = tc->member_count (); CORBA::Long tc_def = tc->default_index (); - if (tc_count != this->ncases_ - || tc_def != this->default_index_) + if (tc_count != this->ncases_ || tc_def != this->default_index_) return false; // Check the discriminator type. - CORBA::TypeCode_var tc_discriminator = - tc->discriminator_type (); + CORBA::TypeCode_var tc_discriminator = tc->discriminator_type (); CORBA::Boolean const equal_discriminators = Traits<char const *>::get_typecode (this->discriminant_type_)->equal ( - tc_discriminator.in () - ); + tc_discriminator.in ()); if (!equal_discriminators) return false; @@ -143,10 +139,7 @@ TAO::TypeCode::Union<char const *, case_type const & lhs_case = *this->cases_[i]; - bool const equal_case = - lhs_case.equal (i, - tc - ); + bool const equal_case = lhs_case.equal (i, tc); if (!equal_case) return false; @@ -161,28 +154,22 @@ TAO::TypeCode::Union<char const *, TAO::TypeCode::Case<char const *, CORBA::TypeCode_ptr const *> const * const *, TAO::Null_RefCount_Policy>::equivalent_i ( - CORBA::TypeCode_ptr tc - ) const + CORBA::TypeCode_ptr tc) const { // Perform a structural comparison, excluding the name() and // member_name() operations. - - CORBA::ULong const tc_count = - tc->member_count (); + CORBA::ULong const tc_count = tc->member_count (); CORBA::Long tc_def = tc->default_index (); - if (tc_count != this->ncases_ - || tc_def != this->default_index_) + if (tc_count != this->ncases_ || tc_def != this->default_index_) return false; - CORBA::TypeCode_var tc_discriminator = - tc->discriminator_type (); + CORBA::TypeCode_var tc_discriminator = tc->discriminator_type (); CORBA::Boolean const equiv_discriminators = Traits<char const *>::get_typecode (this->discriminant_type_)->equivalent ( - tc_discriminator.in () - ); + tc_discriminator.in ()); if (!equiv_discriminators) return false; @@ -200,10 +187,7 @@ TAO::TypeCode::Union<char const *, case_type const & lhs_case = *this->cases_[i]; - bool const equivalent_case = - lhs_case.equivalent (i, - tc - ); + bool const equivalent_case = lhs_case.equivalent (i, tc); if (!equivalent_case) return false; @@ -329,8 +313,7 @@ TAO::TypeCode::Union<char const *, TAO::TypeCode::Case<char const *, CORBA::TypeCode_ptr const *> const * const *, TAO::Null_RefCount_Policy>::member_type_i ( - CORBA::ULong index - ) const + CORBA::ULong index) const { if (index >= this->ncases_) ACE_THROW_RETURN (CORBA::TypeCode::Bounds (), @@ -345,8 +328,7 @@ TAO::TypeCode::Union<char const *, TAO::TypeCode::Case<char const *, CORBA::TypeCode_ptr const *> const * const *, TAO::Null_RefCount_Policy>::member_label_i ( - CORBA::ULong index - ) const + CORBA::ULong index) const { if (index >= this->ncases_) ACE_THROW_RETURN (CORBA::TypeCode::Bounds (), diff --git a/TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp b/TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp index fd811ede635..2a5faf9ef37 100644 --- a/TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp +++ b/TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp @@ -107,8 +107,7 @@ TAO::TypeCode::Value<char const *, TAO::TypeCode::Value_Field<char const *, CORBA::TypeCode_ptr const *> const *, TAO::Null_RefCount_Policy>::equal_i ( - CORBA::TypeCode_ptr tc - ) const + CORBA::TypeCode_ptr tc) const { // None of these calls should throw since CORBA::TypeCode::equal() // verified that the TCKind is the same as our's prior to invoking @@ -120,18 +119,15 @@ TAO::TypeCode::Value<char const *, if (tc_type_modifier != this->type_modifier_) return false; - CORBA::TypeCode_var rhs_concrete_base_type = - tc->concrete_base_type (); + CORBA::TypeCode_var rhs_concrete_base_type = tc->concrete_base_type (); CORBA::Boolean const equal_concrete_base_types = - this->equal (rhs_concrete_base_type.in () - ); + this->equal (rhs_concrete_base_type.in ()); if (!equal_concrete_base_types) return false; - CORBA::ULong const tc_nfields = - tc->member_count (); + CORBA::ULong const tc_nfields = tc->member_count (); if (tc_nfields != this->nfields_) return false; @@ -142,17 +138,14 @@ TAO::TypeCode::Value<char const *, this->fields_[i]; CORBA::Visibility const lhs_visibility = lhs_field.visibility; - CORBA::Visibility const rhs_visibility = - tc->member_visibility (i - ); + CORBA::Visibility const rhs_visibility = tc->member_visibility (i); if (lhs_visibility != rhs_visibility) return false; char const * const lhs_name = Traits<char const *>::get_string (lhs_field.name);; - char const * const rhs_name = tc->member_name (i - ); + char const * const rhs_name = tc->member_name (i); if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) return false; @@ -160,12 +153,10 @@ TAO::TypeCode::Value<char const *, CORBA::TypeCode_ptr const lhs_tc = Traits<char const *>::get_typecode (lhs_field.type); CORBA::TypeCode_var const rhs_tc = - tc->member_type (i - ); + tc->member_type (i); CORBA::Boolean const equal_members = - lhs_tc->equal (rhs_tc.in () - ); + lhs_tc->equal (rhs_tc.in ()); if (!equal_members) return false; @@ -217,8 +208,7 @@ TAO::TypeCode::Value<char const *, CORBA::Visibility const lhs_visibility = lhs_field.visibility; CORBA::Visibility const rhs_visibility = - tc->member_visibility (i - ); + tc->member_visibility (i); if (lhs_visibility != rhs_visibility) return false; @@ -226,12 +216,10 @@ TAO::TypeCode::Value<char const *, CORBA::TypeCode_ptr const lhs_tc = Traits<char const *>::get_typecode (lhs_field.type); CORBA::TypeCode_var const rhs_tc = - tc->member_type (i - ); + tc->member_type (i); CORBA::Boolean const equiv_types = - lhs_tc->equivalent (rhs_tc.in () - ); + lhs_tc->equivalent (rhs_tc.in ()); if (!equiv_types) return false; @@ -299,8 +287,7 @@ TAO::TypeCode::Value<char const *, CORBA::TypeCode_ptr const *, TAO::TypeCode::Value_Field<char const *, CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy>::id_i ( - void) const + TAO::Null_RefCount_Policy>::id_i (void) const { // Ownership is retained by the TypeCode, as required by the C++ // mapping. @@ -312,8 +299,7 @@ TAO::TypeCode::Value<char const *, CORBA::TypeCode_ptr const *, TAO::TypeCode::Value_Field<char const *, CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy>::name_i ( - void) const + TAO::Null_RefCount_Policy>::name_i (void) const { // Ownership is retained by the TypeCode, as required by the C++ // mapping. @@ -325,8 +311,7 @@ TAO::TypeCode::Value<char const *, CORBA::TypeCode_ptr const *, TAO::TypeCode::Value_Field<char const *, CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy>::member_count_i ( - void) const + TAO::Null_RefCount_Policy>::member_count_i (void) const { return this->nfields_; } @@ -337,8 +322,7 @@ TAO::TypeCode::Value<char const *, TAO::TypeCode::Value_Field<char const *, CORBA::TypeCode_ptr const *> const *, TAO::Null_RefCount_Policy>::member_name_i ( - CORBA::ULong index - ) const + CORBA::ULong index) const { // Ownership is retained by the TypeCode, as required by the C++ // mapping. @@ -354,8 +338,7 @@ TAO::TypeCode::Value<char const *, TAO::TypeCode::Value_Field<char const *, CORBA::TypeCode_ptr const *> const *, TAO::Null_RefCount_Policy>::member_type_i ( - CORBA::ULong index - ) const + CORBA::ULong index) const { if (index >= this->nfields_) ACE_THROW_RETURN (CORBA::TypeCode::Bounds (), @@ -372,8 +355,7 @@ TAO::TypeCode::Value<char const *, TAO::TypeCode::Value_Field<char const *, CORBA::TypeCode_ptr const *> const *, TAO::Null_RefCount_Policy>::member_visibility_i ( - CORBA::ULong index - ) const + CORBA::ULong index) const { if (index >= this->nfields_) ACE_THROW_RETURN (CORBA::TypeCode::Bounds (), @@ -387,8 +369,7 @@ TAO::TypeCode::Value<char const *, CORBA::TypeCode_ptr const *, TAO::TypeCode::Value_Field<char const *, CORBA::TypeCode_ptr const *> const *, - TAO::Null_RefCount_Policy>::type_modifier_i ( - void) const + TAO::Null_RefCount_Policy>::type_modifier_i (void) const { return this->type_modifier_; } diff --git a/TAO/tao/Default_Protocols_Hooks.cpp b/TAO/tao/Default_Protocols_Hooks.cpp index 53fcb61f6ce..570dfd379ec 100644 --- a/TAO/tao/Default_Protocols_Hooks.cpp +++ b/TAO/tao/Default_Protocols_Hooks.cpp @@ -14,16 +14,14 @@ TAO_Default_Protocols_Hooks::~TAO_Default_Protocols_Hooks (void) } void -TAO_Default_Protocols_Hooks::init_hooks (TAO_ORB_Core * - ) +TAO_Default_Protocols_Hooks::init_hooks (TAO_ORB_Core *) { } void TAO_Default_Protocols_Hooks::add_rt_service_context_hook (TAO_Service_Context &, CORBA::Policy *, - CORBA::Short & - ) + CORBA::Short &) { } @@ -78,8 +76,7 @@ TAO_Default_Protocols_Hooks::set_thread_native_priority (CORBA::Short) void TAO_Default_Protocols_Hooks::rt_service_context (TAO_Stub *, TAO_Service_Context &, - CORBA::Boolean - ) + CORBA::Boolean) { } @@ -92,69 +89,68 @@ TAO_Default_Protocols_Hooks::set_client_network_priority (IOP::ProfileId, CORBA::Boolean TAO_Default_Protocols_Hooks::set_server_network_priority (IOP::ProfileId, - CORBA::Policy * - ) + CORBA::Policy *) { return false; } void -TAO_Default_Protocols_Hooks::server_protocol_properties_at_orb_level (TAO_IIOP_Protocol_Properties & - ) +TAO_Default_Protocols_Hooks::server_protocol_properties_at_orb_level ( + TAO_IIOP_Protocol_Properties &) { } void -TAO_Default_Protocols_Hooks::client_protocol_properties_at_orb_level (TAO_IIOP_Protocol_Properties & - ) +TAO_Default_Protocols_Hooks::client_protocol_properties_at_orb_level ( + TAO_IIOP_Protocol_Properties &) { } void -TAO_Default_Protocols_Hooks::server_protocol_properties_at_orb_level (TAO_UIOP_Protocol_Properties & - ) +TAO_Default_Protocols_Hooks::server_protocol_properties_at_orb_level ( + TAO_UIOP_Protocol_Properties &) { } void -TAO_Default_Protocols_Hooks::client_protocol_properties_at_orb_level (TAO_UIOP_Protocol_Properties & - ) +TAO_Default_Protocols_Hooks::client_protocol_properties_at_orb_level ( + TAO_UIOP_Protocol_Properties &) { } void -TAO_Default_Protocols_Hooks::server_protocol_properties_at_orb_level (TAO_SHMIOP_Protocol_Properties & - ) +TAO_Default_Protocols_Hooks::server_protocol_properties_at_orb_level ( + TAO_SHMIOP_Protocol_Properties &) { } void -TAO_Default_Protocols_Hooks::client_protocol_properties_at_orb_level (TAO_SHMIOP_Protocol_Properties & - ) +TAO_Default_Protocols_Hooks::client_protocol_properties_at_orb_level ( + TAO_SHMIOP_Protocol_Properties &) { } void -TAO_Default_Protocols_Hooks::server_protocol_properties_at_orb_level (TAO_DIOP_Protocol_Properties & - ) +TAO_Default_Protocols_Hooks::server_protocol_properties_at_orb_level ( + TAO_DIOP_Protocol_Properties &) { } void -TAO_Default_Protocols_Hooks::client_protocol_properties_at_orb_level (TAO_DIOP_Protocol_Properties & - ) +TAO_Default_Protocols_Hooks::client_protocol_properties_at_orb_level ( + TAO_DIOP_Protocol_Properties &) { } void -TAO_Default_Protocols_Hooks::server_protocol_properties_at_orb_level (TAO_SCIOP_Protocol_Properties & - ) +TAO_Default_Protocols_Hooks::server_protocol_properties_at_orb_level ( + TAO_SCIOP_Protocol_Properties &) { } void -TAO_Default_Protocols_Hooks::client_protocol_properties_at_orb_level (TAO_SCIOP_Protocol_Properties & - ) +TAO_Default_Protocols_Hooks::client_protocol_properties_at_orb_level ( + TAO_SCIOP_Protocol_Properties &) { } diff --git a/TAO/tao/Default_Protocols_Hooks.h b/TAO/tao/Default_Protocols_Hooks.h index 4b84cedd7a1..b1194d46ebe 100644 --- a/TAO/tao/Default_Protocols_Hooks.h +++ b/TAO/tao/Default_Protocols_Hooks.h @@ -33,8 +33,7 @@ public: /// destructor virtual ~TAO_Default_Protocols_Hooks (void); - void init_hooks (TAO_ORB_Core *orb_core - ); + void init_hooks (TAO_ORB_Core *orb_core); CORBA::Boolean set_client_network_priority (IOP::ProfileId protocol_tag, TAO_Stub *stub @@ -97,21 +96,16 @@ public: CORBA::Short &max_priority, bool &in_range); - int get_thread_CORBA_priority (CORBA::Short & - ); + int get_thread_CORBA_priority (CORBA::Short &); - int get_thread_native_priority (CORBA::Short & - ); + int get_thread_native_priority (CORBA::Short &); int get_thread_CORBA_and_native_priority (CORBA::Short &, - CORBA::Short & - ); + CORBA::Short &); - int set_thread_CORBA_priority (CORBA::Short - ); + int set_thread_CORBA_priority (CORBA::Short); - int set_thread_native_priority (CORBA::Short - ); + int set_thread_native_priority (CORBA::Short); }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/IIOP_Connection_Handler.cpp b/TAO/tao/IIOP_Connection_Handler.cpp index f9bd455feb6..01f0e6043e3 100644 --- a/TAO/tao/IIOP_Connection_Handler.cpp +++ b/TAO/tao/IIOP_Connection_Handler.cpp @@ -105,26 +105,20 @@ TAO_IIOP_Connection_Handler::open (void*) protocol_properties.dont_route_ = this->orb_core ()->orb_params ()->sock_dontroute (); - TAO_Protocols_Hooks *tph = - this->orb_core ()->get_protocols_hooks (); + TAO_Protocols_Hooks *tph = this->orb_core ()->get_protocols_hooks (); - bool const client = - this->transport ()->opened_as () == TAO::TAO_CLIENT_ROLE; + bool const client = this->transport ()->opened_as () == TAO::TAO_CLIENT_ROLE; try { if (client) { - tph->client_protocol_properties_at_orb_level ( - protocol_properties - ); + tph->client_protocol_properties_at_orb_level (protocol_properties); } else { - tph->server_protocol_properties_at_orb_level ( - protocol_properties - ); + tph->server_protocol_properties_at_orb_level (protocol_properties); } } catch ( ::CORBA::Exception&) @@ -135,7 +129,9 @@ TAO_IIOP_Connection_Handler::open (void*) if (this->set_socket_option (this->peer (), protocol_properties.send_buffer_size_, protocol_properties.recv_buffer_size_) == -1) - return -1; + { + return -1; + } #if !defined (ACE_LACKS_TCP_NODELAY) if (this->peer ().set_option (ACE_IPPROTO_TCP, @@ -231,7 +227,7 @@ TAO_IIOP_Connection_Handler::open (void*) (void) remote_addr.addr_to_string (remote_as_string, sizeof(remote_as_string)); - ACE_ERROR ((LM_WARNING, + ACE_ERROR ((LM_ERROR, ACE_TEXT("TAO (%P|%t) - IIOP_Connection_Handler::open, ") ACE_TEXT("invalid connection from IPv4 mapped IPv6 interface <%s>!\n"), remote_as_string)); diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index 7eb48c9cce1..b738dfb8c9d 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -1335,8 +1335,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) -1); // Initialize the protocols hooks instance. - this->protocols_hooks_->init_hooks (this - ); + this->protocols_hooks_->init_hooks (this); // As a last step perform initializations of the service callbacks this->services_callbacks_init (); @@ -1355,8 +1354,7 @@ TAO_ORB_Core::fini (void) try { // Shutdown the ORB and block until the shutdown is complete. - this->shutdown (1 - ); + this->shutdown (1); } catch ( ::CORBA::Exception& ex) { diff --git a/TAO/tao/PortableServer/Collocated_Object_Proxy_Broker.cpp b/TAO/tao/PortableServer/Collocated_Object_Proxy_Broker.cpp index a407e7b23a4..737aa70f09d 100644 --- a/TAO/tao/PortableServer/Collocated_Object_Proxy_Broker.cpp +++ b/TAO/tao/PortableServer/Collocated_Object_Proxy_Broker.cpp @@ -31,15 +31,13 @@ namespace TAO == TAO_ORB_Core::THRU_POA) { TAO::Portable_Server::Servant_Upcall servant_upcall ( - stub->servant_orb_var ()->orb_core () - ); + stub->servant_orb_var ()->orb_core ()); CORBA::Object_var forward_to; servant_upcall.prepare_for_upcall ( stub->profile_in_use ()->object_key (), "_is_a", - forward_to.out () - ); + forward_to.out ()); servant_upcall.pre_invoke_collocated_request (); @@ -113,35 +111,30 @@ namespace TAO ->get_collocation_strategy () == TAO_ORB_Core::THRU_POA) { TAO::Portable_Server::Servant_Upcall servant_upcall ( - target->_stubobj ()->servant_orb_var ()->orb_core () - ); + target->_stubobj ()->servant_orb_var ()->orb_core ()); CORBA::Object_var forward_to; servant_upcall.prepare_for_upcall ( target->_stubobj ()->object_key (), "_non_existent", - forward_to.out () - ); + forward_to.out ()); servant_upcall.pre_invoke_collocated_request (); - _tao_retval = - servant_upcall.servant ()->_non_existent (); + _tao_retval = servant_upcall.servant ()->_non_existent (); } // Direct collocation strategy is used. else if (target->_servant () != 0) { - _tao_retval = - target->_servant ()->_non_existent (); + _tao_retval = target->_servant ()->_non_existent (); } return _tao_retval; } CORBA::Object_ptr - Collocated_Object_Proxy_Broker::_get_component (CORBA::Object_ptr target - ) + Collocated_Object_Proxy_Broker::_get_component (CORBA::Object_ptr target) { CORBA::Object_var _tao_retval (CORBA::Object::_nil ()); @@ -155,24 +148,20 @@ namespace TAO ->get_collocation_strategy () == TAO_ORB_Core::THRU_POA) { TAO::Portable_Server::Servant_Upcall servant_upcall ( - stub->servant_orb_var ()->orb_core () - ); + stub->servant_orb_var ()->orb_core ()); CORBA::Object_var forward_to; servant_upcall.prepare_for_upcall ( stub->profile_in_use ()->object_key (), "_component", - forward_to.out () - ); + forward_to.out ()); - _tao_retval = - servant_upcall.servant ()->_get_component (); + _tao_retval = servant_upcall.servant ()->_get_component (); } // Direct collocation strategy is used. else if (target->_servant () != 0) { - _tao_retval = - target->_servant ()->_get_component (); + _tao_retval = target->_servant ()->_get_component (); } } catch ( ::CORBA::OBJECT_NOT_EXIST&) @@ -202,16 +191,14 @@ namespace TAO == TAO_ORB_Core::THRU_POA) { TAO::Portable_Server::Servant_Upcall servant_upcall ( - target->_stubobj ()->servant_orb_var ()->orb_core () - ); + target->_stubobj ()->servant_orb_var ()->orb_core ()); CORBA::Object_var forward_to; servant_upcall.prepare_for_upcall ( target->_stubobj ()->object_key (), "_interface", - forward_to.out () - ); + forward_to.out ()); servant_upcall.pre_invoke_collocated_request (); @@ -221,8 +208,7 @@ namespace TAO // Direct collocation strategy is used. else if (target->_servant () != 0) { - _tao_retval = - target->_servant ()->_get_interface (); + _tao_retval = target->_servant ()->_get_interface (); } } catch ( ::CORBA::OBJECT_NOT_EXIST&) diff --git a/TAO/tao/PortableServer/Default_Policy_Validator.cpp b/TAO/tao/PortableServer/Default_Policy_Validator.cpp index 0d6e5c10549..f101c6ba237 100644 --- a/TAO/tao/PortableServer/Default_Policy_Validator.cpp +++ b/TAO/tao/PortableServer/Default_Policy_Validator.cpp @@ -24,8 +24,7 @@ TAO_POA_Default_Policy_Validator::~TAO_POA_Default_Policy_Validator (void) } void -TAO_POA_Default_Policy_Validator::validate_impl (TAO_Policy_Set &policies - ) +TAO_POA_Default_Policy_Validator::validate_impl (TAO_Policy_Set &policies) { #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) CORBA::Policy_var policy = @@ -33,18 +32,14 @@ TAO_POA_Default_Policy_Validator::validate_impl (TAO_Policy_Set &policies ); PortableServer::ServantRetentionPolicy_var srp = - PortableServer::ServantRetentionPolicy::_narrow (policy.in () - ); + PortableServer::ServantRetentionPolicy::_narrow (policy.in ()); PortableServer::ServantRetentionPolicyValue servant_retention = srp->value (); - policy = - policies.get_cached_policy (TAO_CACHED_POLICY_REQUEST_PROCESSING - ); + policy = policies.get_cached_policy (TAO_CACHED_POLICY_REQUEST_PROCESSING); PortableServer::RequestProcessingPolicy_var rpp = - PortableServer::RequestProcessingPolicy::_narrow (policy.in () - ); + PortableServer::RequestProcessingPolicy::_narrow (policy.in ()); PortableServer::RequestProcessingPolicyValue request_processing = rpp->value (); @@ -60,30 +55,22 @@ TAO_POA_Default_Policy_Validator::validate_impl (TAO_Policy_Set &policies if (servant_retention != PortableServer::RETAIN) throw PortableServer::POA::InvalidPolicy (); - policy = - policies.get_cached_policy (TAO_CACHED_POLICY_ID_UNIQUENESS - ); - + policy = policies.get_cached_policy (TAO_CACHED_POLICY_ID_UNIQUENESS); PortableServer::IdUniquenessPolicy_var iup = - PortableServer::IdUniquenessPolicy::_narrow (policy.in () - ); + PortableServer::IdUniquenessPolicy::_narrow (policy.in ()); PortableServer::IdUniquenessPolicyValue id_uniqueness = iup->value (); policy = - policies.get_cached_policy (TAO_CACHED_POLICY_IMPLICIT_ACTIVATION - ); + policies.get_cached_policy (TAO_CACHED_POLICY_IMPLICIT_ACTIVATION); PortableServer::ImplicitActivationPolicy_var iap = - PortableServer::ImplicitActivationPolicy::_narrow (policy.in () - ); + PortableServer::ImplicitActivationPolicy::_narrow (policy.in ()); PortableServer::ImplicitActivationPolicyValue implicit_activation = iap->value (); - policy = - policies.get_cached_policy (TAO_CACHED_POLICY_ID_ASSIGNMENT - ); + policy = policies.get_cached_policy (TAO_CACHED_POLICY_ID_ASSIGNMENT); PortableServer::IdAssignmentPolicy_var idap = PortableServer::IdAssignmentPolicy::_narrow (policy.in ()); @@ -131,9 +118,7 @@ TAO_POA_Default_Policy_Validator::legal_policy_impl (CORBA::PolicyType type) } void -TAO_POA_Default_Policy_Validator::merge_policies_impl ( - TAO_Policy_Set & - ) +TAO_POA_Default_Policy_Validator::merge_policies_impl (TAO_Policy_Set &) { } diff --git a/TAO/tao/PortableServer/Default_Policy_Validator.h b/TAO/tao/PortableServer/Default_Policy_Validator.h index 236fe985b63..717794e7787 100644 --- a/TAO/tao/PortableServer/Default_Policy_Validator.h +++ b/TAO/tao/PortableServer/Default_Policy_Validator.h @@ -45,12 +45,10 @@ protected: * are consistent and legal. Throw an appropriate exception * if that is not the case. */ - void validate_impl (TAO_Policy_Set &policies - ); + void validate_impl (TAO_Policy_Set &policies); /// Add/merge policies. - void merge_policies_impl (TAO_Policy_Set &policies - ); + void merge_policies_impl (TAO_Policy_Set &policies); /** * Return whether the specified policy type is legal for the diff --git a/TAO/tao/Protocols_Hooks.h b/TAO/tao/Protocols_Hooks.h index eaa36a7df39..6597a08ad1f 100644 --- a/TAO/tao/Protocols_Hooks.h +++ b/TAO/tao/Protocols_Hooks.h @@ -14,20 +14,18 @@ #define TAO_PROTOCOLS_HOOKS_H #include /**/ "ace/pre.h" -#include "ace/CORBA_macros.h" + +#include "ace/Service_Object.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/Service_Object.h" - #include /**/ "tao/TAO_Export.h" #include "tao/Basic_Types.h" #include "tao/IOP_IORC.h" #include "ace/SString.h" - TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace CORBA @@ -110,63 +108,59 @@ public: virtual ~TAO_Protocols_Hooks (void); /// Initialize the protocols hooks instance. - virtual void init_hooks (TAO_ORB_Core *orb_core - ) = 0; + virtual void init_hooks (TAO_ORB_Core *orb_core) = 0; - virtual CORBA::Boolean set_client_network_priority (IOP::ProfileId protocol_tag, - TAO_Stub *stub - ) = 0; + virtual CORBA::Boolean set_client_network_priority ( + IOP::ProfileId protocol_tag, + TAO_Stub *stub) = 0; - virtual CORBA::Boolean set_server_network_priority (IOP::ProfileId protocol_tag, - CORBA::Policy *policy - ) = 0; + virtual CORBA::Boolean set_server_network_priority ( + IOP::ProfileId protocol_tag, + CORBA::Policy *policy) = 0; - virtual void server_protocol_properties_at_orb_level (TAO_IIOP_Protocol_Properties &protocol_properties - ) = 0; + virtual void server_protocol_properties_at_orb_level ( + TAO_IIOP_Protocol_Properties &protocol_properties) = 0; - virtual void client_protocol_properties_at_orb_level (TAO_IIOP_Protocol_Properties &protocol_properties - ) = 0; + virtual void client_protocol_properties_at_orb_level ( + TAO_IIOP_Protocol_Properties &protocol_properties) = 0; - virtual void server_protocol_properties_at_orb_level (TAO_UIOP_Protocol_Properties &protocol_properties - ) = 0; + virtual void server_protocol_properties_at_orb_level ( + TAO_UIOP_Protocol_Properties &protocol_properties) = 0; - virtual void client_protocol_properties_at_orb_level (TAO_UIOP_Protocol_Properties &protocol_properties - ) = 0; + virtual void client_protocol_properties_at_orb_level ( + TAO_UIOP_Protocol_Properties &protocol_properties) = 0; - virtual void server_protocol_properties_at_orb_level (TAO_SHMIOP_Protocol_Properties &protocol_properties - ) = 0; + virtual void server_protocol_properties_at_orb_level ( + TAO_SHMIOP_Protocol_Properties &protocol_properties) = 0; - virtual void client_protocol_properties_at_orb_level (TAO_SHMIOP_Protocol_Properties &protocol_properties - ) = 0; + virtual void client_protocol_properties_at_orb_level ( + TAO_SHMIOP_Protocol_Properties &protocol_properties) = 0; - virtual void server_protocol_properties_at_orb_level (TAO_DIOP_Protocol_Properties &protocol_properties - ) = 0; + virtual void server_protocol_properties_at_orb_level ( + TAO_DIOP_Protocol_Properties &protocol_properties) = 0; - virtual void client_protocol_properties_at_orb_level (TAO_DIOP_Protocol_Properties &protocol_properties - ) = 0; + virtual void client_protocol_properties_at_orb_level ( + TAO_DIOP_Protocol_Properties &protocol_properties) = 0; - virtual void server_protocol_properties_at_orb_level (TAO_SCIOP_Protocol_Properties &protocol_properties - ) = 0; + virtual void server_protocol_properties_at_orb_level ( + TAO_SCIOP_Protocol_Properties &protocol_properties) = 0; - virtual void client_protocol_properties_at_orb_level (TAO_SCIOP_Protocol_Properties &protocol_properties - ) = 0; + virtual void client_protocol_properties_at_orb_level ( + TAO_SCIOP_Protocol_Properties &protocol_properties) = 0; virtual CORBA::Long get_dscp_codepoint (void) = 0; virtual void rt_service_context (TAO_Stub *stub, TAO_Service_Context &service_context, - CORBA::Boolean restart - ) = 0; + CORBA::Boolean restart) = 0; virtual void add_rt_service_context_hook ( TAO_Service_Context &service_context, CORBA::Policy *model_policy, - CORBA::Short &client_priority - ) = 0; + CORBA::Short &client_priority) = 0; virtual void get_selector_hook (CORBA::Policy *model_policy, - CORBA::Boolean - &is_client_propagated, + CORBA::Boolean &is_client_propagated, CORBA::Short &server_priority) = 0; virtual void get_selector_bands_policy_hook (CORBA::Policy *bands_policy, @@ -182,23 +176,17 @@ public: * these operations are no-ops. */ //@{ - virtual int get_thread_CORBA_priority (CORBA::Short & - ) = 0; + virtual int get_thread_CORBA_priority (CORBA::Short &) = 0; - virtual int get_thread_native_priority (CORBA::Short & - ) = 0; + virtual int get_thread_native_priority (CORBA::Short &) = 0; virtual int get_thread_CORBA_and_native_priority ( CORBA::Short &, - CORBA::Short & - ) = 0; - - virtual int set_thread_CORBA_priority (CORBA::Short - ) = 0; + CORBA::Short &) = 0; - virtual int set_thread_native_priority (CORBA::Short - ) = 0; + virtual int set_thread_CORBA_priority (CORBA::Short) = 0; + virtual int set_thread_native_priority (CORBA::Short) = 0; //@} }; diff --git a/TAO/tao/RTCORBA/Continuous_Priority_Mapping.cpp b/TAO/tao/RTCORBA/Continuous_Priority_Mapping.cpp index de53baf576f..870a14485e8 100644 --- a/TAO/tao/RTCORBA/Continuous_Priority_Mapping.cpp +++ b/TAO/tao/RTCORBA/Continuous_Priority_Mapping.cpp @@ -12,12 +12,9 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Continuous_Priority_Mapping::TAO_Continuous_Priority_Mapping (int policy) : policy_ (policy) + , min_ (ACE_Sched_Params::priority_min (this->policy_)) + , max_ (ACE_Sched_Params::priority_max (this->policy_)) { - this->min_ = - ACE_Sched_Params::priority_min (this->policy_); - - this->max_ = - ACE_Sched_Params::priority_max (this->policy_); } TAO_Continuous_Priority_Mapping::~TAO_Continuous_Priority_Mapping (void) @@ -29,7 +26,7 @@ TAO_Continuous_Priority_Mapping::to_native (RTCORBA::Priority corba_priority, RTCORBA::NativePriority &native_priority) { if (corba_priority < 0) - return 0; + return false; #if defined (ACE_WIN32) @@ -42,13 +39,13 @@ TAO_Continuous_Priority_Mapping::to_native (RTCORBA::Priority corba_priority, current_native_priority); if (next_native_priority == current_native_priority) - return 0; + return false; current_native_priority = next_native_priority; } native_priority = static_cast<RTCORBA::NativePriority> (current_native_priority); - return 1; + return true; #else @@ -56,24 +53,24 @@ TAO_Continuous_Priority_Mapping::to_native (RTCORBA::Priority corba_priority, { native_priority = corba_priority + this->min_; if (native_priority > this->max_) - return 0; + return false; } else if (this->min_ > this->max_) { native_priority = this->min_ - corba_priority; if (native_priority < this->max_) - return 0; + return false; } else { // There is only one native priority. if (corba_priority != 0) - return 0; + return false; native_priority = this->min_; } - return 1; + return true; #endif /* ACE_WIN32 */ @@ -90,10 +87,10 @@ TAO_Continuous_Priority_Mapping::to_CORBA (RTCORBA::NativePriority native_priori for (corba_priority = 0; ; ++corba_priority) { if (current_native_priority == native_priority) - return 1; + return true; else if (current_native_priority == this->max_) - return 0; + return false; else current_native_priority = @@ -107,24 +104,24 @@ TAO_Continuous_Priority_Mapping::to_CORBA (RTCORBA::NativePriority native_priori { if (native_priority < this->min_ || native_priority > this->max_) - return 0; + return false; corba_priority = native_priority - this->min_; } else if (this->min_ > this->max_) { if (native_priority > this->min_ || native_priority < this->max_) - return 0; + return false; corba_priority = this->min_ - native_priority; } else if (this->min_ == this->max_) { if (native_priority != this->min_) - return 0; + return false; corba_priority = 0; } - return 1; + return true; #endif /* ACE_WIN32 */ diff --git a/TAO/tao/RTCORBA/Direct_Priority_Mapping.cpp b/TAO/tao/RTCORBA/Direct_Priority_Mapping.cpp index 124b0bfefa9..c57b9a85397 100644 --- a/TAO/tao/RTCORBA/Direct_Priority_Mapping.cpp +++ b/TAO/tao/RTCORBA/Direct_Priority_Mapping.cpp @@ -26,7 +26,7 @@ TAO_Direct_Priority_Mapping::to_native (RTCORBA::Priority corba_priority, RTCORBA::NativePriority &native_priority) { native_priority = corba_priority; - return 1; + return true; } CORBA::Boolean @@ -34,7 +34,7 @@ TAO_Direct_Priority_Mapping::to_CORBA (RTCORBA::NativePriority native_priority, RTCORBA::Priority &corba_priority) { corba_priority = native_priority; - return 1; + return true; } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/RTCORBA/Linear_Network_Priority_Mapping.cpp b/TAO/tao/RTCORBA/Linear_Network_Priority_Mapping.cpp index 68d4353dbd8..0f56c3838c2 100644 --- a/TAO/tao/RTCORBA/Linear_Network_Priority_Mapping.cpp +++ b/TAO/tao/RTCORBA/Linear_Network_Priority_Mapping.cpp @@ -107,7 +107,7 @@ TAO_Linear_Network_Priority_Mapping::to_network ( "TAO_Linear_Network_Priority_Mapping::to_network corba_priority %d\n", corba_priority)); - const int total_slots = sizeof (dscp) / sizeof (int); + int const total_slots = sizeof (dscp) / sizeof (int); int array_slot = static_cast<int> (((corba_priority - RTCORBA::minPriority) / double (RTCORBA::maxPriority - RTCORBA::minPriority)) * total_slots); diff --git a/TAO/tao/RTCORBA/Network_Priority_Mapping_Manager.cpp b/TAO/tao/RTCORBA/Network_Priority_Mapping_Manager.cpp index 6cd7c6d75af..682f18f3ec9 100644 --- a/TAO/tao/RTCORBA/Network_Priority_Mapping_Manager.cpp +++ b/TAO/tao/RTCORBA/Network_Priority_Mapping_Manager.cpp @@ -22,14 +22,8 @@ TAO_Network_Priority_Mapping_Manager::~TAO_Network_Priority_Mapping_Manager ( } TAO_Network_Priority_Mapping_Manager_ptr -TAO_Network_Priority_Mapping_Manager::_narrow (CORBA::Object_ptr obj - ) +TAO_Network_Priority_Mapping_Manager::_narrow (CORBA::Object_ptr obj) { - if (CORBA::is_nil (obj)) - { - return TAO_Network_Priority_Mapping_Manager::_nil (); - } - return TAO_Network_Priority_Mapping_Manager::_duplicate ( dynamic_cast<TAO_Network_Priority_Mapping_Manager_ptr> (obj) diff --git a/TAO/tao/RTCORBA/Priority_Mapping_Manager.cpp b/TAO/tao/RTCORBA/Priority_Mapping_Manager.cpp index 6db9ff93415..60c1aab2796 100644 --- a/TAO/tao/RTCORBA/Priority_Mapping_Manager.cpp +++ b/TAO/tao/RTCORBA/Priority_Mapping_Manager.cpp @@ -20,14 +20,8 @@ TAO_Priority_Mapping_Manager::~TAO_Priority_Mapping_Manager (void) } TAO_Priority_Mapping_Manager_ptr -TAO_Priority_Mapping_Manager::_narrow (CORBA::Object_ptr obj - ) +TAO_Priority_Mapping_Manager::_narrow (CORBA::Object_ptr obj) { - if (CORBA::is_nil (obj)) - { - return TAO_Priority_Mapping_Manager::_nil (); - } - return TAO_Priority_Mapping_Manager::_duplicate ( dynamic_cast<TAO_Priority_Mapping_Manager_ptr> (obj) diff --git a/TAO/tao/RTCORBA/RT_Current.cpp b/TAO/tao/RTCORBA/RT_Current.cpp index 658ffa8c719..ee285a98732 100644 --- a/TAO/tao/RTCORBA/RT_Current.cpp +++ b/TAO/tao/RTCORBA/RT_Current.cpp @@ -33,14 +33,11 @@ RTCORBA::Priority TAO_RT_Current::the_priority (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - TAO_Protocols_Hooks *tph = - this->orb_core_->get_protocols_hooks (); + TAO_Protocols_Hooks *tph = this->orb_core_->get_protocols_hooks (); RTCORBA::Priority priority; - int result = - tph->get_thread_CORBA_priority (priority - ); + int const result = tph->get_thread_CORBA_priority (priority); if (result == -1) ACE_THROW_RETURN (CORBA::DATA_CONVERSION (1, CORBA::COMPLETED_NO), -1); @@ -49,17 +46,13 @@ TAO_RT_Current::the_priority (void) } void -TAO_RT_Current::the_priority (RTCORBA::Priority the_priority - ) +TAO_RT_Current::the_priority (RTCORBA::Priority the_priority) ACE_THROW_SPEC ((CORBA::SystemException)) { - TAO_Protocols_Hooks *tph = - this->orb_core_->get_protocols_hooks (); + TAO_Protocols_Hooks *tph = this->orb_core_->get_protocols_hooks (); - int result = - tph->set_thread_CORBA_priority (the_priority - ); + int const result = tph->set_thread_CORBA_priority (the_priority); if (result == -1) throw ::CORBA::DATA_CONVERSION (1, CORBA::COMPLETED_NO); diff --git a/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp b/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp index fa58b6bf517..20e9e2ed233 100644 --- a/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp +++ b/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp @@ -27,16 +27,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL void TAO_RT_Invocation_Endpoint_Selector::select_endpoint ( TAO::Profile_Transport_Resolver *r, - ACE_Time_Value *val - ) + ACE_Time_Value *val) { if (r == 0) throw ::CORBA::INTERNAL (); CORBA::Policy_var client_protocol_policy_base = - TAO_RT_Endpoint_Utils::policy (TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL, - *r - ); + TAO_RT_Endpoint_Utils::policy (TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL, *r); if (client_protocol_policy_base.ptr () == 0) { @@ -44,10 +41,7 @@ TAO_RT_Invocation_Endpoint_Selector::select_endpoint ( { r->profile (r->stub ()->profile_in_use ()); - int status = - this->endpoint_from_profile (*r, - val - ); + int const status = this->endpoint_from_profile (*r, val); if (status == 1) return; @@ -62,8 +56,7 @@ TAO_RT_Invocation_Endpoint_Selector::select_endpoint ( { RTCORBA::ClientProtocolPolicy_var client_protocol_policy = RTCORBA::ClientProtocolPolicy::_narrow ( - client_protocol_policy_base.in () - ); + client_protocol_policy_base.in ()); /// Cast to TAO_ClientProtocolPolicy TAO_ClientProtocolPolicy *tao_client_protocol_policy = @@ -87,8 +80,7 @@ TAO_RT_Invocation_Endpoint_Selector::select_endpoint_based_on_client_protocol_po TAO::Profile_Transport_Resolver &r, RTCORBA::ClientProtocolPolicy_ptr client_protocol_policy, RTCORBA::ProtocolList &client_protocols, - ACE_Time_Value *val - ) + ACE_Time_Value *val) { CORBA::Boolean valid_profile_found = false; @@ -141,8 +133,7 @@ TAO_RT_Invocation_Endpoint_Selector::select_endpoint_based_on_client_protocol_po r.inconsistent_policies (); p->length (1); - (*p)[0u] = - CORBA::Policy::_duplicate (client_protocol_policy); + (*p)[0u] = CORBA::Policy::_duplicate (client_protocol_policy); } throw ::CORBA::INV_POLICY (); } @@ -156,8 +147,7 @@ TAO_RT_Invocation_Endpoint_Selector::select_endpoint_based_on_client_protocol_po int TAO_RT_Invocation_Endpoint_Selector::endpoint_from_profile ( TAO::Profile_Transport_Resolver &r, - ACE_Time_Value *val - ) + ACE_Time_Value *val) { // Narrow to the RT Stub. TAO_RT_Stub *rt_stub = @@ -165,14 +155,12 @@ TAO_RT_Invocation_Endpoint_Selector::endpoint_from_profile ( // Get the priority model policy. CORBA::Policy_var priority_model_policy = - rt_stub->get_cached_policy (TAO_CACHED_POLICY_PRIORITY_MODEL - ); + rt_stub->get_cached_policy (TAO_CACHED_POLICY_PRIORITY_MODEL); // Get the bands policy. CORBA::Policy_var bands_policy = - TAO_RT_Endpoint_Utils::policy (TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION, - r - ); + TAO_RT_Endpoint_Utils::policy ( + TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION, r); int all_endpoints_are_valid = 0; int match_priority = 0; @@ -189,12 +177,10 @@ TAO_RT_Invocation_Endpoint_Selector::endpoint_from_profile ( { if (r.inconsistent_policies ()) { - CORBA::PolicyList *p = - r.inconsistent_policies (); + CORBA::PolicyList *p = r.inconsistent_policies (); p->length (1); - (*p)[0u] = - CORBA::Policy::_duplicate (bands_policy.in ()); + (*p)[0u] = CORBA::Policy::_duplicate (bands_policy.in ()); } // Indicate error. ACE_THROW_RETURN (CORBA::INV_POLICY (), 0); @@ -212,7 +198,7 @@ TAO_RT_Invocation_Endpoint_Selector::endpoint_from_profile ( r.stub ()->orb_core ()->get_protocols_hooks (); CORBA::Short server_priority = 0; - CORBA::Boolean is_client_propagated = 0; + CORBA::Boolean is_client_propagated = false; // Check the priority model policy to see if it is client // propagated. @@ -267,11 +253,9 @@ TAO_RT_Invocation_Endpoint_Selector::endpoint_from_profile ( if (r.inconsistent_policies ()) { - CORBA::PolicyList *p = - r.inconsistent_policies (); + CORBA::PolicyList *p = r.inconsistent_policies (); p->length (2); - (*p)[0u] = - CORBA::Policy::_duplicate (bands_policy.in ()); + (*p)[0u] = CORBA::Policy::_duplicate (bands_policy.in ()); (*p)[1u] = CORBA::Policy::_duplicate ( priority_model_policy.in ()); @@ -294,8 +278,7 @@ TAO_RT_Invocation_Endpoint_Selector::endpoint_from_profile ( while (ep != 0) { // Get the priority of the endpoint. - CORBA::Short endpoint_priority = - ep->priority (); + CORBA::Short endpoint_priority = ep->priority (); // If <all_endpoints_are_valid> or match the priority of the // client thread or match the priority of the band or diff --git a/TAO/tao/RTCORBA/RT_ORBInitializer.cpp b/TAO/tao/RTCORBA/RT_ORBInitializer.cpp index 9d3ad97e41e..0722dc4e0a8 100644 --- a/TAO/tao/RTCORBA/RT_ORBInitializer.cpp +++ b/TAO/tao/RTCORBA/RT_ORBInitializer.cpp @@ -62,9 +62,7 @@ TAO_RT_ORBInitializer::TAO_RT_ORBInitializer (int priority_mapping_type, } void -TAO_RT_ORBInitializer::pre_init ( - PortableInterceptor::ORBInitInfo_ptr info - ) +TAO_RT_ORBInitializer::pre_init (PortableInterceptor::ORBInitInfo_ptr info) ACE_THROW_SPEC ((CORBA::SystemException)) { // @@ -163,9 +161,7 @@ TAO_RT_ORBInitializer::pre_init ( // Narrow to a TAO_ORBInitInfo object to get access to the // orb_core() TAO extension. - TAO_ORBInitInfo_var tao_info = - TAO_ORBInitInfo::_narrow (info - ); + TAO_ORBInitInfo_var tao_info = TAO_ORBInitInfo::_narrow (info); if (CORBA::is_nil (tao_info.in ())) { @@ -191,9 +187,7 @@ TAO_RT_ORBInitializer::pre_init ( CORBA::COMPLETED_NO)); CORBA::Object_var safe_rt_orb = rt_orb; - info->register_initial_reference (TAO_OBJID_RTORB, - rt_orb - ); + info->register_initial_reference (TAO_OBJID_RTORB, rt_orb); // Create the RT_Current. CORBA::Object_ptr current = CORBA::Object::_nil (); @@ -216,20 +210,15 @@ TAO_RT_ORBInitializer::pre_init ( } void -TAO_RT_ORBInitializer::post_init ( - PortableInterceptor::ORBInitInfo_ptr info - ) +TAO_RT_ORBInitializer::post_init (PortableInterceptor::ORBInitInfo_ptr info) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->register_policy_factories (info - ); - + this->register_policy_factories (info); } void TAO_RT_ORBInitializer::register_policy_factories ( - PortableInterceptor::ORBInitInfo_ptr info - ) + PortableInterceptor::ORBInitInfo_ptr info) { // The RTCorba policy factory is stateless and reentrant, so share a // single instance between all ORBs. @@ -268,9 +257,7 @@ TAO_RT_ORBInitializer::register_policy_factories ( { try { - info->register_policy_factory (*i, - this->policy_factory_.in () - ); + info->register_policy_factory (*i, this->policy_factory_.in ()); } catch ( ::CORBA::BAD_INV_ORDER& ex) { diff --git a/TAO/tao/RTCORBA/RT_ORB_Loader.cpp b/TAO/tao/RTCORBA/RT_ORB_Loader.cpp index 2b47ce29331..c0a882545cf 100644 --- a/TAO/tao/RTCORBA/RT_ORB_Loader.cpp +++ b/TAO/tao/RTCORBA/RT_ORB_Loader.cpp @@ -22,8 +22,7 @@ TAO_RT_ORB_Loader::~TAO_RT_ORB_Loader (void) } int -TAO_RT_ORB_Loader::init (int argc, - ACE_TCHAR* argv[]) +TAO_RT_ORB_Loader::init (int argc, ACE_TCHAR* argv[]) { ACE_TRACE ("TAO_RT_ORB_Loader::init"); diff --git a/TAO/tao/RTCORBA/RT_PolicyFactory.cpp b/TAO/tao/RTCORBA/RT_PolicyFactory.cpp index 3c6ff8c53f7..3b7bfc73eb8 100644 --- a/TAO/tao/RTCORBA/RT_PolicyFactory.cpp +++ b/TAO/tao/RTCORBA/RT_PolicyFactory.cpp @@ -16,34 +16,27 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL CORBA::Policy_ptr TAO_RT_PolicyFactory::create_policy ( CORBA::PolicyType type, - const CORBA::Any &value - ) + const CORBA::Any &value) ACE_THROW_SPEC ((CORBA::SystemException, CORBA::PolicyError)) { if (type == RTCORBA::PRIORITY_MODEL_POLICY_TYPE) - return TAO_PriorityModelPolicy::create (value - ); + return TAO_PriorityModelPolicy::create (value); if (type == RTCORBA::THREADPOOL_POLICY_TYPE) - return TAO_ThreadpoolPolicy::create (value - ); + return TAO_ThreadpoolPolicy::create (value); if (type == RTCORBA::SERVER_PROTOCOL_POLICY_TYPE) - return TAO_ServerProtocolPolicy::create (value - ); + return TAO_ServerProtocolPolicy::create (value); if (type == RTCORBA::CLIENT_PROTOCOL_POLICY_TYPE) - return TAO_ClientProtocolPolicy::create (value - ); + return TAO_ClientProtocolPolicy::create (value); if (type == RTCORBA::PRIVATE_CONNECTION_POLICY_TYPE) - return TAO_PrivateConnectionPolicy::create (value - ); + return TAO_PrivateConnectionPolicy::create (value); if (type == RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE) - return TAO_PriorityBandedConnectionPolicy::create (value - ); + return TAO_PriorityBandedConnectionPolicy::create (value); ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE), CORBA::Policy::_nil ()); diff --git a/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp b/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp index 3408ae38b10..efedbd7f13d 100644 --- a/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp +++ b/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp @@ -106,8 +106,7 @@ TAO_RT_Protocols_Hooks::server_protocol_properties (IOP::ProfileId protocol_tag, RTCORBA::ProtocolProperties_ptr TAO_RT_Protocols_Hooks::client_protocol_properties (IOP::ProfileId protocol_tag, - CORBA::Policy_ptr policy - ) + CORBA::Policy_ptr policy) { if (CORBA::is_nil (policy)) return 0; @@ -196,8 +195,7 @@ TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level (TAO_IIOP_Protoc this->server_protocol_properties_at_orb_level (IOP::TAG_INTERNET_IOP); if (!CORBA::is_nil (from.in ())) - this->extract_protocol_properties (to, - from.in ()); + this->extract_protocol_properties (to, from.in ()); } void @@ -205,64 +203,53 @@ TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level (TAO_IIOP_Protoc ) { RTCORBA::ProtocolProperties_var from = - this->client_protocol_properties_at_orb_level (IOP::TAG_INTERNET_IOP - ); + this->client_protocol_properties_at_orb_level (IOP::TAG_INTERNET_IOP); if (!CORBA::is_nil (from.in ())) - this->extract_protocol_properties (to, - from.in () - ); + this->extract_protocol_properties (to, from.in ()); } void -TAO_RT_Protocols_Hooks::extract_protocol_properties (TAO_UIOP_Protocol_Properties &to, - RTCORBA::ProtocolProperties_ptr from - ) +TAO_RT_Protocols_Hooks::extract_protocol_properties ( + TAO_UIOP_Protocol_Properties &to, + RTCORBA::ProtocolProperties_ptr from) { RTCORBA::UnixDomainProtocolProperties_var protocol_properties = - RTCORBA::UnixDomainProtocolProperties::_narrow (from - ); + RTCORBA::UnixDomainProtocolProperties::_narrow (from); to.send_buffer_size_ = protocol_properties->send_buffer_size (); to.recv_buffer_size_ = protocol_properties->recv_buffer_size (); } void -TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level (TAO_UIOP_Protocol_Properties &to - ) +TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level ( + TAO_UIOP_Protocol_Properties &to) { RTCORBA::ProtocolProperties_var from = - this->server_protocol_properties_at_orb_level (TAO_TAG_UIOP_PROFILE - ); + this->server_protocol_properties_at_orb_level (TAO_TAG_UIOP_PROFILE); if (!CORBA::is_nil (from.in ())) - this->extract_protocol_properties (to, - from.in () - ); + this->extract_protocol_properties (to, from.in ()); } void -TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level (TAO_UIOP_Protocol_Properties &to - ) +TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level ( + TAO_UIOP_Protocol_Properties &to) { RTCORBA::ProtocolProperties_var from = - this->client_protocol_properties_at_orb_level (TAO_TAG_UIOP_PROFILE - ); + this->client_protocol_properties_at_orb_level (TAO_TAG_UIOP_PROFILE); if (!CORBA::is_nil (from.in ())) - this->extract_protocol_properties (to, - from.in () - ); + this->extract_protocol_properties (to, from.in ()); } void -TAO_RT_Protocols_Hooks::extract_protocol_properties (TAO_SHMIOP_Protocol_Properties &to, - RTCORBA::ProtocolProperties_ptr from - ) +TAO_RT_Protocols_Hooks::extract_protocol_properties ( + TAO_SHMIOP_Protocol_Properties &to, + RTCORBA::ProtocolProperties_ptr from) { RTCORBA::SharedMemoryProtocolProperties_var protocol_properties = - RTCORBA::SharedMemoryProtocolProperties::_narrow (from - ); + RTCORBA::SharedMemoryProtocolProperties::_narrow (from); to.preallocate_buffer_size_ = protocol_properties->preallocate_buffer_size (); to.mmap_filename_ = protocol_properties->mmap_filename (); @@ -270,81 +257,67 @@ TAO_RT_Protocols_Hooks::extract_protocol_properties (TAO_SHMIOP_Protocol_Propert } void -TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level (TAO_SHMIOP_Protocol_Properties &to - ) +TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level ( + TAO_SHMIOP_Protocol_Properties &to) { RTCORBA::ProtocolProperties_var from = - this->server_protocol_properties_at_orb_level (TAO_TAG_SHMEM_PROFILE - ); + this->server_protocol_properties_at_orb_level (TAO_TAG_SHMEM_PROFILE); if (!CORBA::is_nil (from.in ())) - this->extract_protocol_properties (to, - from.in () - ); + this->extract_protocol_properties (to, from.in ()); } void -TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level (TAO_SHMIOP_Protocol_Properties &to - ) +TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level ( + TAO_SHMIOP_Protocol_Properties &to) { RTCORBA::ProtocolProperties_var from = - this->client_protocol_properties_at_orb_level (TAO_TAG_SHMEM_PROFILE - ); + this->client_protocol_properties_at_orb_level (TAO_TAG_SHMEM_PROFILE); if (!CORBA::is_nil (from.in ())) - this->extract_protocol_properties (to, - from.in () - ); + this->extract_protocol_properties (to, from.in ()); } void -TAO_RT_Protocols_Hooks::extract_protocol_properties (TAO_DIOP_Protocol_Properties &to, - RTCORBA::ProtocolProperties_ptr from - ) +TAO_RT_Protocols_Hooks::extract_protocol_properties ( + TAO_DIOP_Protocol_Properties &to, + RTCORBA::ProtocolProperties_ptr from) { RTCORBA::UserDatagramProtocolProperties_var protocol_properties = - RTCORBA::UserDatagramProtocolProperties::_narrow (from - ); + RTCORBA::UserDatagramProtocolProperties::_narrow (from); to.enable_network_priority_ = protocol_properties->enable_network_priority (); } void -TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level (TAO_DIOP_Protocol_Properties &to - ) +TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level ( + TAO_DIOP_Protocol_Properties &to) { RTCORBA::ProtocolProperties_var from = - this->server_protocol_properties_at_orb_level (TAO_TAG_DIOP_PROFILE - ); + this->server_protocol_properties_at_orb_level (TAO_TAG_DIOP_PROFILE); if (!CORBA::is_nil (from.in ())) - this->extract_protocol_properties (to, - from.in () - ); + this->extract_protocol_properties (to, from.in ()); } void -TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level (TAO_DIOP_Protocol_Properties &to - ) +TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level ( + TAO_DIOP_Protocol_Properties &to) { RTCORBA::ProtocolProperties_var from = - this->client_protocol_properties_at_orb_level (TAO_TAG_DIOP_PROFILE - ); + this->client_protocol_properties_at_orb_level (TAO_TAG_DIOP_PROFILE); if (!CORBA::is_nil (from.in ())) - this->extract_protocol_properties (to, - from.in () - ); + this->extract_protocol_properties (to, from.in ()); } void -TAO_RT_Protocols_Hooks::extract_protocol_properties (TAO_SCIOP_Protocol_Properties &to, - RTCORBA::ProtocolProperties_ptr from - ) +TAO_RT_Protocols_Hooks::extract_protocol_properties ( + TAO_SCIOP_Protocol_Properties &to, + RTCORBA::ProtocolProperties_ptr from) { RTCORBA::StreamControlProtocolProperties_var protocol_properties = - RTCORBA::StreamControlProtocolProperties::_narrow (from - ); + RTCORBA::StreamControlProtocolProperties::_narrow (from); to.send_buffer_size_ = protocol_properties->send_buffer_size (); to.recv_buffer_size_ = protocol_properties->recv_buffer_size (); @@ -355,36 +328,31 @@ TAO_RT_Protocols_Hooks::extract_protocol_properties (TAO_SCIOP_Protocol_Properti } void -TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level (TAO_SCIOP_Protocol_Properties &to - ) +TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level ( + TAO_SCIOP_Protocol_Properties &to) { RTCORBA::ProtocolProperties_var from = this->server_protocol_properties_at_orb_level (TAO_TAG_SCIOP_PROFILE); if (!CORBA::is_nil (from.in ())) - this->extract_protocol_properties (to, - from.in () - ); + this->extract_protocol_properties (to, from.in ()); } void -TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level (TAO_SCIOP_Protocol_Properties &to - ) +TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level ( + TAO_SCIOP_Protocol_Properties &to) { RTCORBA::ProtocolProperties_var from = - this->client_protocol_properties_at_orb_level (TAO_TAG_SCIOP_PROFILE - ); + this->client_protocol_properties_at_orb_level (TAO_TAG_SCIOP_PROFILE); if (!CORBA::is_nil (from.in ())) - this->extract_protocol_properties (to, - from.in () - ); + this->extract_protocol_properties (to, from.in ()); } CORBA::Boolean -TAO_RT_Protocols_Hooks::set_network_priority (IOP::ProfileId protocol_tag, - RTCORBA::ProtocolProperties_ptr protocol_properties - ) +TAO_RT_Protocols_Hooks::set_network_priority ( + IOP::ProfileId protocol_tag, + RTCORBA::ProtocolProperties_ptr protocol_properties) { if (CORBA::is_nil (protocol_properties)) return false; @@ -392,8 +360,7 @@ TAO_RT_Protocols_Hooks::set_network_priority (IOP::ProfileId protocol_tag, if (protocol_tag == IOP::TAG_INTERNET_IOP) { RTCORBA::TCPProtocolProperties_var tcp_protocol_properties = - RTCORBA::TCPProtocolProperties::_narrow (protocol_properties - ); + RTCORBA::TCPProtocolProperties::_narrow (protocol_properties); return tcp_protocol_properties->enable_network_priority (); } @@ -401,8 +368,7 @@ TAO_RT_Protocols_Hooks::set_network_priority (IOP::ProfileId protocol_tag, if (protocol_tag == TAO_TAG_DIOP_PROFILE) { RTCORBA::UserDatagramProtocolProperties_var udp_protocol_properties = - RTCORBA::UserDatagramProtocolProperties::_narrow (protocol_properties - ); + RTCORBA::UserDatagramProtocolProperties::_narrow (protocol_properties); return udp_protocol_properties->enable_network_priority (); } @@ -410,8 +376,7 @@ TAO_RT_Protocols_Hooks::set_network_priority (IOP::ProfileId protocol_tag, if (protocol_tag == TAO_TAG_SCIOP_PROFILE) { RTCORBA::StreamControlProtocolProperties_var sctp_protocol_properties = - RTCORBA::StreamControlProtocolProperties::_narrow (protocol_properties - ); + RTCORBA::StreamControlProtocolProperties::_narrow (protocol_properties); return sctp_protocol_properties->enable_network_priority (); } @@ -430,8 +395,7 @@ TAO_RT_Protocols_Hooks::set_client_network_priority (IOP::ProfileId protocol_tag return false; RTCORBA::ProtocolProperties_var protocol_properties = - this->client_protocol_properties_at_object_level (protocol_tag, - stub); + this->client_protocol_properties_at_object_level (protocol_tag, stub); return this->set_network_priority (protocol_tag, protocol_properties.in ()); @@ -448,13 +412,9 @@ TAO_RT_Protocols_Hooks::set_server_network_priority (IOP::ProfileId protocol_tag return false; RTCORBA::ProtocolProperties_var protocol_properties = - this->server_protocol_properties (protocol_tag, - policy - ); + this->server_protocol_properties (protocol_tag, policy); - return this->set_network_priority (protocol_tag, - protocol_properties.in () - ); + return this->set_network_priority (protocol_tag, protocol_properties.in ()); } CORBA::Long @@ -474,7 +434,7 @@ TAO_RT_Protocols_Hooks::get_dscp_codepoint (void) RTCORBA::NetworkPriorityMapping *pm = this->network_mapping_manager_->mapping (); - const CORBA::Short priority = + CORBA::Short const priority = this->current_->the_priority (); if (pm->to_network (priority, codepoint) == 0) @@ -552,10 +512,8 @@ TAO_RT_Protocols_Hooks::add_rt_service_context_hook ( ) { - RTCORBA::PriorityModelPolicy_var model_policy_ptr = - RTCORBA::PriorityModelPolicy::_narrow (model_policy - ); + RTCORBA::PriorityModelPolicy::_narrow (model_policy); TAO_PriorityModelPolicy *priority_model = static_cast<TAO_PriorityModelPolicy *> (model_policy_ptr.in ()); @@ -581,7 +539,6 @@ TAO_RT_Protocols_Hooks::get_selector_hook ( CORBA::Boolean &is_client_propagated, CORBA::Short &server_priority) { - RTCORBA::PriorityModelPolicy_var model_policy_ptr = RTCORBA::PriorityModelPolicy::_narrow (model_policy); @@ -634,8 +591,7 @@ TAO_RT_Protocols_Hooks::get_selector_bands_policy_hook ( } int -TAO_RT_Protocols_Hooks::get_thread_CORBA_priority (CORBA::Short &priority - ) +TAO_RT_Protocols_Hooks::get_thread_CORBA_priority (CORBA::Short &priority) { CORBA::Short native_priority = 0; int const result = @@ -653,9 +609,7 @@ TAO_RT_Protocols_Hooks::get_thread_CORBA_priority (CORBA::Short &priority int TAO_RT_Protocols_Hooks::get_thread_native_priority ( - CORBA::Short &native_priority - - ) + CORBA::Short &native_priority) { ACE_hthread_t current; ACE_Thread::self (current); @@ -679,13 +633,10 @@ TAO_RT_Protocols_Hooks::get_thread_native_priority ( int TAO_RT_Protocols_Hooks::get_thread_CORBA_and_native_priority ( CORBA::Short &priority, - CORBA::Short &native_priority - - ) + CORBA::Short &native_priority) { - int result = - this->get_thread_native_priority (native_priority - ); + int const result = + this->get_thread_native_priority (native_priority); if (result == -1) { @@ -721,15 +672,12 @@ TAO_RT_Protocols_Hooks::set_thread_CORBA_priority (CORBA::Short priority return -1; } - return this->set_thread_native_priority (native_priority - ); + return this->set_thread_native_priority (native_priority); } int TAO_RT_Protocols_Hooks::set_thread_native_priority ( - CORBA::Short native_priority - - ) + CORBA::Short native_priority) { ACE_hthread_t current; ACE_Thread::self (current); diff --git a/TAO/tao/RTCORBA/RT_Protocols_Hooks.h b/TAO/tao/RTCORBA/RT_Protocols_Hooks.h index c0fcc0da284..45601367061 100644 --- a/TAO/tao/RTCORBA/RT_Protocols_Hooks.h +++ b/TAO/tao/RTCORBA/RT_Protocols_Hooks.h @@ -86,13 +86,11 @@ public: void rt_service_context (TAO_Stub *stub, TAO_Service_Context &service_context, - CORBA::Boolean restart - ); + CORBA::Boolean restart); void add_rt_service_context_hook (TAO_Service_Context &service_context, CORBA::Policy *model_policy, - CORBA::Short &client_priority - ); + CORBA::Short &client_priority); void get_selector_hook (CORBA::Policy *model_policy, CORBA::Boolean @@ -111,21 +109,15 @@ public: * some critical components. */ //@{ - int get_thread_CORBA_priority (CORBA::Short & - ); + int get_thread_CORBA_priority (CORBA::Short &); - int get_thread_native_priority (CORBA::Short & - ); + int get_thread_native_priority (CORBA::Short &); - int get_thread_CORBA_and_native_priority (CORBA::Short &, - CORBA::Short & - ); + int get_thread_CORBA_and_native_priority (CORBA::Short &, CORBA::Short &); - int set_thread_CORBA_priority (CORBA::Short - ); + int set_thread_CORBA_priority (CORBA::Short); - int set_thread_native_priority (CORBA::Short - ); + int set_thread_native_priority (CORBA::Short); //@} @@ -150,24 +142,19 @@ protected: ); void extract_protocol_properties (TAO_IIOP_Protocol_Properties &to, - RTCORBA::ProtocolProperties_ptr from - ); + RTCORBA::ProtocolProperties_ptr from); void extract_protocol_properties (TAO_UIOP_Protocol_Properties &to, - RTCORBA::ProtocolProperties_ptr from - ); + RTCORBA::ProtocolProperties_ptr from); void extract_protocol_properties (TAO_SHMIOP_Protocol_Properties &to, - RTCORBA::ProtocolProperties_ptr from - ); + RTCORBA::ProtocolProperties_ptr from); void extract_protocol_properties (TAO_DIOP_Protocol_Properties &to, - RTCORBA::ProtocolProperties_ptr from - ); + RTCORBA::ProtocolProperties_ptr from); void extract_protocol_properties (TAO_SCIOP_Protocol_Properties &to, - RTCORBA::ProtocolProperties_ptr from - ); + RTCORBA::ProtocolProperties_ptr from); CORBA::Boolean set_network_priority (IOP::ProfileId protocol_tag, RTCORBA::ProtocolProperties_ptr protocol_properties diff --git a/TAO/tao/RTCORBA/RT_Stub.cpp b/TAO/tao/RTCORBA/RT_Stub.cpp index e8478ab48cb..1e69053a4cf 100644 --- a/TAO/tao/RTCORBA/RT_Stub.cpp +++ b/TAO/tao/RTCORBA/RT_Stub.cpp @@ -26,7 +26,7 @@ TAO_RT_Stub::TAO_RT_Stub (const char *repository_id, priority_model_policy_ (0), priority_banded_connection_policy_ (0), client_protocol_policy_ (0), - are_policies_parsed_ (0) + are_policies_parsed_ (false) { } @@ -48,7 +48,7 @@ TAO_RT_Stub::parse_policies (void) CORBA::PolicyList_var policy_list = this->base_profiles_.policy_list (); - CORBA::ULong length = policy_list->length (); + CORBA::ULong const length = policy_list->length (); // Cache away the policies that we'll need later. for (CORBA::ULong i = 0; i < length; ++i) @@ -66,7 +66,7 @@ TAO_RT_Stub::parse_policies (void) this->exposed_client_protocol (policy_list[i]); } - this->are_policies_parsed_ = 1; + this->are_policies_parsed_ = true; } CORBA::Policy * @@ -100,8 +100,7 @@ TAO_RT_Stub::exposed_priority_banded_connection (void) void TAO_RT_Stub::exposed_priority_banded_connection (CORBA::Policy_ptr policy) { - this->priority_banded_connection_policy_ = - CORBA::Policy::_duplicate (policy); + this->priority_banded_connection_policy_ = CORBA::Policy::_duplicate (policy); } CORBA::Policy * @@ -124,8 +123,7 @@ TAO_RT_Stub::exposed_client_protocol (CORBA::Policy_ptr policy) #if (TAO_HAS_CORBA_MESSAGING == 1) CORBA::Policy_ptr -TAO_RT_Stub::get_policy (CORBA::PolicyType type - ) +TAO_RT_Stub::get_policy (CORBA::PolicyType type) { // If we are dealing with a client exposed policy, check if any // value came in the IOR/reconcile IOR value and overrides. @@ -142,8 +140,7 @@ TAO_RT_Stub::get_policy (CORBA::PolicyType type } CORBA::Policy_ptr -TAO_RT_Stub::get_cached_policy (TAO_Cached_Policy_Type type - ) +TAO_RT_Stub::get_cached_policy (TAO_Cached_Policy_Type type) { // If we are dealing with a client exposed policy, check if any // value came in the IOR/reconcile IOR value and overrides. @@ -162,24 +159,22 @@ TAO_RT_Stub::get_cached_policy (TAO_Cached_Policy_Type type TAO_Stub * TAO_RT_Stub::set_policy_overrides (const CORBA::PolicyList & policies, - CORBA::SetOverrideType set_add - ) + CORBA::SetOverrideType set_add) { // Validity check. Make sure requested policies are allowed to be // set at this scope. for (CORBA::ULong i = 0; i < policies.length (); ++i) { CORBA::Policy_ptr policy = policies[i]; - if (CORBA::is_nil (policy)) - continue; - - CORBA::PolicyType type = policy->policy_type (); - - if (type == RTCORBA::PRIORITY_MODEL_POLICY_TYPE || - type == RTCORBA::THREADPOOL_POLICY_TYPE || - type == RTCORBA::SERVER_PROTOCOL_POLICY_TYPE) - ACE_THROW_RETURN (CORBA::NO_PERMISSION (), 0); - + if (!CORBA::is_nil (policy)) + { + CORBA::PolicyType const type = policy->policy_type (); + + if (type == RTCORBA::PRIORITY_MODEL_POLICY_TYPE || + type == RTCORBA::THREADPOOL_POLICY_TYPE || + type == RTCORBA::SERVER_PROTOCOL_POLICY_TYPE) + ACE_THROW_RETURN (CORBA::NO_PERMISSION (), 0); + } } // We are not required to check for consistency of <policies> with @@ -194,12 +189,11 @@ TAO_RT_Stub::effective_priority_banded_connection (void) { // Get effective override. CORBA::Policy_var override = - this->TAO_Stub::get_cached_policy (TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION - ); + this->TAO_Stub::get_cached_policy ( + TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION); // Get the value from the ior. - CORBA::Policy_var exposed = - this->exposed_priority_banded_connection (); + CORBA::Policy_var exposed = this->exposed_priority_banded_connection (); // Reconcile client-exposed and locally set values. if (CORBA::is_nil (exposed.in ())) @@ -209,15 +203,13 @@ TAO_RT_Stub::effective_priority_banded_connection (void) return exposed._retn (); RTCORBA::PriorityBandedConnectionPolicy_var override_policy_var = - RTCORBA::PriorityBandedConnectionPolicy::_narrow (override.in () - ); + RTCORBA::PriorityBandedConnectionPolicy::_narrow (override.in ()); TAO_PriorityBandedConnectionPolicy *override_policy = static_cast<TAO_PriorityBandedConnectionPolicy *> (override_policy_var.in ()); RTCORBA::PriorityBandedConnectionPolicy_var exposed_policy_var = - RTCORBA::PriorityBandedConnectionPolicy::_narrow (exposed.in () - ); + RTCORBA::PriorityBandedConnectionPolicy::_narrow (exposed.in ()); TAO_PriorityBandedConnectionPolicy *exposed_policy = static_cast<TAO_PriorityBandedConnectionPolicy *> (exposed_policy_var.in ()); @@ -232,8 +224,7 @@ TAO_RT_Stub::effective_priority_banded_connection (void) // Both override and exposed have been set and neither has empty // priority bands. This is illegal (ptc/99-05-03, sec. 4.12.1). - ACE_THROW_RETURN (CORBA::INV_POLICY (), - 0); + ACE_THROW_RETURN (CORBA::INV_POLICY (), 0); } CORBA::Policy * @@ -241,8 +232,7 @@ TAO_RT_Stub::effective_client_protocol (void) { // Get effective override. CORBA::Policy_var override = - this->TAO_Stub::get_cached_policy (TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL - ); + this->TAO_Stub::get_cached_policy (TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL); // Get the value from the ior. CORBA::Policy_var exposed = @@ -256,15 +246,13 @@ TAO_RT_Stub::effective_client_protocol (void) return exposed._retn (); RTCORBA::ClientProtocolPolicy_var override_policy_var = - RTCORBA::ClientProtocolPolicy::_narrow (override.in () - ); + RTCORBA::ClientProtocolPolicy::_narrow (override.in ()); TAO_ClientProtocolPolicy *override_policy = static_cast<TAO_ClientProtocolPolicy *> (override_policy_var.in ()); RTCORBA::ClientProtocolPolicy_var exposed_policy_var = - RTCORBA::ClientProtocolPolicy::_narrow (exposed.in () - ); + RTCORBA::ClientProtocolPolicy::_narrow (exposed.in ()); TAO_ClientProtocolPolicy *exposed_policy = static_cast<TAO_ClientProtocolPolicy *> (exposed_policy_var.in ()); @@ -282,8 +270,7 @@ TAO_RT_Stub::effective_client_protocol (void) // Both override and exposed have been set and neither has empty // protocols. This is illegal (ptc/99-05-03, sec. 4.15.4). - ACE_THROW_RETURN (CORBA::INV_POLICY (), - 0); + ACE_THROW_RETURN (CORBA::INV_POLICY (), 0); } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/RTCORBA/RT_Stub_Factory.cpp b/TAO/tao/RTCORBA/RT_Stub_Factory.cpp index 9547b094338..cbcc331f8c5 100644 --- a/TAO/tao/RTCORBA/RT_Stub_Factory.cpp +++ b/TAO/tao/RTCORBA/RT_Stub_Factory.cpp @@ -25,11 +25,8 @@ TAO_RT_Stub_Factory::~TAO_RT_Stub_Factory (void) TAO_Stub * TAO_RT_Stub_Factory::create_stub (const char *repository_id, const TAO_MProfile &profiles, - TAO_ORB_Core *orb_core - ) + TAO_ORB_Core *orb_core) { - // @@ TODO: As soon as the RT_STUB is done change this to - // create an RT_STUB TAO_Stub *retval = 0; ACE_NEW_THROW_EX (retval, @@ -37,7 +34,6 @@ TAO_RT_Stub_Factory::create_stub (const char *repository_id, CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_MAYBE)); - return retval; } diff --git a/TAO/tao/RTCORBA/Thread_Pool.cpp b/TAO/tao/RTCORBA/Thread_Pool.cpp index ecf6b94a35b..288dae47503 100644 --- a/TAO/tao/RTCORBA/Thread_Pool.cpp +++ b/TAO/tao/RTCORBA/Thread_Pool.cpp @@ -53,8 +53,7 @@ TAO_Thread_Pool_Threads::svc (void) return 0; // Set TSS resources for this thread. - TAO_Thread_Pool_Threads::set_tss_resources (orb_core, - this->lane_); + TAO_Thread_Pool_Threads::set_tss_resources (orb_core, this->lane_); try { @@ -312,8 +311,7 @@ TAO_Thread_Lane::open (void) } // Open the acceptor registry. - int result = 0; - result = + int const result = this->resources_.open_acceptor_registry (endpoint_set, ignore_address ); diff --git a/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp b/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp index 83cc23aea7e..1ee8e7bbf92 100644 --- a/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp +++ b/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp @@ -80,8 +80,7 @@ TAO_RT_Servant_Dispatcher::pre_invoke_remote_request ( } // Remember current thread's priority. - TAO_Protocols_Hooks *tph = - poa.orb_core ().get_protocols_hooks (); + TAO_Protocols_Hooks *tph = poa.orb_core ().get_protocols_hooks (); const char *priority_model = 0; RTCORBA::Priority target_priority = TAO_INVALID_PRIORITY; @@ -301,22 +300,18 @@ TAO_RT_Servant_Dispatcher::pre_invoke_collocated_request (TAO_Root_POA &poa, // // Remember current thread's priority. - TAO_Protocols_Hooks *tph = - poa.orb_core ().get_protocols_hooks (); + TAO_Protocols_Hooks *tph = poa.orb_core ().get_protocols_hooks (); - if (tph->get_thread_CORBA_and_native_priority (pre_invoke_state.original_CORBA_priority_, - pre_invoke_state.original_native_priority_ - ) - == -1) + if (tph->get_thread_CORBA_and_native_priority ( + pre_invoke_state.original_CORBA_priority_, + pre_invoke_state.original_native_priority_) == -1) throw ::CORBA::DATA_CONVERSION (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO); // Change the priority of the current thread for the duration of // request. if (servant_priority != pre_invoke_state.original_CORBA_priority_) { - if (tph->set_thread_CORBA_priority (servant_priority - ) - == -1) + if (tph->set_thread_CORBA_priority (servant_priority) == -1) throw ::CORBA::DATA_CONVERSION (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO); pre_invoke_state.state_ = @@ -335,7 +330,6 @@ TAO_RT_Servant_Dispatcher::post_invoke (TAO_Root_POA &poa, pre_invoke_state.state_ = TAO::Portable_Server::Servant_Upcall::Pre_Invoke_State::NO_ACTION_REQUIRED; - try { // Reset the priority of the current thread back to its original @@ -344,8 +338,7 @@ TAO_RT_Servant_Dispatcher::post_invoke (TAO_Root_POA &poa, poa.orb_core ().get_protocols_hooks (); if (tph->set_thread_native_priority ( - pre_invoke_state.original_native_priority_ - ) + pre_invoke_state.original_native_priority_) == -1) throw ::CORBA::DATA_CONVERSION (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO); diff --git a/TAO/tao/RTScheduling/RTScheduler_Manager.cpp b/TAO/tao/RTScheduling/RTScheduler_Manager.cpp index 477e550a994..773ab9cdc02 100644 --- a/TAO/tao/RTScheduling/RTScheduler_Manager.cpp +++ b/TAO/tao/RTScheduling/RTScheduler_Manager.cpp @@ -20,8 +20,7 @@ TAO_RTScheduler_Manager::~TAO_RTScheduler_Manager (void) } TAO_RTScheduler_Manager_ptr -TAO_RTScheduler_Manager::_narrow (CORBA::Object_ptr obj - ) +TAO_RTScheduler_Manager::_narrow (CORBA::Object_ptr obj) { return TAO_RTScheduler_Manager::_duplicate ( diff --git a/TAO/tao/Remote_Invocation.cpp b/TAO/tao/Remote_Invocation.cpp index 038e7cb7001..d2893173fbf 100644 --- a/TAO/tao/Remote_Invocation.cpp +++ b/TAO/tao/Remote_Invocation.cpp @@ -35,8 +35,7 @@ namespace TAO } void - Remote_Invocation::init_target_spec (TAO_Target_Specification &target_spec - ) + Remote_Invocation::init_target_spec (TAO_Target_Specification &target_spec) { /** * Mega hack for RTCORBA start. I don't think that @@ -46,8 +45,7 @@ namespace TAO this->resolver_.stub ()->orb_core ()->service_context_list ( this->resolver_.stub (), this->details_.request_service_context (), - 0 - ); + 0); /** * Mega hack for RTCORBA END */ @@ -65,10 +63,10 @@ namespace TAO IOP::TaggedProfile *tp = pfile->create_tagged_profile (); - if (tp) - { - target_spec.target_specifier (*tp); - } + if (tp) + { + target_spec.target_specifier (*tp); + } } break; @@ -110,8 +108,7 @@ namespace TAO TAO_OutputCDR &out_stream ) { - this->resolver_.transport ()->clear_translators (0, - &out_stream); + this->resolver_.transport ()->clear_translators (0, &out_stream); // Send the request for the header if (this->resolver_.transport ()->generate_request_header (this->details_, @@ -122,13 +119,11 @@ namespace TAO throw ::CORBA::MARSHAL (); } - this->resolver_.transport ()->assign_translators (0, - &out_stream); + this->resolver_.transport ()->assign_translators (0, &out_stream); } void - Remote_Invocation::marshal_data (TAO_OutputCDR &out_stream - ) + Remote_Invocation::marshal_data (TAO_OutputCDR &out_stream) { if (this->details_.marshal_args (out_stream) == false) { @@ -141,16 +136,14 @@ namespace TAO Invocation_Status Remote_Invocation::send_message (TAO_OutputCDR &cdr, short message_semantics, - ACE_Time_Value *max_wait_time - ) + ACE_Time_Value *max_wait_time) { TAO_Protocols_Hooks *tph = this->resolver_.stub ()->orb_core ()->get_protocols_hooks (); CORBA::Boolean set_client_network_priority = tph->set_client_network_priority (this->resolver_.transport ()->tag (), - this->resolver_.stub () - ); + this->resolver_.stub ()); TAO_Connection_Handler *connection_handler = this->resolver_.transport ()->connection_handler (); diff --git a/TAO/tao/Service_Context.cpp b/TAO/tao/Service_Context.cpp index 78cc30595b6..a3b21b71162 100644 --- a/TAO/tao/Service_Context.cpp +++ b/TAO/tao/Service_Context.cpp @@ -17,8 +17,7 @@ ACE_RCSID (tao, TAO_BEGIN_VERSIONED_NAMESPACE_DECL void -TAO_Service_Context::set_context_i (IOP::ServiceId id, - TAO_OutputCDR &cdr) +TAO_Service_Context::set_context_i (IOP::ServiceId id, TAO_OutputCDR &cdr) { IOP::ServiceContext context; context.context_id = id; diff --git a/TAO/tao/Service_Context.h b/TAO/tao/Service_Context.h index 9a379d726f4..3c160e521b0 100644 --- a/TAO/tao/Service_Context.h +++ b/TAO/tao/Service_Context.h @@ -68,7 +68,6 @@ public: /// Constructor TAO_Service_Context (void); - /// = Generic components /// Insert the component into the list, making a copy of the octet @@ -113,7 +112,7 @@ public: /// list. void set_context (IOP::ServiceContext &context, TAO_OutputCDR &cdr); - /// Is the <id> available in the underlying service context list? If + /// Is the @a id available in the underlying service context list? If /// so return true, else return false bool is_service_id (IOP::ServiceId id); @@ -123,11 +122,11 @@ public: /// Return the underlying service context list IOP::ServiceContextList &service_info (void); - const IOP::ServiceContextList &service_info (void) const; - // @@ Note: The above method is only for backward comptiblity. We + // @note This method is only for backward comptiblity. We // need to get this removed once RT folks have their service // addition info done through this interface + const IOP::ServiceContextList &service_info (void) const; private: /// Helper methods to implement set_context() diff --git a/TAO/tao/Service_Context.inl b/TAO/tao/Service_Context.inl index 26988bc8d8b..035925bb348 100644 --- a/TAO/tao/Service_Context.inl +++ b/TAO/tao/Service_Context.inl @@ -24,8 +24,7 @@ TAO_Service_Context::service_info (void) const ACE_INLINE void -TAO_Service_Context::set_context (IOP::ServiceId id, - TAO_OutputCDR &cdr) +TAO_Service_Context::set_context (IOP::ServiceId id, TAO_OutputCDR &cdr) { this->set_context_i (id, cdr); diff --git a/TAO/tao/SmartProxies/Smart_Proxies.cpp b/TAO/tao/SmartProxies/Smart_Proxies.cpp index 10707265d59..e08224f4054 100644 --- a/TAO/tao/SmartProxies/Smart_Proxies.cpp +++ b/TAO/tao/SmartProxies/Smart_Proxies.cpp @@ -8,9 +8,7 @@ ACE_RCSID(SmartProxies, Smart_Proxies, "$Id$") #include "tao/SmartProxies/Smart_Proxies.inl" #endif /* defined INLINE */ -// Add this line to please the AIX linker, otherwise it complains -// "ld: 0711-244 ERROR: No csects or exported symbols have been saved." +TAO_Smart_Proxy_Base::~TAO_Smart_Proxy_Base (void) +{ +} -#if defined (ACE_NDEBUG) && defined (AIX) -int the_bogus_value_to_please_linker_to_export_symbol; -#endif diff --git a/TAO/tao/SmartProxies/Smart_Proxies.inl b/TAO/tao/SmartProxies/Smart_Proxies.inl index 232cacd0f34..79966fdc732 100644 --- a/TAO/tao/SmartProxies/Smart_Proxies.inl +++ b/TAO/tao/SmartProxies/Smart_Proxies.inl @@ -15,9 +15,4 @@ TAO_Smart_Proxy_Base::TAO_Smart_Proxy_Base (CORBA::Object_ptr proxy) { } -ACE_INLINE -TAO_Smart_Proxy_Base::~TAO_Smart_Proxy_Base (void) -{ -} - TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Strategies/DIOP_Connection_Handler.cpp b/TAO/tao/Strategies/DIOP_Connection_Handler.cpp index 001410ed11e..ca8f2f86d1f 100644 --- a/TAO/tao/Strategies/DIOP_Connection_Handler.cpp +++ b/TAO/tao/Strategies/DIOP_Connection_Handler.cpp @@ -128,26 +128,19 @@ TAO_DIOP_Connection_Handler::open (void*) // for consistency with other protocols. TAO_DIOP_Protocol_Properties protocol_properties; - TAO_Protocols_Hooks *tph = - this->orb_core ()->get_protocols_hooks (); - - bool client = - this->transport ()->opened_as () == TAO::TAO_CLIENT_ROLE; + TAO_Protocols_Hooks *tph = this->orb_core ()->get_protocols_hooks (); + bool const client = this->transport ()->opened_as () == TAO::TAO_CLIENT_ROLE; try { if (client) { - tph->client_protocol_properties_at_orb_level ( - protocol_properties - ); + tph->client_protocol_properties_at_orb_level (protocol_properties); } else { - tph->server_protocol_properties_at_orb_level ( - protocol_properties - ); + tph->server_protocol_properties_at_orb_level (protocol_properties); } } catch ( ::CORBA::Exception&) diff --git a/TAO/tao/Strategies/SCIOP_Connection_Handler.cpp b/TAO/tao/Strategies/SCIOP_Connection_Handler.cpp index 4957d915f76..e8d1a2ec799 100644 --- a/TAO/tao/Strategies/SCIOP_Connection_Handler.cpp +++ b/TAO/tao/Strategies/SCIOP_Connection_Handler.cpp @@ -107,26 +107,20 @@ TAO_SCIOP_Connection_Handler::open (void*) protocol_properties.no_delay_ = this->orb_core ()->orb_params ()->nodelay (); - TAO_Protocols_Hooks *tph = - this->orb_core ()->get_protocols_hooks (); + TAO_Protocols_Hooks *tph = this->orb_core ()->get_protocols_hooks (); - bool client = - this->transport ()->opened_as () == TAO::TAO_CLIENT_ROLE;; + bool const client = this->transport ()->opened_as () == TAO::TAO_CLIENT_ROLE; try { if (client) { - tph->client_protocol_properties_at_orb_level ( - protocol_properties - ); + tph->client_protocol_properties_at_orb_level (protocol_properties); } else { - tph->server_protocol_properties_at_orb_level ( - protocol_properties - ); + tph->server_protocol_properties_at_orb_level (protocol_properties); } } catch ( ::CORBA::Exception& ex) diff --git a/TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp b/TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp index c89b86e9fc4..3b04e2fc151 100644 --- a/TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp +++ b/TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp @@ -91,26 +91,20 @@ TAO_SHMIOP_Connection_Handler::open (void*) protocol_properties.no_delay_ = this->orb_core ()->orb_params ()->nodelay (); - TAO_Protocols_Hooks *tph = - this->orb_core ()->get_protocols_hooks (); + TAO_Protocols_Hooks *tph = this->orb_core ()->get_protocols_hooks (); - bool client = - this->transport ()->opened_as () == TAO::TAO_CLIENT_ROLE;; + bool const client = this->transport ()->opened_as () == TAO::TAO_CLIENT_ROLE; try { if (client) { - tph->client_protocol_properties_at_orb_level ( - protocol_properties - ); + tph->client_protocol_properties_at_orb_level (protocol_properties); } else { - tph->server_protocol_properties_at_orb_level ( - protocol_properties - ); + tph->server_protocol_properties_at_orb_level (protocol_properties); } } catch ( ::CORBA::Exception&) diff --git a/TAO/tao/Strategies/UIOP_Connection_Handler.cpp b/TAO/tao/Strategies/UIOP_Connection_Handler.cpp index 1d61d31ef21..a02b6d8f748 100644 --- a/TAO/tao/Strategies/UIOP_Connection_Handler.cpp +++ b/TAO/tao/Strategies/UIOP_Connection_Handler.cpp @@ -88,26 +88,20 @@ TAO_UIOP_Connection_Handler::open (void*) protocol_properties.recv_buffer_size_ = this->orb_core ()->orb_params ()->sock_rcvbuf_size (); - TAO_Protocols_Hooks *tph = - this->orb_core ()->get_protocols_hooks (); + TAO_Protocols_Hooks *tph = this->orb_core ()->get_protocols_hooks (); - bool client = - this->transport ()->opened_as () == TAO::TAO_CLIENT_ROLE;; + bool const client = this->transport ()->opened_as () == TAO::TAO_CLIENT_ROLE; try { if (client) { - tph->client_protocol_properties_at_orb_level ( - protocol_properties - ); + tph->client_protocol_properties_at_orb_level (protocol_properties); } else { - tph->server_protocol_properties_at_orb_level ( - protocol_properties - ); + tph->server_protocol_properties_at_orb_level (protocol_properties); } } catch ( ::CORBA::Exception& ex) diff --git a/TAO/tao/TC.mpc b/TAO/tao/TC.mpc index d73a7117356..6bed615c2c1 100644 --- a/TAO/tao/TC.mpc +++ b/TAO/tao/TC.mpc @@ -31,7 +31,7 @@ project(*) : taolib_with_idl, tao_versioning_idl_defaults, install, interceptors idlflags += -Wb,export_include=tao/TransportCurrent/Transport_Current_Export.h \ -Wb,export_macro=TAO_Transport_Current_Export \ -o TransportCurrent -I./TransportCurrent - idlflags -= -Sa -St + idlflags -= -Sa -St -Sci -SS TransportCurrent/TC.idl } diff --git a/TAO/tao/Transport_Acceptor.h b/TAO/tao/Transport_Acceptor.h index 240e309b419..74ed065f013 100644 --- a/TAO/tao/Transport_Acceptor.h +++ b/TAO/tao/Transport_Acceptor.h @@ -117,7 +117,7 @@ public: CORBA::Short priority) = 0; /// Return 1 if the @a endpoint has the same address as the acceptor. - virtual int is_collocated (const TAO_Endpoint* endpoint) = 0; + virtual int is_collocated (const TAO_Endpoint *endpoint) = 0; /** * Returns the number of endpoints this acceptor is listening on. This diff --git a/TAO/tao/Transport_Connector.h b/TAO/tao/Transport_Connector.h index 09db417f804..8de3a02fcbb 100644 --- a/TAO/tao/Transport_Connector.h +++ b/TAO/tao/Transport_Connector.h @@ -84,10 +84,7 @@ public: /// Parse a string containing a URL style IOR and return an /// MProfile. Verify that ior is in the correct format. - int make_mprofile ( - const char *ior, - TAO_MProfile &mprofile - ); + int make_mprofile (const char *ior, TAO_MProfile &mprofile); /// Helper function to assist corbaloc parsing. The default simply validates /// the protocol identifyier and scans up to the next comma or slash. @@ -95,13 +92,10 @@ public: /// method to provide a custom scanner. /// The profile returned is either null if this the ior does not match or an /// empty profile of the correct type, obtained from make_profile(). - virtual TAO_Profile * corbaloc_scan (const char *ior, - size_t &len - ); + virtual TAO_Profile *corbaloc_scan (const char *ior, size_t &len); /// Initialize object and register with reactor. - virtual int open ( - TAO_ORB_Core *orb_core) = 0; + virtual int open (TAO_ORB_Core *orb_core) = 0; /// Shutdown Connector bridge and concrete Connector. virtual int close (void) = 0; @@ -111,29 +105,23 @@ public: * connect () method so it can be called from the invocation code * independent of the actual transport protocol in use. */ - virtual TAO_Transport* connect ( - TAO::Profile_Transport_Resolver *r, - TAO_Transport_Descriptor_Interface *desc, - ACE_Time_Value *timeout - ); + virtual TAO_Transport *connect (TAO::Profile_Transport_Resolver *r, + TAO_Transport_Descriptor_Interface *desc, + ACE_Time_Value *timeout); /// A variation on connect that will try simultanious connections /// on all endpoints listed in the desc. - virtual TAO_Transport* parallel_connect ( - TAO::Profile_Transport_Resolver *r, - TAO_Transport_Descriptor_Interface *desc, - ACE_Time_Value *timeout - ); + virtual TAO_Transport *parallel_connect (TAO::Profile_Transport_Resolver *r, + TAO_Transport_Descriptor_Interface + *desc, ACE_Time_Value *timeout); /// Create a profile for this protocol and initialize it based on the /// encapsulation in @a cdr - virtual TAO_Profile *create_profile ( - TAO_InputCDR& cdr) = 0; + virtual TAO_Profile *create_profile (TAO_InputCDR &cdr) = 0; /// Check that the prefix of the provided endpoint is valid for use /// with a given pluggable protocol. - virtual int check_prefix ( - const char *endpoint) = 0; + virtual int check_prefix (const char *endpoint) = 0; /// Return the object key delimiter to use or expect. virtual char object_key_delimiter (void) const = 0; @@ -154,10 +142,9 @@ protected: virtual int set_validate_endpoint (TAO_Endpoint *endpoint) = 0; /// Make a connection - virtual TAO_Transport* make_connection ( - TAO::Profile_Transport_Resolver *r, - TAO_Transport_Descriptor_Interface &desc, - ACE_Time_Value *timeout) = 0; + virtual TAO_Transport *make_connection (TAO::Profile_Transport_Resolver *r, + TAO_Transport_Descriptor_Interface + &desc, ACE_Time_Value *timeout) = 0; /// Make a connection using - not a pure virtual since not all /// protocols support this. @@ -167,8 +154,7 @@ protected: ACE_Time_Value *timeout); /// Cancel the passed cvs handler from the connector - virtual int cancel_svc_handler ( - TAO_Connection_Handler *svc_handler) = 0; + virtual int cancel_svc_handler (TAO_Connection_Handler *svc_handler) = 0; /// Check whether the connection is not closed /** @@ -176,8 +162,8 @@ protected: * because an other thread managed to open the handler * @retval -1 The connection is closed */ - virtual int check_connection_closure ( - TAO_Connection_Handler *connection_handler); + virtual int check_connection_closure (TAO_Connection_Handler + *connection_handler); /** * Wait for connection completion. We have a transport that is not diff --git a/TAO/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.cpp b/TAO/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.cpp index 0ceeedd523b..5840ace6337 100644 --- a/TAO/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.cpp +++ b/TAO/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.cpp @@ -22,17 +22,12 @@ CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_struct_tc ( const char * id, const char * name, - const CORBA::StructMemberSeq & members - - ) + const CORBA::StructMemberSeq & members) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; - return tcf.create_struct_tc (id, - name, - members - ); + return tcf.create_struct_tc (id, name, members); } CORBA::TypeCode_ptr @@ -40,9 +35,7 @@ TAO_TypeCodeFactory_Adapter_Impl::create_union_tc ( const char * id, const char * name, CORBA::TypeCode_ptr discriminator_type, - const CORBA::UnionMemberSeq & members - - ) + const CORBA::UnionMemberSeq & members) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; @@ -58,9 +51,7 @@ CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_enum_tc ( const char * id, const char * name, - const CORBA::EnumMemberSeq & members - - ) + const CORBA::EnumMemberSeq & members) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; @@ -75,9 +66,7 @@ CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_alias_tc ( const char * id, const char * name, - CORBA::TypeCode_ptr original_type - - ) + CORBA::TypeCode_ptr original_type) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; @@ -92,9 +81,7 @@ CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_exception_tc ( const char * id, const char * name, - const CORBA::StructMemberSeq & members - - ) + const CORBA::StructMemberSeq & members) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; @@ -108,9 +95,7 @@ TAO_TypeCodeFactory_Adapter_Impl::create_exception_tc ( CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_interface_tc ( const char * id, - const char * name - - ) + const char * name) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; @@ -121,74 +106,54 @@ TAO_TypeCodeFactory_Adapter_Impl::create_interface_tc ( } CORBA::TypeCode_ptr -TAO_TypeCodeFactory_Adapter_Impl::create_string_tc ( - CORBA::ULong bound - - ) +TAO_TypeCodeFactory_Adapter_Impl::create_string_tc (CORBA::ULong bound) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; - return tcf.create_string_tc (bound - ); + return tcf.create_string_tc (bound); } CORBA::TypeCode_ptr -TAO_TypeCodeFactory_Adapter_Impl::create_wstring_tc ( - CORBA::ULong bound - - ) +TAO_TypeCodeFactory_Adapter_Impl::create_wstring_tc (CORBA::ULong bound) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; - return tcf.create_wstring_tc (bound - ); + return tcf.create_wstring_tc (bound); } CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_fixed_tc ( CORBA::UShort digits, - CORBA::UShort scale - - ) + CORBA::UShort scale) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; - return tcf.create_fixed_tc (digits, - scale - ); + return tcf.create_fixed_tc (digits, scale); } CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_sequence_tc ( CORBA::ULong bound, - CORBA::TypeCode_ptr element_type - - ) + CORBA::TypeCode_ptr element_type) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; - return tcf.create_sequence_tc (bound, - element_type - ); + return tcf.create_sequence_tc (bound, element_type); } CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_array_tc ( CORBA::ULong length, - CORBA::TypeCode_ptr element_type - - ) + CORBA::TypeCode_ptr element_type) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; - return tcf.create_array_tc (length, - element_type - ); + return tcf.create_array_tc (length, element_type); } CORBA::TypeCode_ptr @@ -197,9 +162,7 @@ TAO_TypeCodeFactory_Adapter_Impl::create_value_tc ( const char * name, CORBA::ValueModifier type_modifier, CORBA::TypeCode_ptr concrete_base, - const CORBA::ValueMemberSeq & members - - ) + const CORBA::ValueMemberSeq & members) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; @@ -208,113 +171,83 @@ TAO_TypeCodeFactory_Adapter_Impl::create_value_tc ( name, type_modifier, concrete_base, - members - ); + members); } CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_value_box_tc ( const char * id, const char * name, - CORBA::TypeCode_ptr boxed_type - - ) + CORBA::TypeCode_ptr boxed_type) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; - return tcf.create_value_box_tc (id, - name, - boxed_type - ); + return tcf.create_value_box_tc (id, name, boxed_type); } CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_native_tc ( const char * id, - const char * name - - ) + const char * name) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; - return tcf.create_native_tc (id, - name - ); + return tcf.create_native_tc (id, name); } CORBA::TypeCode_ptr -TAO_TypeCodeFactory_Adapter_Impl::create_recursive_tc ( - const char * id - - ) +TAO_TypeCodeFactory_Adapter_Impl::create_recursive_tc (const char * id) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; - return tcf.create_recursive_tc (id - ); + return tcf.create_recursive_tc (id); } CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_abstract_interface_tc ( const char * id, - const char * name - - ) + const char * name) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; - return tcf.create_abstract_interface_tc (id, - name - ); + return tcf.create_abstract_interface_tc (id, name); } CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_local_interface_tc ( const char * id, - const char * name - - ) + const char * name) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; - return tcf.create_local_interface_tc (id, - name - ); + return tcf.create_local_interface_tc (id, name); } CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_component_tc ( const char *id, - const char *name - - ) + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; - return tcf.create_component_tc (id, - name - ); + return tcf.create_component_tc (id, name); } CORBA::TypeCode_ptr TAO_TypeCodeFactory_Adapter_Impl::create_home_tc ( const char *id, - const char *name - - ) + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; - return tcf.create_home_tc (id, - name - ); + return tcf.create_home_tc (id, name); } CORBA::TypeCode_ptr @@ -323,9 +256,7 @@ TAO_TypeCodeFactory_Adapter_Impl::create_event_tc ( const char *name, CORBA::ValueModifier type_modifier, CORBA::TypeCode_ptr concrete_base, - const CORBA::ValueMemberSeq &members - - ) + const CORBA::ValueMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_TypeCodeFactory_i tcf; diff --git a/TAO/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.h b/TAO/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.h index 530d58361f7..961f84e4f09 100644 --- a/TAO/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.h +++ b/TAO/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.h @@ -45,82 +45,60 @@ public: virtual CORBA::TypeCode_ptr create_struct_tc ( const char *id, const char *name, - const CORBA::StructMemberSeq &members - ) - + const CORBA::StructMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_union_tc ( const char *id, const char *name, CORBA::TypeCode_ptr discriminator_type, - const CORBA::UnionMemberSeq &members - ) - + const CORBA::UnionMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_enum_tc ( const char *id, const char *name, - const CORBA::EnumMemberSeq &members - ) - + const CORBA::EnumMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_alias_tc ( const char *id, const char *name, - CORBA::TypeCode_ptr original_type - ) - + CORBA::TypeCode_ptr original_type) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_exception_tc ( const char *id, const char *name, - const CORBA::StructMemberSeq &members - ) - + const CORBA::StructMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_interface_tc ( const char *id, - const char *name - ) - + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_string_tc ( - CORBA::ULong bound - ) - + CORBA::ULong bound) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_wstring_tc ( - CORBA::ULong bound - ) - + CORBA::ULong bound) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_fixed_tc ( CORBA::UShort digits, - CORBA::UShort scale - ) - + CORBA::UShort scale) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_sequence_tc ( CORBA::ULong bound, - CORBA::TypeCode_ptr element_type - ) - + CORBA::TypeCode_ptr element_type) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_array_tc ( CORBA::ULong length, - CORBA::TypeCode_ptr element_type - ) - + CORBA::TypeCode_ptr element_type) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_value_tc ( @@ -128,58 +106,42 @@ public: const char *name, CORBA::ValueModifier type_modifier, CORBA::TypeCode_ptr concrete_base, - const CORBA::ValueMemberSeq &members - ) - + const CORBA::ValueMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_value_box_tc ( const char *id, const char *name, - CORBA::TypeCode_ptr boxed_type - ) - + CORBA::TypeCode_ptr boxed_type) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_native_tc ( const char *id, - const char *name - ) - + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_recursive_tc ( - const char *id - ) - + const char *id) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_abstract_interface_tc ( const char *id, - const char *name - ) - + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_local_interface_tc ( const char *id, - const char *name - ) - + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_component_tc ( const char *id, - const char *name - - ) + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_home_tc ( const char *id, - const char *name - - ) + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_event_tc ( @@ -187,9 +149,7 @@ public: const char *name, CORBA::ValueModifier type_modifier, CORBA::TypeCode_ptr concrete_base, - const CORBA::ValueMemberSeq &members - - ) + const CORBA::ValueMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)); /** @@ -204,8 +164,7 @@ public: char const * id, char const * name, ACE_Array_Base<CORBA::String_var> const & enumerators, - CORBA::ULong ncases - ); + CORBA::ULong ncases); /// Create a structure or exception TypeCode. virtual CORBA::TypeCode_ptr create_struct_except_tc ( @@ -215,8 +174,7 @@ public: ACE_Array_Base< TAO::TypeCode::Struct_Field<CORBA::String_var, CORBA::TypeCode_var> > const & fields, - CORBA::ULong nfields - ); + CORBA::ULong nfields); /// Create a union TypeCode. virtual CORBA::TypeCode_ptr create_union_tc ( @@ -228,8 +186,7 @@ public: CORBA::ULong ncases, CORBA::Long default_index, char const * default_case_name, - CORBA::TypeCode_ptr default_case_type - ); + CORBA::TypeCode_ptr default_case_type); /// Create a valuetype or eventtype TypeCode. virtual CORBA::TypeCode_ptr create_value_event_tc ( @@ -241,8 +198,7 @@ public: ACE_Array_Base< TAO::TypeCode::Value_Field<CORBA::String_var, CORBA::TypeCode_var> > const & fields, - CORBA::ULong nfields - ); + CORBA::ULong nfields); //@} diff --git a/TAO/tao/TypeCodeFactory/TypeCodeFactory_Loader.cpp b/TAO/tao/TypeCodeFactory/TypeCodeFactory_Loader.cpp index 4330cffdaa0..2562e71c5bc 100644 --- a/TAO/tao/TypeCodeFactory/TypeCodeFactory_Loader.cpp +++ b/TAO/tao/TypeCodeFactory/TypeCodeFactory_Loader.cpp @@ -32,8 +32,7 @@ TAO_TypeCodeFactory_Loader::TAO_TypeCodeFactory_Loader (void) CORBA::Object_ptr TAO_TypeCodeFactory_Loader::create_object (CORBA::ORB_ptr, int, - ACE_TCHAR * [] - ) + ACE_TCHAR * []) ACE_THROW_SPEC ((CORBA::SystemException)) { CORBA::Object_ptr obj; diff --git a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp index a3a19e95c46..c996a43c1f2 100644 --- a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp +++ b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp @@ -114,8 +114,7 @@ TAO_TypeCodeFactory_i::~TAO_TypeCodeFactory_i (void) } TAO_TypeCodeFactory_i * -TAO_TypeCodeFactory_i::_narrow (CORBA::Object_ptr _tao_objref - ) +TAO_TypeCodeFactory_i::_narrow (CORBA::Object_ptr _tao_objref) { if (CORBA::is_nil (_tao_objref)) { @@ -129,16 +128,13 @@ CORBA::TypeCode_ptr TAO_TypeCodeFactory_i::create_struct_tc ( const char *id, const char *name, - const CORBA::StructMemberSeq &members - - ) + const CORBA::StructMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->struct_except_tc_common (id, name, members, - CORBA::tk_struct - ); + CORBA::tk_struct); } CORBA::TypeCode_ptr @@ -146,9 +142,7 @@ TAO_TypeCodeFactory_i::create_union_tc ( const char *id, const char *name, CORBA::TypeCode_ptr discriminator_type, - const CORBA::UnionMemberSeq &members - - ) + const CORBA::UnionMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)) { CORBA::TypeCode_ptr tc = CORBA::TypeCode::_nil (); @@ -168,8 +162,7 @@ TAO_TypeCodeFactory_i::create_union_tc ( } CORBA::Boolean const good_disc_type = - this->valid_disc_type (discriminator_type - ); + this->valid_disc_type (discriminator_type); if (!good_disc_type) { @@ -206,8 +199,7 @@ TAO_TypeCodeFactory_i::create_union_tc ( if (ACE_OS::strcmp (member_name, members[i - 1].name) == 0) { CORBA::Boolean const equiv = - member.type.in ()->equivalent (members[i - 1].type.in () - ); + member.type.in ()->equivalent (members[i - 1].type.in ()); // If adjacent names are the same and their types are // equivalent, then they are duplicate case labels. If @@ -631,9 +623,7 @@ CORBA::TypeCode_ptr TAO_TypeCodeFactory_i::create_enum_tc ( const char *id, const char *name, - const CORBA::EnumMemberSeq &members - - ) + const CORBA::EnumMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)) { CORBA::TypeCode_ptr tc = CORBA::TypeCode::_nil (); @@ -693,78 +683,59 @@ CORBA::TypeCode_ptr TAO_TypeCodeFactory_i::create_alias_tc ( const char *id, const char *name, - CORBA::TypeCode_ptr original_type - - ) + CORBA::TypeCode_ptr original_type) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->alias_value_box_tc_common (id, name, original_type, - CORBA::tk_alias - ); + CORBA::tk_alias); } CORBA::TypeCode_ptr TAO_TypeCodeFactory_i::create_exception_tc ( const char *id, const char *name, - const CORBA::StructMemberSeq &members - - ) + const CORBA::StructMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->struct_except_tc_common (id, name, members, - CORBA::tk_except - ); + CORBA::tk_except); } CORBA::TypeCode_ptr TAO_TypeCodeFactory_i::create_interface_tc ( const char *id, - const char *name - - ) + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->create_tc_common (id, name, - CORBA::tk_objref - ); + CORBA::tk_objref); } CORBA::TypeCode_ptr -TAO_TypeCodeFactory_i::create_string_tc ( - CORBA::ULong bound - - ) +TAO_TypeCodeFactory_i::create_string_tc (CORBA::ULong bound) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->string_wstring_tc_common (bound, - CORBA::tk_string - ); + CORBA::tk_string); } CORBA::TypeCode_ptr -TAO_TypeCodeFactory_i::create_wstring_tc ( - CORBA::ULong bound - - ) +TAO_TypeCodeFactory_i::create_wstring_tc (CORBA::ULong bound) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->string_wstring_tc_common (bound, - CORBA::tk_wstring - ); + CORBA::tk_wstring); } CORBA::TypeCode_ptr TAO_TypeCodeFactory_i::create_fixed_tc ( CORBA::UShort digits, - CORBA::UShort scale - - ) + CORBA::UShort scale) ACE_THROW_SPEC ((CORBA::SystemException)) { CORBA::TypeCode_ptr tc; @@ -779,29 +750,23 @@ TAO_TypeCodeFactory_i::create_fixed_tc ( CORBA::TypeCode_ptr TAO_TypeCodeFactory_i::create_sequence_tc ( CORBA::ULong bound, - CORBA::TypeCode_ptr element_type - - ) + CORBA::TypeCode_ptr element_type) ACE_THROW_SPEC ((CORBA::SystemException)) { return sequence_array_tc_common (bound, element_type, - CORBA::tk_sequence - ); + CORBA::tk_sequence); } CORBA::TypeCode_ptr TAO_TypeCodeFactory_i::create_array_tc ( CORBA::ULong length, - CORBA::TypeCode_ptr element_type - - ) + CORBA::TypeCode_ptr element_type) ACE_THROW_SPEC ((CORBA::SystemException)) { return sequence_array_tc_common (length, element_type, - CORBA::tk_array - ); + CORBA::tk_array); } CORBA::TypeCode_ptr @@ -811,7 +776,6 @@ TAO_TypeCodeFactory_i::create_value_tc ( CORBA::ValueModifier type_modifier, CORBA::TypeCode_ptr concrete_base, const CORBA::ValueMemberSeq &members - ) ACE_THROW_SPEC ((CORBA::SystemException)) { @@ -829,7 +793,6 @@ TAO_TypeCodeFactory_i::create_value_box_tc ( const char *id, const char *name, CORBA::TypeCode_ptr boxed_type - ) ACE_THROW_SPEC ((CORBA::SystemException)) { @@ -844,7 +807,6 @@ CORBA::TypeCode_ptr TAO_TypeCodeFactory_i::create_native_tc ( const char *id, const char *name - ) ACE_THROW_SPEC ((CORBA::SystemException)) { @@ -855,10 +817,7 @@ TAO_TypeCodeFactory_i::create_native_tc ( } CORBA::TypeCode_ptr -TAO_TypeCodeFactory_i::create_recursive_tc ( - const char *id - - ) +TAO_TypeCodeFactory_i::create_recursive_tc (const char *id) ACE_THROW_SPEC ((CORBA::SystemException)) { CORBA::TypeCode_ptr tc = CORBA::TypeCode::_nil (); @@ -881,7 +840,6 @@ CORBA::TypeCode_ptr TAO_TypeCodeFactory_i::create_abstract_interface_tc ( const char *id, const char *name - ) ACE_THROW_SPEC ((CORBA::SystemException)) { @@ -895,7 +853,6 @@ CORBA::TypeCode_ptr TAO_TypeCodeFactory_i::create_local_interface_tc ( const char *id, const char *name - ) ACE_THROW_SPEC ((CORBA::SystemException)) { @@ -909,28 +866,21 @@ CORBA::TypeCode_ptr TAO_TypeCodeFactory_i::create_component_tc ( const char *id, const char *name - ) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->create_tc_common (id, name, - CORBA::tk_component - ); + CORBA::tk_component); } CORBA::TypeCode_ptr -TAO_TypeCodeFactory_i::create_home_tc ( - const char *id, - const char *name - - ) +TAO_TypeCodeFactory_i::create_home_tc (const char *id, const char *name) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->create_tc_common (id, name, - CORBA::tk_home - ); + CORBA::tk_home); } CORBA::TypeCode_ptr @@ -939,9 +889,7 @@ TAO_TypeCodeFactory_i::create_event_tc ( const char *name, CORBA::ValueModifier type_modifier, CORBA::TypeCode_ptr concrete_base, - const CORBA::ValueMemberSeq &members - - ) + const CORBA::ValueMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->value_event_tc_common (id, @@ -949,8 +897,7 @@ TAO_TypeCodeFactory_i::create_event_tc ( type_modifier, concrete_base, members, - CORBA::tk_event - ); + CORBA::tk_event); } // ===================================================================== @@ -1419,7 +1366,6 @@ TAO_TypeCodeFactory_i::alias_value_box_tc_common ( const char *name, CORBA::TypeCode_ptr underlying_type, CORBA::TCKind kind - ) ACE_THROW_SPEC ((CORBA::SystemException)) { @@ -1440,8 +1386,7 @@ TAO_TypeCodeFactory_i::alias_value_box_tc_common ( } CORBA::Boolean const valid_content = - this->valid_content_type (underlying_type - ); + this->valid_content_type (underlying_type); if (!valid_content) { @@ -1508,8 +1453,7 @@ TAO_TypeCodeFactory_i::value_event_tc_common ( CORBA::TypeCode_ptr const member_tc = members[index].type.in (); CORBA::Boolean const valid_member = - this->valid_content_type (member_tc - ); + this->valid_content_type (member_tc); if (!valid_member) { @@ -1598,12 +1542,12 @@ TAO_TypeCodeFactory_i::valid_name (const char *name) // Empty string is valid for name. if (*name == '\0') { - return 1; + return true; } if (!isalpha (*name)) { - return 0; + return false; } const char *tmp = name + 1; @@ -1616,11 +1560,11 @@ TAO_TypeCodeFactory_i::valid_name (const char *name) } else { - return 0; + return false; } } - return 1; + return true; } CORBA::Boolean @@ -1651,22 +1595,20 @@ TAO_TypeCodeFactory_i::valid_id (const char *id) } CORBA::Boolean -TAO_TypeCodeFactory_i::valid_content_type (CORBA::TypeCode_ptr tc - ) +TAO_TypeCodeFactory_i::valid_content_type (CORBA::TypeCode_ptr tc) { CORBA::TCKind const kind = - TAO::unaliased_kind (tc - ); + TAO::unaliased_kind (tc); switch (kind) { case CORBA::TAO_TC_KIND_COUNT: - return 1; // Recursive TypeCode. + return true; // Recursive TypeCode. case CORBA::tk_void: case CORBA::tk_except: - return 0; + return false; default: - return 1; + return true; } } @@ -1847,8 +1789,7 @@ bool TAO_TypeCodeFactory_i::check_recursion (CORBA::TCKind kind, char const * id, CORBA::TypeCode_ptr member, - CORBA::TypeCode_ptr & recursive_tc - ) + CORBA::TypeCode_ptr & recursive_tc) { if (kind != CORBA::tk_struct && kind != CORBA::tk_union @@ -1857,8 +1798,7 @@ TAO_TypeCodeFactory_i::check_recursion (CORBA::TCKind kind, return false; CORBA::TypeCode_var unaliased_member = - TAO::unaliased_typecode (member - ); + TAO::unaliased_typecode (member); CORBA::TCKind const unaliased_member_kind = unaliased_member->kind (); @@ -1879,8 +1819,7 @@ TAO_TypeCodeFactory_i::check_recursion (CORBA::TCKind kind, for (CORBA::ULong i = 0; i < nfields; ++i) { CORBA::TypeCode_var member_tc = - unaliased_member->member_type (i - ); + unaliased_member->member_type (i); CORBA::TCKind const member_tc_kind = member_tc->kind (); @@ -2006,9 +1945,7 @@ TAO_TypeCodeFactory_i::check_recursion (CORBA::TCKind kind, } CORBA::TypeCode_ptr -TAO_TypeCodeFactory_i::make_recursive_tc (CORBA::TCKind kind, - char const * id - ) +TAO_TypeCodeFactory_i::make_recursive_tc (CORBA::TCKind kind, char const * id) { CORBA::TypeCode_ptr tc = CORBA::TypeCode::_nil (); diff --git a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.h b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.h index d2c2b708bf5..2d512cbf276 100644 --- a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.h +++ b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.h @@ -59,89 +59,65 @@ public: ~TAO_TypeCodeFactory_i (void); /// = LocalObject methods - static TAO_TypeCodeFactory_i *_narrow ( - CORBA::Object_ptr obj - ); + static TAO_TypeCodeFactory_i *_narrow (CORBA::Object_ptr obj); virtual CORBA::TypeCode_ptr create_struct_tc ( const char *id, const char *name, - const CORBA::StructMemberSeq &members - - ) + const CORBA::StructMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_union_tc ( const char *id, const char *name, CORBA::TypeCode_ptr discriminator_type, - const CORBA::UnionMemberSeq &members - - ) + const CORBA::UnionMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_enum_tc ( const char *id, const char *name, - const CORBA::EnumMemberSeq &members - - ) + const CORBA::EnumMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_alias_tc ( const char *id, const char *name, - CORBA::TypeCode_ptr original_type - - ) + CORBA::TypeCode_ptr original_type) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_exception_tc ( const char *id, const char *name, - const CORBA::StructMemberSeq &members - - ) + const CORBA::StructMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_interface_tc ( const char *id, - const char *name - - ) + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_string_tc ( - CORBA::ULong bound - - ) + CORBA::ULong bound) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_wstring_tc ( - CORBA::ULong bound - - ) + CORBA::ULong bound) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_fixed_tc ( CORBA::UShort digits, - CORBA::UShort scale - - ) + CORBA::UShort scale) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_sequence_tc ( CORBA::ULong bound, - CORBA::TypeCode_ptr element_type - - ) + CORBA::TypeCode_ptr element_type) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_array_tc ( CORBA::ULong length, - CORBA::TypeCode_ptr element_type - - ) + CORBA::TypeCode_ptr element_type) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_value_tc ( @@ -149,58 +125,42 @@ public: const char *name, CORBA::ValueModifier type_modifier, CORBA::TypeCode_ptr concrete_base, - const CORBA::ValueMemberSeq &members - - ) + const CORBA::ValueMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_value_box_tc ( const char *id, const char *name, - CORBA::TypeCode_ptr boxed_type - - ) + CORBA::TypeCode_ptr boxed_type) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_native_tc ( const char *id, - const char *name - - ) + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_recursive_tc ( - const char *id - - ) + const char *id) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_abstract_interface_tc ( const char *id, - const char *name - - ) + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_local_interface_tc ( const char *id, - const char *name - - ) + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_component_tc ( const char *id, - const char *name - - ) + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_home_tc ( const char *id, - const char *name - - ) + const char *name) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::TypeCode_ptr create_event_tc ( @@ -208,9 +168,7 @@ public: const char *name, CORBA::ValueModifier type_modifier, CORBA::TypeCode_ptr concrete_base, - const CORBA::ValueMemberSeq &members - - ) + const CORBA::ValueMemberSeq &members) ACE_THROW_SPEC ((CORBA::SystemException)); private: @@ -224,26 +182,20 @@ private: CORBA::TypeCode_ptr create_tc_common ( const char *id, const char *name, - CORBA::TCKind kind - - ) + CORBA::TCKind kind) ACE_THROW_SPEC ((CORBA::SystemException)); /// Code for strings and wstrings is identical except for TCKind. CORBA::TypeCode_ptr string_wstring_tc_common ( CORBA::ULong bound, - CORBA::TCKind kind - - ) + CORBA::TCKind kind) ACE_THROW_SPEC ((CORBA::SystemException)); /// Code for arrays and sequences is identical except for TCKind. CORBA::TypeCode_ptr sequence_array_tc_common ( CORBA::ULong bound, CORBA::TypeCode_ptr element_type, - CORBA::TCKind kind - - ) + CORBA::TCKind kind) ACE_THROW_SPEC ((CORBA::SystemException)); /// Code for structs and unions is identical except for TCKind. @@ -251,9 +203,7 @@ private: const char *id, const char *name, const CORBA::StructMemberSeq &members, - CORBA::TCKind kind - - ) + CORBA::TCKind kind) ACE_THROW_SPEC ((CORBA::SystemException)); /// Code for aliases and boxed valuetypes is identical except for TCKind. @@ -261,9 +211,7 @@ private: const char *id, const char *name, CORBA::TypeCode_ptr underlying_type, - CORBA::TCKind kind - - ) + CORBA::TCKind kind) ACE_THROW_SPEC ((CORBA::SystemException)); CORBA::TypeCode_ptr value_event_tc_common ( @@ -272,23 +220,18 @@ private: CORBA::ValueModifier type_modifier, CORBA::TypeCode_ptr concrete_base, const CORBA::ValueMemberSeq &members, - CORBA::TCKind kind - - ) + CORBA::TCKind kind) ACE_THROW_SPEC ((CORBA::SystemException)); /// If any of these fail, we raise a spec-defined minor code /// of BAD_PARAM or BAD_TYPECODE. CORBA::Boolean valid_name (const char *name); CORBA::Boolean valid_id (const char *id); - CORBA::Boolean valid_content_type (CORBA::TypeCode_ptr tc - ); + CORBA::Boolean valid_content_type (CORBA::TypeCode_ptr tc); CORBA::Boolean unique_label_values (const CORBA::UnionMemberSeq &members, CORBA::TypeCode_ptr disc_tc, - CORBA::ULong default_index_slot - ); - CORBA::Boolean valid_disc_type (CORBA::TypeCode_ptr tc - ); + CORBA::ULong default_index_slot); + CORBA::Boolean valid_disc_type (CORBA::TypeCode_ptr tc); /// Check @a member for recursive @c TypeCode. /** @@ -300,13 +243,11 @@ private: bool check_recursion (CORBA::TCKind kind, char const * id, CORBA::TypeCode_ptr member, - CORBA::TypeCode_ptr & recursive_tc - ); + CORBA::TypeCode_ptr & recursive_tc); /// Make a recursive TypeCode with the given kind and repository ID. CORBA::TypeCode_ptr make_recursive_tc (CORBA::TCKind kind, - char const * id - ); + char const * id); /// Prohibited TAO_TypeCodeFactory_i (const TAO_TypeCodeFactory_i &src); diff --git a/TAO/tao/UserException.h b/TAO/tao/UserException.h index 34329085baa..e5279f2c4c5 100644 --- a/TAO/tao/UserException.h +++ b/TAO/tao/UserException.h @@ -43,20 +43,19 @@ namespace CORBA public: /// Copy constructor. - UserException (UserException const & rhs); + UserException (UserException const &rhs); /// Destructor. virtual ~UserException (void); /// Assignment operator. - UserException & operator= (UserException const & rhs); + UserException &operator= (UserException const &rhs); /// The narrow operation. - static UserException * _downcast (CORBA::Exception * exception); + static UserException *_downcast (CORBA::Exception *exception); - /// The const version of narrow operation - static const UserException * _downcast ( - CORBA::Exception const * exception); + /// The const version of narrow operation + static const UserException *_downcast (CORBA::Exception const *exception); virtual void _raise (void) const = 0; @@ -65,8 +64,7 @@ namespace CORBA // = TAO specific extension. /// Constructor from a repository id. - UserException (char const * repository_id, - char const * local_name); + UserException (char const *repository_id, char const *local_name); /// Returns a string containing information about the exception. This /// function is not CORBA compliant. diff --git a/TAO/tao/Wait_On_LF_No_Upcall.cpp b/TAO/tao/Wait_On_LF_No_Upcall.cpp index 1a039a0b089..a8832b4a416 100644 --- a/TAO/tao/Wait_On_LF_No_Upcall.cpp +++ b/TAO/tao/Wait_On_LF_No_Upcall.cpp @@ -28,11 +28,11 @@ namespace TAO public: // Maybe we should instead just take in a ptr to // TAO_ORB_Core_TSS_Resources? Or at least ORB_Core*? - Nested_Upcall_Guard (TAO_Transport* t) + Nested_Upcall_Guard (TAO_Transport *t) : t_ (t) { TAO_ORB_Core_TSS_Resources *tss = - t_->orb_core()->get_tss_resources (); + t_->orb_core ()->get_tss_resources (); tss->upcalls_temporarily_suspended_on_this_thread_ = true; @@ -45,7 +45,7 @@ namespace TAO ~Nested_Upcall_Guard (void) { TAO_ORB_Core_TSS_Resources *tss = - t_->orb_core()->get_tss_resources (); + t_->orb_core ()->get_tss_resources (); tss->upcalls_temporarily_suspended_on_this_thread_ = false; @@ -58,16 +58,18 @@ namespace TAO private: - Nested_Upcall_Guard (void) {} + Nested_Upcall_Guard (void) + { + } /// Disallow copying and assignment. Nested_Upcall_Guard (const Nested_Upcall_Guard&); - Nested_Upcall_Guard & operator= (const Nested_Upcall_Guard&); + Nested_Upcall_Guard &operator= (const Nested_Upcall_Guard&); private: /// Pointer to the transport that we plan to use. - TAO_Transport* t_; + TAO_Transport *t_; }; @@ -95,7 +97,7 @@ namespace TAO Wait_On_LF_No_Upcall::can_process_upcalls (void) const { TAO_ORB_Core_TSS_Resources *tss = - this->transport_->orb_core()->get_tss_resources (); + this->transport_->orb_core ()->get_tss_resources (); if ((this->transport_->opened_as () == TAO::TAO_CLIENT_ROLE) && (this->transport_->bidirectional_flag () == 0) && diff --git a/TAO/tao/Wait_On_Leader_Follower.cpp b/TAO/tao/Wait_On_Leader_Follower.cpp index 6b1237b5b8b..c9afa361710 100644 --- a/TAO/tao/Wait_On_Leader_Follower.cpp +++ b/TAO/tao/Wait_On_Leader_Follower.cpp @@ -13,7 +13,8 @@ ACE_RCSID (tao, TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_Wait_On_Leader_Follower::TAO_Wait_On_Leader_Follower (TAO_Transport *transport) +TAO_Wait_On_Leader_Follower::TAO_Wait_On_Leader_Follower + (TAO_Transport *transport) : TAO_Wait_Strategy (transport) { } @@ -59,19 +60,16 @@ TAO_Wait_On_Leader_Follower::sending_request (TAO_ORB_Core *orb_core, // Send the request. //@@ LF_WAIT_STRATEGY_SPL_SENDING_REQUEST_HOOK - return this->TAO_Wait_Strategy::sending_request (orb_core, - two_way); + return this->TAO_Wait_Strategy::sending_request (orb_core, two_way); } int TAO_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, TAO_Synch_Reply_Dispatcher &rd) { - TAO_Leader_Follower& leader_follower = + TAO_Leader_Follower &leader_follower = this->transport_->orb_core ()->leader_follower (); - return leader_follower.wait_for_event (&rd, - this->transport_, - max_wait_time); + return leader_follower.wait_for_event (&rd, this->transport_, max_wait_time); } bool diff --git a/TAO/tao/Wait_On_Reactor.cpp b/TAO/tao/Wait_On_Reactor.cpp index 23c5d59df66..768bf83ce3f 100644 --- a/TAO/tao/Wait_On_Reactor.cpp +++ b/TAO/tao/Wait_On_Reactor.cpp @@ -32,7 +32,7 @@ TAO_Wait_On_Reactor::wait (ACE_Time_Value *max_wait_time, ACE_Countdown_Time countdown (max_wait_time); // Reactor does not change inside the loop. - ACE_Reactor* const reactor = + ACE_Reactor *const reactor = this->transport_->orb_core ()->reactor (); // Do the event loop, till we fully receive a reply. diff --git a/TAO/tao/Wait_Strategy.cpp b/TAO/tao/Wait_Strategy.cpp index 25c4b0af51e..eb57d27d1c5 100644 --- a/TAO/tao/Wait_Strategy.cpp +++ b/TAO/tao/Wait_Strategy.cpp @@ -32,8 +32,8 @@ TAO_Wait_Strategy::~TAO_Wait_Strategy (void) */ //@@ LF_WAIT_STRATEGY_SPL_COMMENT_HOOK_START int -TAO_Wait_Strategy::sending_request (TAO_ORB_Core * /* orb_core */, - int /* two_way */) +TAO_Wait_Strategy::sending_request (TAO_ORB_Core */* orb_core */, + int/* two_way */) { return 0; } diff --git a/TAO/tao/target_specification.h b/TAO/tao/target_specification.h index 5132477c1d8..bb43479af9d 100644 --- a/TAO/tao/target_specification.h +++ b/TAO/tao/target_specification.h @@ -83,9 +83,7 @@ public: * index. Please see the header file IOPC.h on why a profile index * is required. */ - void target_specifier (IOP::IOR &ior, - CORBA::ULong prof_index); - + void target_specifier (IOP::IOR &ior, CORBA::ULong prof_index); /** * Returns the object key after a check of the stored specifier. If |