diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-01-24 15:39:09 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-01-24 15:39:09 +0000 |
commit | b273c8bbb2bb98b5b862d1ce24855ae207b4eb0c (patch) | |
tree | 70bff03d1cf156ecf05ee4c5c338d8ce423e64ee /TAO/tests/Exposed_Policies | |
parent | d43378e7d80d7db5bb3517e16b858fb09b117007 (diff) | |
download | ATCD-b273c8bbb2bb98b5b862d1ce24855ae207b4eb0c.tar.gz |
Wed Jan 24 14:00:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tests/Exposed_Policies')
-rw-r--r-- | TAO/tests/Exposed_Policies/Counter_i.cpp | 5 | ||||
-rw-r--r-- | TAO/tests/Exposed_Policies/Counter_i.h | 8 | ||||
-rw-r--r-- | TAO/tests/Exposed_Policies/Policy_Tester.cpp | 38 | ||||
-rw-r--r-- | TAO/tests/Exposed_Policies/Policy_Tester.h | 6 | ||||
-rw-r--r-- | TAO/tests/Exposed_Policies/Policy_Verifier.cpp | 25 | ||||
-rw-r--r-- | TAO/tests/Exposed_Policies/Policy_Verifier.h | 2 | ||||
-rw-r--r-- | TAO/tests/Exposed_Policies/client.cpp | 4 | ||||
-rw-r--r-- | TAO/tests/Exposed_Policies/server.cpp | 4 |
8 files changed, 22 insertions, 70 deletions
diff --git a/TAO/tests/Exposed_Policies/Counter_i.cpp b/TAO/tests/Exposed_Policies/Counter_i.cpp index 4a707034563..1f2bd43626b 100644 --- a/TAO/tests/Exposed_Policies/Counter_i.cpp +++ b/TAO/tests/Exposed_Policies/Counter_i.cpp @@ -42,9 +42,8 @@ Counter_Servant::reset (ACE_ENV_SINGLE_ARG_DECL_NOT_USED/*ACE_ENV_SINGLE_ARG_PAR } void -Counter_Servant::shutdown (ACE_ENV_SINGLE_ARG_DECL) +Counter_Servant::shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->policy_tester_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->policy_tester_->shutdown (); } diff --git a/TAO/tests/Exposed_Policies/Counter_i.h b/TAO/tests/Exposed_Policies/Counter_i.h index 503d9cd3296..29e6e3e7334 100644 --- a/TAO/tests/Exposed_Policies/Counter_i.h +++ b/TAO/tests/Exposed_Policies/Counter_i.h @@ -35,16 +35,16 @@ public: // = Counter Interface Methods Overloading. - virtual void increment (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + virtual void increment (void) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual CORBA::Long get_count (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + virtual CORBA::Long get_count (void) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void reset (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + virtual void reset (void) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + virtual void shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)); protected: diff --git a/TAO/tests/Exposed_Policies/Policy_Tester.cpp b/TAO/tests/Exposed_Policies/Policy_Tester.cpp index 217eacdae41..906f21ae8a2 100644 --- a/TAO/tests/Exposed_Policies/Policy_Tester.cpp +++ b/TAO/tests/Exposed_Policies/Policy_Tester.cpp @@ -32,17 +32,14 @@ Policy_Tester::~Policy_Tester (void) } void -Policy_Tester::run (ACE_ENV_SINGLE_ARG_DECL) +Policy_Tester::run (void) { PortableServer::POAManager_var poa_manager = - this->child_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->child_poa_->the_POAManager (); - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + poa_manager->activate (); - this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->orb_->run (); } int @@ -54,17 +51,14 @@ Policy_Tester::init (int argc, this->orb_ = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // Get a reference to the RT-ORB. CORBA::Object_var object = this->orb_->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); this->rt_orb_ = RTCORBA::RTORB::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // Here we parse the command line paramether passed // to the application. @@ -79,13 +73,11 @@ Policy_Tester::init (int argc, { this->rt_poa_properties_ = RT_Properties::read_from (arg ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); } else if ((arg = arg_shifter.get_the_parameter ("-ObjectConfigFile"))) { this->rt_object_properties_ = RT_Properties::read_from (arg ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); } else if ((arg = arg_shifter.get_the_parameter ("-BaseObjectIOR"))) { @@ -95,7 +87,6 @@ Policy_Tester::init (int argc, RT_Properties, CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); - ACE_CHECK_RETURN (-1); } this->rt_poa_properties_->ior_source (arg); } @@ -107,7 +98,6 @@ Policy_Tester::init (int argc, RT_Properties, CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); - ACE_CHECK_RETURN (-1); } this->rt_object_properties_->ior_source (arg); } @@ -123,8 +113,7 @@ Policy_Tester::init (int argc, } int result = - this->create_objects (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->create_objects (); if (result != 0) return result; @@ -146,7 +135,7 @@ Policy_Tester::check_reference (CORBA::Object_ptr object, int -Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL) +Policy_Tester::create_objects (void) { CORBA::PolicyList poa_policy_list; poa_policy_list.length (3); @@ -157,7 +146,6 @@ Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL) this->rt_orb_->create_priority_model_policy (RTCORBA::SERVER_DECLARED, priority ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // Create priority Banded Connection Policy. RTCORBA::PriorityBands poa_priority_bands = @@ -166,7 +154,6 @@ Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL) poa_policy_list[1] = this->rt_orb_->create_priority_banded_connection_policy (poa_priority_bands ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // Client Protocol Policy. RTCORBA::ProtocolList protocol_list; @@ -185,11 +172,9 @@ Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL) CORBA::Object_var object = this->orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); this->poa_ = PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); PortableServer::POAManager_var poa_mgr = PortableServer::POAManager::_nil (); @@ -199,18 +184,15 @@ Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL) poa_mgr.in (), poa_policy_list ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); this->child_poa_ = RTPortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // Create a Corba Object reference, using the policies // set at the POA level. object = this->child_poa_->create_reference ("IDL:Counter:1.0" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Reference Created!\n"))); @@ -220,7 +202,6 @@ Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL) return -1; Counter_var base_object = Counter::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); if (!check_reference (base_object.in(), "Unable to create a Object!\n")) @@ -228,7 +209,6 @@ Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL) CORBA::String_var ior = this->orb_->object_to_string (base_object.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Activated as <%s>\n"), ior.in ())); @@ -254,7 +234,6 @@ Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL) ("IDL:Counter:1.0", this->rt_object_properties_->priority () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Reference Created!\n"))); @@ -264,7 +243,6 @@ Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL) return -1; Counter_var over_object = Counter::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); if (!check_reference (over_object.in(), "Unable to create Object!\n")) @@ -273,7 +251,6 @@ Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL) CORBA::String_var o_ior = this->orb_->object_to_string (over_object.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Activated as <%s>\n"), o_ior.in ())); @@ -291,8 +268,7 @@ Policy_Tester::create_objects (ACE_ENV_SINGLE_ARG_DECL) } void -Policy_Tester::shutdown (ACE_ENV_SINGLE_ARG_DECL) +Policy_Tester::shutdown (void) { this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } diff --git a/TAO/tests/Exposed_Policies/Policy_Tester.h b/TAO/tests/Exposed_Policies/Policy_Tester.h index 970ed503b7f..8561406b5b5 100644 --- a/TAO/tests/Exposed_Policies/Policy_Tester.h +++ b/TAO/tests/Exposed_Policies/Policy_Tester.h @@ -35,17 +35,17 @@ public: Policy_Tester (void); ~Policy_Tester (void); - void run (ACE_ENV_SINGLE_ARG_DECL); + void run (void); // Runs the test. int init (int argc, char *argv[] ACE_ENV_ARG_DECL); - void shutdown (ACE_ENV_SINGLE_ARG_DECL); + void shutdown (void); private: // Helper method used internally. - int create_objects (ACE_ENV_SINGLE_ARG_DECL); + int create_objects (void); CORBA::Boolean check_reference (CORBA::Object_ptr object, const char *msg); diff --git a/TAO/tests/Exposed_Policies/Policy_Verifier.cpp b/TAO/tests/Exposed_Policies/Policy_Verifier.cpp index 4541f43613c..20a352ded22 100644 --- a/TAO/tests/Exposed_Policies/Policy_Verifier.cpp +++ b/TAO/tests/Exposed_Policies/Policy_Verifier.cpp @@ -24,7 +24,6 @@ Policy_Verifier::init (int argc, { this->orb_ = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (false); ACE_Arg_Shifter arg_shifter (argc, argv); @@ -36,7 +35,6 @@ Policy_Verifier::init (int argc, { this->rt_poa_properties_ = RT_Properties::read_from (arg ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (false); this->priority_bands_ = this->rt_poa_properties_->priority_bands ().length (); } @@ -44,7 +42,6 @@ Policy_Verifier::init (int argc, { this->rt_object_properties_ = RT_Properties::read_from (arg ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (false); } else if ((arg = arg_shifter.get_the_parameter ("-BaseObjectIOR"))) { @@ -54,7 +51,6 @@ Policy_Verifier::init (int argc, RT_Properties, CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); - ACE_CHECK_RETURN (false); } this->rt_poa_properties_->ior_source (arg); ACE_OS::strcpy (this->base_object_ref_, "file://"); @@ -69,7 +65,6 @@ Policy_Verifier::init (int argc, RT_Properties, CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); - ACE_CHECK_RETURN (false); } this->rt_object_properties_->ior_source (arg); ACE_OS::strcpy (this->overridden_object_ref_, "file://"); @@ -92,26 +87,22 @@ Policy_Verifier::init (int argc, // Get the Object references. CORBA::Object_var object = this->orb_->string_to_object (this->base_object_ref_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (false); if (!Policy_Verifier::check_reference (object.in (), "Invalid IOR file!\n")) return false; this->base_object_ = Counter::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (false); if (!Policy_Verifier::check_reference (this->base_object_.in (), "Unable to convert the IOR to the proper object reference.\n")) return false; object = this->orb_->string_to_object (this->overridden_object_ref_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (false); if (!Policy_Verifier::check_reference (object.in (), "Invalid IOR file!\n")) return false; this->overridden_object_ = Counter::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (false); if (!Policy_Verifier::check_reference (this->overridden_object_.in (), "Unable to convert the IOR to the proper object reference.\n")) @@ -126,12 +117,10 @@ Policy_Verifier::run (ACE_ENV_SINGLE_ARG_DECL ) this->verify_reference (this->base_object_.in (), this->rt_poa_properties_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->verify_reference (this->overridden_object_.in (), this->rt_object_properties_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } void @@ -145,7 +134,6 @@ Policy_Verifier::verify_reference (Counter_ptr object, CORBA::Policy_var policy_var = object->_get_policy (RTCORBA::PRIORITY_MODEL_POLICY_TYPE ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (Policy_Verifier::check_reference (policy_var.in (), "Unable to get Priority Policy.\n")) { @@ -153,12 +141,10 @@ Policy_Verifier::verify_reference (Counter_ptr object, RTCORBA::PriorityModelPolicy::_narrow (policy_var.in ()); RTCORBA::PriorityModel priority_model = - priority_policy->priority_model (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + priority_policy->priority_model (); RTCORBA::Priority priority = - priority_policy->server_priority (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + priority_policy->server_priority (); if (priority_model == RTCORBA::SERVER_DECLARED) ACE_DEBUG ((LM_DEBUG, @@ -179,7 +165,6 @@ Policy_Verifier::verify_reference (Counter_ptr object, policy_var = object->_get_policy (RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (Policy_Verifier::check_reference (policy_var.in (), "Unable to get Priority Banded Policy\n")) @@ -188,7 +173,6 @@ Policy_Verifier::verify_reference (Counter_ptr object, RTCORBA::PriorityBandedConnectionPolicy_var priority_banded_policy = RTCORBA::PriorityBandedConnectionPolicy::_narrow (policy_var.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (Policy_Verifier::check_reference (priority_banded_policy.in (), @@ -225,18 +209,15 @@ Policy_Verifier::verify_reference (Counter_ptr object, } policy_var = object->_get_policy (RTCORBA::CLIENT_PROTOCOL_POLICY_TYPE ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (Policy_Verifier::check_reference (policy_var.in (), "Unable to get Client Protocol Policy\n")) { RTCORBA::ClientProtocolPolicy_var client_protocol_policy = RTCORBA::ClientProtocolPolicy::_narrow (policy_var.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; RTCORBA::ProtocolList_var protocol_list = - client_protocol_policy->protocols (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + client_protocol_policy->protocols (); for (unsigned int i = 0; i < protocol_list->length (); i++) ACE_DEBUG ((LM_DEBUG, diff --git a/TAO/tests/Exposed_Policies/Policy_Verifier.h b/TAO/tests/Exposed_Policies/Policy_Verifier.h index 8eeec72ae89..b78926c289f 100644 --- a/TAO/tests/Exposed_Policies/Policy_Verifier.h +++ b/TAO/tests/Exposed_Policies/Policy_Verifier.h @@ -44,7 +44,7 @@ public: char *argv[] ACE_ENV_ARG_DECL_WITH_DEFAULTS); - void run (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); + void run (void); private: // -- Helper methods -- diff --git a/TAO/tests/Exposed_Policies/client.cpp b/TAO/tests/Exposed_Policies/client.cpp index 80bc23f24f3..aaefc20f658 100644 --- a/TAO/tests/Exposed_Policies/client.cpp +++ b/TAO/tests/Exposed_Policies/client.cpp @@ -22,12 +22,10 @@ main (int argc, char *argv[]) Policy_Verifier policy_verifier; bool retval = policy_verifier.init (argc, argv ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (retval) { - policy_verifier.run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policy_verifier.run (); } else { diff --git a/TAO/tests/Exposed_Policies/server.cpp b/TAO/tests/Exposed_Policies/server.cpp index ecc7d20d022..6548d9ba6a8 100644 --- a/TAO/tests/Exposed_Policies/server.cpp +++ b/TAO/tests/Exposed_Policies/server.cpp @@ -28,13 +28,11 @@ main (int argc, char *argv[]) Policy_Tester policy_tester; int result = policy_tester.init (argc, argv ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (result != 0) return result; - policy_tester.run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policy_tester.run (); } ACE_CATCHANY |