diff options
author | Angelo Corsaro <angelo@icorsaro.net> | 2000-08-28 22:44:32 +0000 |
---|---|---|
committer | Angelo Corsaro <angelo@icorsaro.net> | 2000-08-28 22:44:32 +0000 |
commit | c0d77b281155c51d0c703ff43f05f9526ed46fc6 (patch) | |
tree | 4a4b092e2e2b1f92fdec6648e4380c34c9b1da59 | |
parent | 201d97463e6508407f06f32f684b351ea89e4652 (diff) | |
download | ATCD-c0d77b281155c51d0c703ff43f05f9526ed46fc6.tar.gz |
ChangeLogTag: Mon Aug 28 17:41:12 2000 Angelo Corsaro <corsaro@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 9 | ||||
-rw-r--r-- | TAO/tests/Exposed_Policies/Counter_i.cpp | 38 | ||||
-rw-r--r-- | TAO/tests/Exposed_Policies/Counter_i.h | 19 |
3 files changed, 45 insertions, 21 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 02711373273..9669c37d2fc 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,12 @@ +Mon Aug 28 17:41:12 2000 Angelo Corsaro <corsaro@cs.wustl.edu> + + * test/Exposed_Policies/Counter_i.h + * test/Exposed_Policies/Counter_i.cpp + * test/Exposed_Policies/Counter.idl + + Added method to IDL interface and related + servant implementation. + Mon Aug 28 17:28:45 2000 Angelo Corsaro <corsaro@cs.wustl.edu> * test/Exposed_Policies/Policy_Tester.h: diff --git a/TAO/tests/Exposed_Policies/Counter_i.cpp b/TAO/tests/Exposed_Policies/Counter_i.cpp index 09417dd932b..38667bdf2c4 100644 --- a/TAO/tests/Exposed_Policies/Counter_i.cpp +++ b/TAO/tests/Exposed_Policies/Counter_i.cpp @@ -4,45 +4,53 @@ ACE_RCSID(tao, Counter_Servant, "$Id$") -// Dtor-Ctor Implementation +// Dtor-Ctor Implementation. -Counter_Servant::Counter_Servant (CORBA::ORB_ptr o) +Counter_Servant::Counter_Servant (Policy_Tester *policy_tester) : count_ (0), - orb_ (CORBA::ORB::_duplicate (o)) + policy_tester_ (policy_tester) { + // No-Op. } Counter_Servant::~Counter_Servant (void) { + // No-Op. } -// Counter Interface Methods Implementation - -// @@ Angelo, you are going to get warnings about unused environment -// parameter in the methods below. - -// @@ Angelo: you are missing all the throw specs, please fix. +// Counter Interface Methods Implementation. void Counter_Servant::increment (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { + ACE_UNUSED_ARG (ACE_TRY_ENV); ++this->count_; } CORBA::Long Counter_Servant::get_count (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { + ACE_UNUSED_ARG (ACE_TRY_ENV); return this->count_; } -// @@ Angelo, it is important that thowspecs in .h file match -// throwspecs in .cpp file, which is not the case for the method -// below. You will get warnings here. +void +Counter_Servant::reset (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_UNUSED_ARG (ACE_TRY_ENV); + this->count_ = 0; +} + void Counter_Servant::shutdown (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) { - this->orb_->shutdown (); + this->policy_tester_->shutdown (ACE_TRY_ENV); + ACE_TRY_CHECK; } -// @@ Angelo, please *use* environment parameter to catch exceptions, -// i.e., ORB::shutdown takes environment argument - use it! + + diff --git a/TAO/tests/Exposed_Policies/Counter_i.h b/TAO/tests/Exposed_Policies/Counter_i.h index 2ce6aec4c99..888b72dbc09 100644 --- a/TAO/tests/Exposed_Policies/Counter_i.h +++ b/TAO/tests/Exposed_Policies/Counter_i.h @@ -19,9 +19,10 @@ #ifndef COUNTER_I_H_ #define COUNTER_I_H_ +// -- App. Specific Include -- #include "CounterS.h" +#include "Policy_Tester.h" -// @@ Angelo: you are missing all the throw specs, please fix. class Counter_Servant : public POA_Counter { @@ -29,24 +30,30 @@ public: // = Ctor-Dtor Declaration - Counter_Servant (CORBA::ORB_ptr o); + Counter_Servant (Policy_Tester *policy_tester); virtual ~Counter_Servant (void); // = Counter Interface Methods Overloading. virtual void increment (CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment ()); + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::Long get_count (CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment ()); - + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual void reset (CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual void shutdown (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); protected: CORBA::Long count_; - CORBA::ORB_var orb_; + Policy_Tester *policy_tester_; }; #endif /*COUNTER_I_H_*/ |