diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-20 02:34:57 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-20 02:34:57 +0000 |
commit | 5c1001ce4f585836e1f83c28d1df89aee42fb743 (patch) | |
tree | 5967e9ca7d44ed1d2823be9746817ebb8e025f5d /TAO/examples/Simple | |
parent | 2ae14b2b85ad813a269e8a5529aa76cf984fa8a5 (diff) | |
download | ATCD-5c1001ce4f585836e1f83c28d1df89aee42fb743.tar.gz |
changed include protection from #if !defined to ifndef, and added #pragma once, if possible
Diffstat (limited to 'TAO/examples/Simple')
-rw-r--r-- | TAO/examples/Simple/bank/AccountManager_i.h | 15 | ||||
-rw-r--r-- | TAO/examples/Simple/bank/Account_i.h | 10 | ||||
-rw-r--r-- | TAO/examples/Simple/bank/Client_i.h | 12 | ||||
-rw-r--r-- | TAO/examples/Simple/bank/Server_i.h | 11 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Broadcaster_i.h | 21 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Client_i.h | 7 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Receiver_i.h | 2 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Server_i.h | 6 | ||||
-rw-r--r-- | TAO/examples/Simple/echo/Echo_i.h | 4 | ||||
-rw-r--r-- | TAO/examples/Simple/echo/Server_i.h | 2 | ||||
-rw-r--r-- | TAO/examples/Simple/grid/Client_i.h | 8 | ||||
-rw-r--r-- | TAO/examples/Simple/grid/Grid_i.h | 34 | ||||
-rw-r--r-- | TAO/examples/Simple/grid/Server_i.h | 2 | ||||
-rw-r--r-- | TAO/examples/Simple/time/Client_i.h | 2 | ||||
-rw-r--r-- | TAO/examples/Simple/time/Server_i.h | 2 | ||||
-rw-r--r-- | TAO/examples/Simple/time/Time_i.h | 12 |
16 files changed, 85 insertions, 65 deletions
diff --git a/TAO/examples/Simple/bank/AccountManager_i.h b/TAO/examples/Simple/bank/AccountManager_i.h index 93e23917cb0..c7333b19c5b 100644 --- a/TAO/examples/Simple/bank/AccountManager_i.h +++ b/TAO/examples/Simple/bank/AccountManager_i.h @@ -17,10 +17,15 @@ // // ============================================================================ -#if !defined (ACCOUNTMANAGER_I_H) -#define ACCOUNTMANAGER_I_H +#ifndef ACCOUNTMANAGER_I_H +#define ACCOUNTMANAGER_I_H #include "ace/ACE.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/OS.h" #include "tao/TAO.h" #include "BankS.h" @@ -44,13 +49,13 @@ public: // Destructor. virtual Bank::Account_ptr open (const char *name, - CORBA::Float initial_balance, - CORBA::Environment &_env); + CORBA::Float initial_balance, + CORBA::Environment &_env); // Return the Account interface with the given name from the server. // Put the initial balance specified in the new account. virtual void close (Bank::Account_ptr, - CORBA::Environment &env); + CORBA::Environment &env); // Close the given account. virtual void shutdown (CORBA::Environment &env); diff --git a/TAO/examples/Simple/bank/Account_i.h b/TAO/examples/Simple/bank/Account_i.h index e6b6049c6a7..969d3cad1e2 100644 --- a/TAO/examples/Simple/bank/Account_i.h +++ b/TAO/examples/Simple/bank/Account_i.h @@ -17,8 +17,8 @@ // // ============================================================================ -#if !defined (ACCOUNT_I_H) -#define ACCOUNT_I_H +#ifndef ACCOUNT_I_H +#define ACCOUNT_I_H #include "BankS.h" @@ -49,15 +49,15 @@ public: // Get the name of the <Account> holder. virtual void name (const char *name, - CORBA::Environment &env); + CORBA::Environment &env); // Set the name of the <Account> holder. virtual void deposit (CORBA::Float, - CORBA::Environment &env); + CORBA::Environment &env); // Deposit money in the account. virtual void withdraw (CORBA::Float, - CORBA::Environment &env); + CORBA::Environment &env); // Withdraw money in the account. void orb (CORBA::ORB_ptr o); diff --git a/TAO/examples/Simple/bank/Client_i.h b/TAO/examples/Simple/bank/Client_i.h index e06369f955f..eb9bf8ce1ab 100644 --- a/TAO/examples/Simple/bank/Client_i.h +++ b/TAO/examples/Simple/bank/Client_i.h @@ -55,22 +55,22 @@ private: // Checks the various operations of the account. void deposit (Bank::Account_ptr server, - CORBA::Float deposit_amount, - CORBA::Environment &env); + CORBA::Float deposit_amount, + CORBA::Environment &env); // Deposit in the account. void withdraw (Bank::Account_ptr server, - CORBA::Float withdrawl_amount); + CORBA::Float withdrawl_amount); // Withdraw from the account. Bank::Account_ptr open (const char *name, - CORBA::Float initial_balance, - CORBA::Environment &env); + CORBA::Float initial_balance, + CORBA::Environment &env); // Open a new account with the given name and initial balance. void close (Bank::Account_ptr account, - CORBA::Environment &env); + CORBA::Environment &env); // Close a given Account. void test_for_different_name (CORBA::Environment &env); diff --git a/TAO/examples/Simple/bank/Server_i.h b/TAO/examples/Simple/bank/Server_i.h index 3a86681c27b..e195f184c2c 100644 --- a/TAO/examples/Simple/bank/Server_i.h +++ b/TAO/examples/Simple/bank/Server_i.h @@ -18,10 +18,15 @@ // // ============================================================================ -#if !defined (SERVER_I_H) +#ifndef SERVER_I_H #define SERVER_I_H #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Log_Msg.h" #include "tao/TAO.h" #include "orbsvcs/CosNamingC.h" @@ -42,8 +47,8 @@ public: // Destructor. int init (int argc, - char *argv[], - CORBA::Environment &env); + char *argv[], + CORBA::Environment &env); // Initialize the Server state - parsing arguments and waiting. int run (CORBA::Environment &env); diff --git a/TAO/examples/Simple/chat/Broadcaster_i.h b/TAO/examples/Simple/chat/Broadcaster_i.h index 87e54162477..2b4958ef096 100644 --- a/TAO/examples/Simple/chat/Broadcaster_i.h +++ b/TAO/examples/Simple/chat/Broadcaster_i.h @@ -17,13 +17,18 @@ // // =========================================================== -#if !defined (BROADCASTER_I_H) +#ifndef BROADCASTER_I_H #define BROADCASTER_I_H #include "BroadcasterS.h" #include "ReceiverC.h" #include "tao/TAO.h" #include "ace/Containers.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/SString.h" class Broadcaster_i : public POA_Broadcaster @@ -40,17 +45,17 @@ public: // Destructor. virtual void add (Receiver_ptr receiver, - const char *nickname, - CORBA::Environment &TAO_TRY_ENV); + const char *nickname, + CORBA::Environment &TAO_TRY_ENV); // Saves receiver references in a list. virtual void remove (Receiver_ptr receiver, - CORBA::Environment &TAO_TRY_ENV); + CORBA::Environment &TAO_TRY_ENV); // Removes receiver references from the list. virtual void say (Receiver_ptr receiver, - const char *text, - CORBA::Environment &TAO_TRY_ENV); + const char *text, + CORBA::Environment &TAO_TRY_ENV); // Called by Broadcaster clients to send messages. public: @@ -58,7 +63,7 @@ public: // The ORB manager. void broadcast (const char* text, - CORBA::Environment &TAO_TRY_ENV); + CORBA::Environment &TAO_TRY_ENV); // Broadcasts the text to all registered clients. class Receiver_Data @@ -82,7 +87,7 @@ public: typedef ACE_Unbounded_Set<Receiver_Data> RECEIVER_SET; typedef ACE_Unbounded_Set_Iterator<Receiver_Data> - RECEIVER_SET_ITERATOR; + RECEIVER_SET_ITERATOR; RECEIVER_SET receiver_set_; // Set of registered clients. diff --git a/TAO/examples/Simple/chat/Client_i.h b/TAO/examples/Simple/chat/Client_i.h index f62bf9a769e..bbbd82d289e 100644 --- a/TAO/examples/Simple/chat/Client_i.h +++ b/TAO/examples/Simple/chat/Client_i.h @@ -18,12 +18,17 @@ // // =========================================================== -#if !defined (CLIENT_I_H) +#ifndef CLIENT_I_H #define CLIENT_I_H #include "Receiver_i.h" #include "BroadcasterC.h" #include "ace/Read_Buffer.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "tao/TAO.h" class Client_i : public ACE_Event_Handler diff --git a/TAO/examples/Simple/chat/Receiver_i.h b/TAO/examples/Simple/chat/Receiver_i.h index b0db0d1618e..c0ec2f98fc2 100644 --- a/TAO/examples/Simple/chat/Receiver_i.h +++ b/TAO/examples/Simple/chat/Receiver_i.h @@ -17,7 +17,7 @@ // // =========================================================== -#if !defined (RECEIVER_I_H) +#ifndef RECEIVER_I_H #define RECEIVER_I_H #include "ReceiverS.h" diff --git a/TAO/examples/Simple/chat/Server_i.h b/TAO/examples/Simple/chat/Server_i.h index 2622ee027c9..dca164d5ba6 100644 --- a/TAO/examples/Simple/chat/Server_i.h +++ b/TAO/examples/Simple/chat/Server_i.h @@ -18,7 +18,7 @@ // // =========================================================== -#if !defined (SERVER_I_H) +#ifndef SERVER_I_H #define SERVER_I_H #include "Broadcaster_i.h" @@ -39,8 +39,8 @@ public: // Destructor. int init (int argc, - char *argv[], - CORBA::Environment &env); + char *argv[], + CORBA::Environment &env); // Initialize the server. int run (CORBA::Environment &env); diff --git a/TAO/examples/Simple/echo/Echo_i.h b/TAO/examples/Simple/echo/Echo_i.h index c8214fefde9..d54b811fef8 100644 --- a/TAO/examples/Simple/echo/Echo_i.h +++ b/TAO/examples/Simple/echo/Echo_i.h @@ -17,7 +17,7 @@ // // ============================================================================ -#if !defined (ECHO_I_H) +#ifndef ECHO_I_H #define ECHO_I_H #include "EchoS.h" @@ -41,7 +41,7 @@ public: // Destructor. virtual char *echo (const char *mesg, - CORBA::Environment &env); + CORBA::Environment &env); // Return the mesg string back from the server. virtual void shutdown (CORBA::Environment &env); diff --git a/TAO/examples/Simple/echo/Server_i.h b/TAO/examples/Simple/echo/Server_i.h index 381acdf1cdd..43529e5b0a2 100644 --- a/TAO/examples/Simple/echo/Server_i.h +++ b/TAO/examples/Simple/echo/Server_i.h @@ -18,7 +18,7 @@ // // ============================================================================ -#if !defined (SERVER_I_H) +#ifndef SERVER_I_H #define SERVER_I_H #include "Echo_i.h" diff --git a/TAO/examples/Simple/grid/Client_i.h b/TAO/examples/Simple/grid/Client_i.h index 4455c6c73b1..105dda085ae 100644 --- a/TAO/examples/Simple/grid/Client_i.h +++ b/TAO/examples/Simple/grid/Client_i.h @@ -18,7 +18,7 @@ # include "GridC.h" -class Client_i +class Client_i { // = TITLE // Simple Client implementation. @@ -41,9 +41,9 @@ public: int init (int argc, char *argv[]); // Initialize the client communication endpoint with server. - + void test_grid (void); - // Make the grid. + // Make the grid. private: int read_ior (char *filename); @@ -81,7 +81,7 @@ private: CORBA::Short setx_; // Cell identifier in which a value meeds to be stored. - + CORBA::Short sety_; // Cell identifier in which a value meeds to be stored. diff --git a/TAO/examples/Simple/grid/Grid_i.h b/TAO/examples/Simple/grid/Grid_i.h index cd0c34c26a5..516a10f6072 100644 --- a/TAO/examples/Simple/grid/Grid_i.h +++ b/TAO/examples/Simple/grid/Grid_i.h @@ -5,7 +5,7 @@ // // = LIBRARY // TAO/tests/Simple/grid -// +// // = FILENAME // Grid_i.h // @@ -13,11 +13,11 @@ // This class implements the Grid IDL interface. // // = AUTHOR -// +// // ============================================================================ -#if !defined (GRID_I_H) -#define GRID_I_H +#ifndef GRID_I_H +#define GRID_I_H #include "GridS.h" @@ -49,22 +49,22 @@ public: // Returns the height of the grid virtual void width (CORBA::Short, - CORBA_Environment &); + CORBA_Environment &); // Sets the width of the grid. virtual void height (CORBA::Short, CORBA_Environment &); // Sets the height of the grid. - virtual void set (CORBA::Short, - CORBA::Short, - CORBA::Long, - CORBA::Environment &); + virtual void set (CORBA::Short, + CORBA::Short, + CORBA::Long, + CORBA::Environment &); // Sets the grid value. - virtual CORBA::Long get (CORBA::Short, - CORBA::Short, - CORBA::Environment &); + virtual CORBA::Long get (CORBA::Short, + CORBA::Short, + CORBA::Environment &); // Gets the grid value. virtual void destroy (CORBA::Environment &); @@ -78,14 +78,14 @@ private: // Height of the grid. CORBA::Long **array_; - // Pointer to the matrix. This is organized as an "array of arrays." + // Pointer to the matrix. This is organized as an "array of arrays." }; class Grid_Factory_i : public POA_Grid_Factory { // =TITLE // Create a <Grid>. -public: +public: // = Initialization and termination methods. Grid_Factory_i (void); // Constructor. @@ -94,13 +94,13 @@ public: // Destructor. virtual Grid_ptr make_grid (CORBA::Short, - CORBA::Short, - CORBA::Environment &_env); + CORBA::Short, + CORBA::Environment &_env); // This function creates and returns a <Grid>. virtual void shutdown (CORBA::Environment &env); // Shutdown the server. - + void orb (CORBA::ORB_ptr o); // Set the ORB pointer. diff --git a/TAO/examples/Simple/grid/Server_i.h b/TAO/examples/Simple/grid/Server_i.h index 1cb5f88a2be..dbfd942a2f8 100644 --- a/TAO/examples/Simple/grid/Server_i.h +++ b/TAO/examples/Simple/grid/Server_i.h @@ -16,7 +16,7 @@ // // ============================================================================ -#if !defined (SERVER_I_H) +#ifndef SERVER_I_H #define SERVER_I_H #include "Grid_i.h" diff --git a/TAO/examples/Simple/time/Client_i.h b/TAO/examples/Simple/time/Client_i.h index ab4a3d5893d..84ff238619b 100644 --- a/TAO/examples/Simple/time/Client_i.h +++ b/TAO/examples/Simple/time/Client_i.h @@ -11,7 +11,7 @@ // // = DESCRIPTION // This class implements a simple CORBA client that access a Time -// server. +// server. // // = AUTHORS // Darrell Brunsch <brunsch@cs.wustl.edu> diff --git a/TAO/examples/Simple/time/Server_i.h b/TAO/examples/Simple/time/Server_i.h index 3f3a1814c3a..3ebb7c72b53 100644 --- a/TAO/examples/Simple/time/Server_i.h +++ b/TAO/examples/Simple/time/Server_i.h @@ -18,7 +18,7 @@ // // ============================================================================ -#if !defined (SERVER_I_H) +#ifndef SERVER_I_H #define SERVER_I_H #include "Time_i.h" diff --git a/TAO/examples/Simple/time/Time_i.h b/TAO/examples/Simple/time/Time_i.h index a4d17a315dd..ec7d011aff3 100644 --- a/TAO/examples/Simple/time/Time_i.h +++ b/TAO/examples/Simple/time/Time_i.h @@ -5,7 +5,7 @@ // // = LIBRARY // TAO/tests/Simple/time -// +// // = FILENAME // Time_i.h // @@ -14,11 +14,11 @@ // // = AUTHOR // Darrell Brunsch <brunsch@cs.wustl.edu> -// +// // ============================================================================ -#if !defined (TIME_I_H) -#define TIME_I_H +#ifndef TIME_I_H +#define TIME_I_H #include "TimeS.h" @@ -28,9 +28,9 @@ class Time_i: public POA_Time // Time Object Implementation // // = DESCRIPTION - // Implementation of a simple object that has two methods, one that + // Implementation of a simple object that has two methods, one that // return the current time/date on the server and the other that - // shuts down the server. + // shuts down the server. public: // = Initialization and termination methods. Time_i (void); |