From 3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c Mon Sep 17 00:00:00 2001 From: "William R. Otte" Date: Mon, 24 Jul 2006 15:50:21 +0000 Subject: Repo restructuring --- TAO/tests/Bug_2417_Regression/subscriber_impl.cpp | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 TAO/tests/Bug_2417_Regression/subscriber_impl.cpp (limited to 'TAO/tests/Bug_2417_Regression/subscriber_impl.cpp') diff --git a/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp b/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp new file mode 100644 index 00000000000..61f25e23349 --- /dev/null +++ b/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp @@ -0,0 +1,45 @@ +// $Id$ + +#include "subscriber_impl.h" +#include "ace/OS_NS_stdio.h" + +Subscriber_impl::Subscriber_impl(CORBA::ORB_ptr orb) +: orb_ (CORBA::ORB::_duplicate (orb)) +, count(0) +{ +} + +Subscriber_impl::~Subscriber_impl() +{ +} + +void +Subscriber_impl::onData ( + ::CORBA::Double + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + ++count; + if (count > 100) + shutdown(); +} + +::CORBA::Boolean +Subscriber_impl::isAlive ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + return true; +} + +void Subscriber_impl::shutdown() +{ + this->orb_->shutdown (0); +} + -- cgit v1.2.1