diff options
author | cdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-13 20:57:42 +0000 |
---|---|---|
committer | cdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-13 20:57:42 +0000 |
commit | 24ffebbba0f064a05965233d01544fb62dfaf4b3 (patch) | |
tree | 3a2411e08e41ddb93ce48b67261c955c2171a23e | |
parent | 1a52e60773e7c2d2c1cec20f009a9a3deec58b39 (diff) | |
download | ATCD-24ffebbba0f064a05965233d01544fb62dfaf4b3.tar.gz |
fixed usage of string members of IDL structs using .inout ()
-rw-r--r-- | TAO/ChangeLog-99c | 6 | ||||
-rw-r--r-- | TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp | 12 | ||||
-rw-r--r-- | TAO/examples/Simulator/Event_Supplier/Logging_Sup.cpp | 12 |
3 files changed, 18 insertions, 12 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index ce78de6e2a5..95ad3043d08 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,9 @@ +Wed Jan 13 14:56:00 1999 Chris Gill <cdgill@cs.wustl.edu> + + * orbsvcs/tests/Simulator/Event_Supplier/Event_Sup.cpp + orbsvcs/tests/Simulator/Event_Supplier/Logging_Sup.cpp: fixed string + members of IDL structs by using .inout () to obtain lvalue. + Wed Jan 13 09:50:16 1999 David L. Levine <levine@cs.wustl.edu> * orbsvcs/orbsvcs/Log/Logger_i.cpp: removed ACE_Equal_To<ACE_CString> diff --git a/TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp b/TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp index 65d7515e284..3b2d1ba5680 100644 --- a/TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp +++ b/TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp @@ -301,19 +301,19 @@ Event_Supplier::insert_event_data (CORBA::Any &data, weapons_.number_of_weapons = 2; weapons_.weapon1_identifier = CORBA::string_alloc (30); - strcpy (weapons_.weapon1_identifier,"Photon Torpedoes"); + strcpy (weapons_.weapon1_identifier.inout (),"Photon Torpedoes"); weapons_.weapon1_status =(ACE_OS::rand() % 4) == 0 ? 0 : 1 ; weapons_.weapon2_identifier = CORBA::string_alloc (30); - strcpy (weapons_.weapon2_identifier,"Quantum Torpedoes"); + strcpy (weapons_.weapon2_identifier.inout (),"Quantum Torpedoes"); weapons_.weapon2_status = (ACE_OS::rand() % 4) == 0 ? 0 : 1; weapons_.weapon3_identifier = CORBA::string_alloc (1); - strcpy (weapons_.weapon3_identifier, ""); + strcpy (weapons_.weapon3_identifier.inout (), ""); weapons_.weapon3_status = 0; weapons_.weapon4_identifier = CORBA::string_alloc (1); - strcpy (weapons_.weapon4_identifier, ""); + strcpy (weapons_.weapon4_identifier.inout (), ""); weapons_.weapon4_status = 0; weapons_.weapon5_identifier = CORBA::string_alloc (1); - strcpy (weapons_.weapon5_identifier, ""); + strcpy (weapons_.weapon5_identifier.inout (), ""); weapons_.weapon5_status = 0; weapons_.utilization = (*sched_data)->utilitzation; weapons_.overhead = (*sched_data)->overhead; @@ -345,7 +345,7 @@ Event_Supplier::insert_event_data (CORBA::Any &data, if ((*sched_data)->completion_time >= last_completion) { ACE_Time_Value pause (0, - (*sched_data)->completion_time - + (*sched_data)->completion_time - last_completion); ACE_OS::sleep (pause); last_completion = (*sched_data)->completion_time; diff --git a/TAO/examples/Simulator/Event_Supplier/Logging_Sup.cpp b/TAO/examples/Simulator/Event_Supplier/Logging_Sup.cpp index dee7c60686d..7e54cc4ebac 100644 --- a/TAO/examples/Simulator/Event_Supplier/Logging_Sup.cpp +++ b/TAO/examples/Simulator/Event_Supplier/Logging_Sup.cpp @@ -334,19 +334,19 @@ Logging_Supplier::insert_event_data (CORBA::Any &data, weapons_.number_of_weapons = 2; weapons_.weapon1_identifier = CORBA::string_alloc (30); - strcpy (weapons_.weapon1_identifier,"Photon Torpedoes"); + strcpy (weapons_.weapon1_identifier.inout (),"Photon Torpedoes"); weapons_.weapon1_status =(ACE_OS::rand() % 4) == 0 ? 0 : 1 ; weapons_.weapon2_identifier = CORBA::string_alloc (30); - strcpy (weapons_.weapon2_identifier,"Quantum Torpedoes"); + strcpy (weapons_.weapon2_identifier.inout (),"Quantum Torpedoes"); weapons_.weapon2_status = (ACE_OS::rand() % 4) == 0 ? 0 : 1; weapons_.weapon3_identifier = CORBA::string_alloc (1); - strcpy (weapons_.weapon3_identifier, ""); + strcpy (weapons_.weapon3_identifier.inout (), ""); weapons_.weapon3_status = 0; weapons_.weapon4_identifier = CORBA::string_alloc (1); - strcpy (weapons_.weapon4_identifier, ""); + strcpy (weapons_.weapon4_identifier.inout (), ""); weapons_.weapon4_status = 0; weapons_.weapon5_identifier = CORBA::string_alloc (1); - strcpy (weapons_.weapon5_identifier, ""); + strcpy (weapons_.weapon5_identifier.inout (), ""); weapons_.weapon5_status = 0; weapons_.utilization = 0.0; weapons_.overhead = 0.0; @@ -374,7 +374,7 @@ Logging_Supplier::insert_event_data (CORBA::Any &data, if ((*sched_data)->completion_time >= last_completion) { ACE_Time_Value pause (0, - (*sched_data)->completion_time - + (*sched_data)->completion_time - last_completion); ACE_OS::sleep (pause); last_completion = (*sched_data)->completion_time; |