diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-04-19 12:36:57 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-04-19 12:36:57 +0000 |
commit | 66bee597be4a1e12306ae521f779b2e1d03e8533 (patch) | |
tree | e95da9db9a8d2b0af7c1895fce1512ba90ec5ad6 /TAO | |
parent | 13a1987f0663eda4703237336ea02f08984bd295 (diff) | |
download | ATCD-66bee597be4a1e12306ae521f779b2e1d03e8533.tar.gz |
ChangeLogTag: Wed Apr 19 11:39:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO')
5 files changed, 27 insertions, 27 deletions
diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp index decf2fb4302..76d85c4b0c0 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.cpp @@ -23,7 +23,7 @@ TAO_CEC_ProxyPushConsumer:: TAO_CEC_ProxyPushConsumer (TAO_CEC_EventChannel* ec) : event_channel_ (ec), refcount_ (1), - connected_ (0) + connected_ (false) { this->lock_ = this->event_channel_->create_consumer_lock (); @@ -97,15 +97,15 @@ TAO_CEC_ProxyPushConsumer::supplier_non_existent ( CORBA::INTERNAL ()); ACE_CHECK_RETURN (0); - disconnected = 0; - if (this->is_connected_i () == 0) + disconnected = false; + if (!this->is_connected_i ()) { - disconnected = 1; - return 0; + disconnected = true; + return false; } if (CORBA::is_nil (this->supplier_.in ())) { - return 0; + return false; } supplier = CORBA::Object::_duplicate (this->supplier_.in ()); } @@ -113,7 +113,7 @@ TAO_CEC_ProxyPushConsumer::supplier_non_existent ( #if (TAO_HAS_MINIMUM_CORBA == 0) return supplier->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER); #else - return 0; + return false; #endif /* TAO_HAS_MINIMUM_CORBA */ } @@ -130,7 +130,7 @@ TAO_CEC_ProxyPushConsumer::shutdown (ACE_ENV_SINGLE_ARG_DECL) ACE_CHECK; supplier = this->supplier_._retn (); - this->connected_ = 0; + this->connected_ = false; } this->deactivate (ACE_ENV_SINGLE_ARG_PARAMETER); @@ -157,7 +157,7 @@ TAO_CEC_ProxyPushConsumer::cleanup_i (void) { this->supplier_ = CosEventComm::PushSupplier::_nil (); - this->connected_ = 0; + this->connected_ = false; } CORBA::ULong @@ -172,7 +172,7 @@ TAO_CEC_ProxyPushConsumer::_decr_refcnt (void) { { ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->lock_, 0); - this->refcount_--; + --this->refcount_; if (this->refcount_ != 0) return this->refcount_; } @@ -226,7 +226,7 @@ TAO_CEC_ProxyPushConsumer::connect_push_supplier ( } this->supplier_ = CosEventComm::PushSupplier::_duplicate (push_supplier); - this->connected_ = 1; + this->connected_ = true; } // Notify the event channel... @@ -264,7 +264,7 @@ TAO_CEC_ProxyPushConsumer::disconnect_push_consumer ( // @@ CosEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ()); ACE_CHECK; - if (this->is_connected_i () == 0) + if (!this->is_connected_i ()) ACE_THROW (CORBA::BAD_INV_ORDER ()); // @@ add user exception? supplier = this->supplier_._retn (); @@ -324,7 +324,7 @@ TAO_CEC_ProxyPushConsumer_Guard:: refcount_ (refcount), event_channel_ (ec), proxy_ (proxy), - locked_ (0) + locked_ (false) { ACE_Guard<ACE_Lock> ace_mon (*this->lock_); // If the guard fails there is not much we can do, raising an @@ -334,11 +334,11 @@ TAO_CEC_ProxyPushConsumer_Guard:: // @@ Returning something won't work either, the error should be // logged though! - if (proxy->is_connected_i () == 0) + if (!proxy->is_connected_i ()) return; - this->locked_ = 1; - this->refcount_++; + this->locked_ = true; + ++this->refcount_; } TAO_CEC_ProxyPushConsumer_Guard:: @@ -358,7 +358,7 @@ TAO_CEC_ProxyPushConsumer_Guard:: // @@ Returning something won't work either, the error should be // logged though! - this->refcount_--; + --this->refcount_; if (this->refcount_ != 0) return; } diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.h b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.h index 3522459d4aa..29d1d92a8a3 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.h +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.h @@ -44,7 +44,7 @@ class TAO_CEC_ProxyPushSupplier; * The object commits suicide when disconnect_push_consumer() is * called. */ -class TAO_Event_Serv_Export TAO_CEC_ProxyPushConsumer +class TAO_Event_Serv_Export TAO_CEC_ProxyPushConsumer : public POA_CosEventChannelAdmin::ProxyPushConsumer { public: @@ -67,7 +67,7 @@ public: virtual void deactivate (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - /// Return 0 if no supplier is connected... + /// Return false if no supplier is connected... CORBA::Boolean is_connected (void) const; /// Return the consumer object reference. It returns nil() if it has @@ -134,9 +134,9 @@ private: /// The supplier.... CosEventComm::PushSupplier_var supplier_; - /// If the flag is not zero then we are connected, notice that the + /// If the flag is true then we are connected, notice that the /// supplier can be nil. - int connected_; + bool connected_; /// Store the default POA. PortableServer::POA_var default_POA_; @@ -182,9 +182,9 @@ private: /// The proxy whose lifetime is controlled by the reference count TAO_CEC_ProxyPushConsumer *proxy_; - /// This flag is set to 1 if the reference count was successfully + /// This flag is set to true if the reference count was successfully /// acquired. - int locked_; + bool locked_; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.i b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.i index d30cb94f45c..422c95863c6 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.i +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushConsumer.i @@ -41,7 +41,7 @@ TAO_CEC_ProxyPushConsumer::supplier (CosEventComm::PushSupplier_ptr supplier) // **************************************************************** -ACE_INLINE int +ACE_INLINE bool TAO_CEC_ProxyPushConsumer_Guard::locked (void) const { return this->locked_; diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp index e1fced258d9..028bf6e4b28 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.cpp @@ -324,7 +324,7 @@ TAO_CEC_ProxyPushSupplier::_decr_refcnt (void) { { ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->lock_, 0); - this->refcount_--; + --this->refcount_; if (this->refcount_ != 0) return this->refcount_; } diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.i b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.i index 918d4116e35..9f92df16b06 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.i +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_ProxyPushSupplier.i @@ -86,11 +86,11 @@ TAO_CEC_ProxyPushSupplier::is_typed_ec (void) const { if (this->typed_event_channel_ != 0) { - return 1; + return true; } else { - return 0; + return false; } } #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */ |