diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-11-22 23:21:31 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-11-22 23:21:31 +0000 |
commit | 7017498e1c9a7af8dbc35c262104409dff7890d8 (patch) | |
tree | 4f904e309aa0e88756ab91ed6b03d068cd87c609 /TAO/examples/Advanced | |
parent | 72881af21bd008dcfd50cde8fa427b057a8860c7 (diff) | |
download | ATCD-7017498e1c9a7af8dbc35c262104409dff7890d8.tar.gz |
ChangeLogTag: Sat Nov 22 17:20:13 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO/examples/Advanced')
-rw-r--r-- | TAO/examples/Advanced/ch_12/client.cpp | 12 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_12/icp.cpp | 5 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_12/server.cpp | 4 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_12/server.h | 3 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_18/client.cpp | 15 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_18/icp.cpp | 5 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_18/server.cpp | 9 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_18/server.h | 3 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_21/client.cpp | 10 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_21/icp.cpp | 5 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_21/server.cpp | 8 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_21/server.h | 4 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_3/client.cpp | 5 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_3/server.cpp | 3 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_8_and_10/client.cpp | 4 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_8_and_10/icp.cpp | 2 | ||||
-rw-r--r-- | TAO/examples/Advanced/ch_8_and_10/server.h | 4 |
17 files changed, 69 insertions, 32 deletions
diff --git a/TAO/examples/Advanced/ch_12/client.cpp b/TAO/examples/Advanced/ch_12/client.cpp index 95b778e59c9..9ce1465e6aa 100644 --- a/TAO/examples/Advanced/ch_12/client.cpp +++ b/TAO/examples/Advanced/ch_12/client.cpp @@ -19,13 +19,15 @@ // // ============================================================================ -#include "CCS.h" // ORB-specific +#include "CCSC.h" // ORB-specific // The following headers are #included automatically by ACE+TAO. // Therefore, they don't need to be included explicitly. -// #include <iostream.h> +#include <iostream> // #include <fstream.h> +using namespace std; + // Generic ostream inserter for exceptions. Inserts the exception // name, if available, and the repository ID otherwise. @@ -206,14 +208,14 @@ main (int argc, char * argv[]) cout << endl; // Change the location of first device in the list - CCS::AssetType anum = list[0]->asset_num (); + CCS::AssetType anum = list[0u]->asset_num (); cout << "Changing location of device " << anum << "." << endl; - list[0]->location ("Earth"); + list[0u]->location ("Earth"); // Check that the location was updated cout << "New details for device " << anum << " are:" << endl; - cout << list[0] << endl; + cout << list[0u] << endl; // Find first thermostat in list. CCS::Thermostat_var tmstat; diff --git a/TAO/examples/Advanced/ch_12/icp.cpp b/TAO/examples/Advanced/ch_12/icp.cpp index a045182e71f..0f2b6f782ff 100644 --- a/TAO/examples/Advanced/ch_12/icp.cpp +++ b/TAO/examples/Advanced/ch_12/icp.cpp @@ -22,8 +22,11 @@ #include <string> #include <map> #include <algorithm> +#include <iostream> #include "icp.h" +using namespace std; + // The following header is #included automatically by ACE+TAO. // Therefore, they don't need to be included explicitly. //#include <stdlib.h> @@ -289,7 +292,7 @@ ICP_set (unsigned long id, const char * attr, const void * value) return 0; // OK } -#include <fstream.h> +#include <fstream> class ICP_Persist { diff --git a/TAO/examples/Advanced/ch_12/server.cpp b/TAO/examples/Advanced/ch_12/server.cpp index d38195dcebb..79fd9a63adb 100644 --- a/TAO/examples/Advanced/ch_12/server.cpp +++ b/TAO/examples/Advanced/ch_12/server.cpp @@ -22,7 +22,9 @@ #include "server.h" #include <algorithm> #include "icp.h" -#include <strstream.h> +#include <strstream> +#include <fstream> +#include <iostream> // The following headers are #included automatically by ACE+TAO. // Therefore, they don't need to be included explicitly. diff --git a/TAO/examples/Advanced/ch_12/server.h b/TAO/examples/Advanced/ch_12/server.h index 5aff30fa960..b6ff096c046 100644 --- a/TAO/examples/Advanced/ch_12/server.h +++ b/TAO/examples/Advanced/ch_12/server.h @@ -24,9 +24,12 @@ #include "CCSS.h" #include "icp.h" // mine +#include "assert.h" #include <map> #include <list> +using namespace std; + // The following headers are #included automatically by ACE+TAO. // Therefore, they don't need to be included explicitly. //#include <assert.h> diff --git a/TAO/examples/Advanced/ch_18/client.cpp b/TAO/examples/Advanced/ch_18/client.cpp index a3976e1b387..d857d71a5da 100644 --- a/TAO/examples/Advanced/ch_18/client.cpp +++ b/TAO/examples/Advanced/ch_18/client.cpp @@ -18,11 +18,14 @@ // ============================================================================ #include "CCSC.h" // ORB-specific +#include "assert.h" #include <orbsvcs/CosNamingC.h> -// #include <iostream.h> +#include <iostream> // #include <fstream.h> // ---------------------------------------------------------------- +using namespace std; + template<class T> typename T::_ptr_type resolve_init(CORBA::ORB_ptr orb, const char * id) @@ -31,7 +34,7 @@ resolve_init(CORBA::ORB_ptr orb, const char * id) try { obj = orb->resolve_initial_references(id); } - catch (const CORBA::ORB::InvalidName & e) { + catch (const CORBA::ORB::InvalidName &) { throw; } catch (const CORBA::Exception & e) { @@ -70,7 +73,7 @@ resolve_name( try { obj = nc->resolve(name); } - catch (const CosNaming::NamingContext::NotFound & e) { + catch (const CosNaming::NamingContext::NotFound &) { throw; } catch (const CORBA::Exception & e) { @@ -271,14 +274,14 @@ main(int argc, char * argv[]) cout << endl; // Change the location of first device in the list - CCS::AssetType anum = list[0]->asset_num(); + CCS::AssetType anum = list[0u]->asset_num(); cout << "Changing location of device " << anum << "." << endl; - list[0]->location("Earth"); + list[0u]->location("Earth"); // Check that the location was updated cout << "New details for device " << anum << " are:" << endl; - cout << list[0] << endl; + cout << list[0u] << endl; // Find first thermostat in list. CCS::Thermostat_var tmstat; diff --git a/TAO/examples/Advanced/ch_18/icp.cpp b/TAO/examples/Advanced/ch_18/icp.cpp index e8ba75d6ef7..c2d3b545fef 100644 --- a/TAO/examples/Advanced/ch_18/icp.cpp +++ b/TAO/examples/Advanced/ch_18/icp.cpp @@ -23,9 +23,12 @@ #include <string> #include <map> #include <algorithm> +#include <iostream> #include "icp.h" // #include <stdlib.h> +using namespace std; + //---------------------------------------------------------------- enum DeviceType { thermometer, thermostat }; @@ -300,7 +303,7 @@ ICP_set(unsigned long id, const char * attr, const void * value) //---------------------------------------------------------------- -#include <fstream.h> +#include <fstream> class ICP_Persist { public: diff --git a/TAO/examples/Advanced/ch_18/server.cpp b/TAO/examples/Advanced/ch_18/server.cpp index 33da0ee33b2..edd5ece1200 100644 --- a/TAO/examples/Advanced/ch_18/server.cpp +++ b/TAO/examples/Advanced/ch_18/server.cpp @@ -23,10 +23,9 @@ #include <algorithm> #include "icp.h" #include <orbsvcs/CosNamingC.h> -#include <strstream.h> - -// #include <iostream.h> -// #include <fstream.h> +#include <strstream> +#include <iostream> +#include <fstream> const char * Controller_oid = "Controller"; @@ -40,7 +39,7 @@ resolve_init (CORBA::ORB_ptr orb, const char * id) try { obj = orb->resolve_initial_references (id); } - catch (const CORBA::ORB::InvalidName & e) { + catch (const CORBA::ORB::InvalidName &) { throw; } catch (const CORBA::Exception & e) { diff --git a/TAO/examples/Advanced/ch_18/server.h b/TAO/examples/Advanced/ch_18/server.h index b1f35199a76..d2ce3d44ead 100644 --- a/TAO/examples/Advanced/ch_18/server.h +++ b/TAO/examples/Advanced/ch_18/server.h @@ -27,9 +27,10 @@ #include "icp.h" #include <map> #include <list> -//#include <assert.h> +#include <assert.h> //#include <corba/poaS.h> +using namespace std; class Controller_impl; diff --git a/TAO/examples/Advanced/ch_21/client.cpp b/TAO/examples/Advanced/ch_21/client.cpp index 934c62dd70e..5197d130f28 100644 --- a/TAO/examples/Advanced/ch_21/client.cpp +++ b/TAO/examples/Advanced/ch_21/client.cpp @@ -19,9 +19,11 @@ // ============================================================================ #include "CCSC.h" // ORB-specific -// #include <iostream.h> +#include <iostream> // #include <fstream.h> +using namespace std; + //---------------------------------------------------------------- // Generic ostream inserter for exceptions. Inserts the exception @@ -199,14 +201,14 @@ main(int argc, char * argv[]) cout << endl; // Change the location of first device in the list - CCS::AssetType anum = list[0]->asset_num(); + CCS::AssetType anum = list[0U]->asset_num(); cout << "Changing location of device " << anum << "." << endl; - list[0]->location("Earth"); + list[0U]->location("Earth"); // Check that the location was updated cout << "New details for device " << anum << " are:" << endl; - cout << list[0] << endl; + cout << list[0U] << endl; // Find first thermostat in list. CCS::Thermostat_var tmstat; diff --git a/TAO/examples/Advanced/ch_21/icp.cpp b/TAO/examples/Advanced/ch_21/icp.cpp index e45dfeb6cf1..29b582ec418 100644 --- a/TAO/examples/Advanced/ch_21/icp.cpp +++ b/TAO/examples/Advanced/ch_21/icp.cpp @@ -24,8 +24,11 @@ #include <map> #include <algorithm> #include <stdlib.h> +#include <iostream> #include "icp.h" +using namespace std; + //---------------------------------------------------------------- enum DeviceType { thermometer, thermostat }; @@ -300,7 +303,7 @@ ICP_set(unsigned long id, const char * attr, const void * value) //---------------------------------------------------------------- -#include <fstream.h> +#include <fstream> class ICP_Persist { public: diff --git a/TAO/examples/Advanced/ch_21/server.cpp b/TAO/examples/Advanced/ch_21/server.cpp index 7020e76ecc1..6aa8d0aef2e 100644 --- a/TAO/examples/Advanced/ch_21/server.cpp +++ b/TAO/examples/Advanced/ch_21/server.cpp @@ -22,9 +22,11 @@ #include <algorithm> #include "icp.h" #include <ace/Synch_T.h> -#include <strstream.h> -// #include <iostream.h> -// #include <fstream.h> +#include <strstream> +#include <iostream> +#include <fstream> + +using namespace std; const char* Controller_oid = "Controller"; diff --git a/TAO/examples/Advanced/ch_21/server.h b/TAO/examples/Advanced/ch_21/server.h index 482183dfe45..bc14156127c 100644 --- a/TAO/examples/Advanced/ch_21/server.h +++ b/TAO/examples/Advanced/ch_21/server.h @@ -29,11 +29,13 @@ #include <set> #include <list> #include <map> -// #include <assert.h> +#include <assert.h> // #include <corba/poaS.h> #include "CCSS.h" +using namespace std; + class Controller_impl; class Thermometer_impl : public virtual POA_CCS::Thermometer { diff --git a/TAO/examples/Advanced/ch_3/client.cpp b/TAO/examples/Advanced/ch_3/client.cpp index c106f7f8110..d2367089aae 100644 --- a/TAO/examples/Advanced/ch_3/client.cpp +++ b/TAO/examples/Advanced/ch_3/client.cpp @@ -20,7 +20,10 @@ // ============================================================================ #include "timeC.h" -#include <iomanip.h> +#include <iomanip> +#include <iostream> + +using namespace std; // The following header is #included automatically by ACE+TAO. // Therefore, they don't need to be included explicitly. diff --git a/TAO/examples/Advanced/ch_3/server.cpp b/TAO/examples/Advanced/ch_3/server.cpp index b4bbf4bfdfa..4a34a815d35 100644 --- a/TAO/examples/Advanced/ch_3/server.cpp +++ b/TAO/examples/Advanced/ch_3/server.cpp @@ -19,8 +19,11 @@ // // ============================================================================ +#include <iostream> #include "server.h" +using namespace std; + // The following headers are #included automatically by ACE+TAO. // Therefore, they don't need to be included explicitly. //#include <time.h> diff --git a/TAO/examples/Advanced/ch_8_and_10/client.cpp b/TAO/examples/Advanced/ch_8_and_10/client.cpp index e47e291a169..862fbce1ecc 100644 --- a/TAO/examples/Advanced/ch_8_and_10/client.cpp +++ b/TAO/examples/Advanced/ch_8_and_10/client.cpp @@ -18,7 +18,9 @@ // ============================================================================ #include "CCSC.h" // ORB-specific -//#include <iostream.h> +#include <iostream> + +using namespace std; // Show the details for a thermometer or thermostat. static ostream & diff --git a/TAO/examples/Advanced/ch_8_and_10/icp.cpp b/TAO/examples/Advanced/ch_8_and_10/icp.cpp index 968190249c7..ffb36aeb8db 100644 --- a/TAO/examples/Advanced/ch_8_and_10/icp.cpp +++ b/TAO/examples/Advanced/ch_8_and_10/icp.cpp @@ -26,6 +26,8 @@ //#include <stdlib.h> #include "icp.h" +using namespace std; + //---------------------------------------------------------------- enum DeviceType { thermometer, thermostat }; diff --git a/TAO/examples/Advanced/ch_8_and_10/server.h b/TAO/examples/Advanced/ch_8_and_10/server.h index b94cb6e5d92..939402747d3 100644 --- a/TAO/examples/Advanced/ch_8_and_10/server.h +++ b/TAO/examples/Advanced/ch_8_and_10/server.h @@ -25,8 +25,10 @@ #include "CCSS.h" #include <map> -//#include <assert.h> +#include <iostream> +#include <assert.h> +using namespace std; class Controller_impl; |