diff options
-rw-r--r-- | TAO/ChangeLog | 7 | ||||
-rw-r--r-- | TAO/examples/Simulator/Event_Supplier/Event_Con.cpp | 25 |
2 files changed, 23 insertions, 9 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index a300fe37814..73de81deae2 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,10 @@ +Thu Aug 18 14:28:45 UTC 2005 Jeff Parsons <j.parsons@vanderbilt.edu> + + * examples/Simulator/Event_Supplier/Event_Con.cpp: + + Removed uses of Any::value() and replaced them with the + generated extraction operator. + Thu Aug 18 07:43:16 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl> * TAO_IDL/be/be_visitor_arg_traits.cpp: diff --git a/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp b/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp index 4df2a406da3..59df4370180 100644 --- a/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp +++ b/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp @@ -191,21 +191,28 @@ Demo_Consumer::push (const RtecEventComm::EventSet &events ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "TCKind: %d\n", kind)); - int ret = _tc_Navigation->equal (events[i].data.any_value.type() ACE_ENV_ARG_PARAMETER); + CORBA::Boolean ret = + _tc_Navigation->equal (events[i].data.any_value.type() ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; + if (ret) { - Navigation *navigation_ = (Navigation*) events[i].data.any_value.value (); + const Navigation *navigation_ = 0; + events[i].data.any_value >>= navigation_; ACE_DEBUG ((LM_DEBUG, "Found a Navigation struct in the any: pos_lat = %d\n", navigation_->position_latitude)); } - else { - ret = (_tc_Weapons->equal (events[i].data.any_value.type() ACE_ENV_ARG_PARAMETER)); - ACE_TRY_CHECK; - if (ret) { - Weapons *weapons_ = (Weapons*) events[i].data.any_value.value (); - ACE_DEBUG ((LM_DEBUG, "Found a Weapons struct in the any: nr_of_weapons = %u\n", weapons_->number_of_weapons)); + else + { + ret = _tc_Weapons->equal (events[i].data.any_value.type() ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (ret) + { + const Weapons *weapons_ = 0; + events[i].data.any_value >>= weapons_; + ACE_DEBUG ((LM_DEBUG, "Found a Weapons struct in the any: nr_of_weapons = %u\n", weapons_->number_of_weapons)); + } } - } } ACE_CATCHANY { |