diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-08-18 14:30:31 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-08-18 14:30:31 +0000 |
commit | 50a5bcbe17ec3f9e3d4538979be68df9e9224e36 (patch) | |
tree | 54aee4fa75d762fa0518345a76526170a2075254 | |
parent | 9625b6387a45cdb5639fe231d6990f5e0941d115 (diff) | |
download | ATCD-AnyRefactor.tar.gz |
ChangeLogTag: Thu Aug 18 14:28:45 UTC 2005 Jeff Parsons <j.parsons@vanderbilt.edu>AnyRefactor
-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 { |