diff options
Diffstat (limited to 'examples')
47 files changed, 411 insertions, 185 deletions
diff --git a/examples/ASX/Event_Server/Event_Server/Consumer_Router.h b/examples/ASX/Event_Server/Event_Server/Consumer_Router.h index 56e58c58c37..82682dfa2c0 100644 --- a/examples/ASX/Event_Server/Event_Server/Consumer_Router.h +++ b/examples/ASX/Event_Server/Event_Server/Consumer_Router.h @@ -1,10 +1,15 @@ /* -*- C++ -*- */ // $Id$ -#if !defined (_CONSUMER_ROUTER_H) +#ifndef _CONSUMER_ROUTER_H #define _CONSUMER_ROUTER_H #include "ace/SOCK_Acceptor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/UPIPE_Acceptor.h" #include "ace/Svc_Handler.h" #include "Peer_Router.h" @@ -13,7 +18,7 @@ class Consumer_Router : public Peer_Router { // = TITLE // Provides the interface between one or more Consumers and the - // Event Server <ACE_Stream>. + // Event Server <ACE_Stream>. // // = DESCRIPTION // This class normally sits on "top" of the Stream and routes diff --git a/examples/ASX/Event_Server/Event_Server/Event_Analyzer.h b/examples/ASX/Event_Server/Event_Server/Event_Analyzer.h index a5c18496789..22dc0613a5c 100644 --- a/examples/ASX/Event_Server/Event_Server/Event_Analyzer.h +++ b/examples/ASX/Event_Server/Event_Server/Event_Analyzer.h @@ -1,10 +1,15 @@ /* -*- C++ -*- */ // $Id$ -#if !defined (_EVENT_ANALYZER_H) -#define _EVENT_ANALYZER_H +#ifndef _EVENT_ANALYZER_H +#define _EVENT_ANALYZER_H #include "ace/Stream.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Module.h" #include "ace/Task.h" #include "ace/Synch.h" diff --git a/examples/ASX/Event_Server/Event_Server/Options.h b/examples/ASX/Event_Server/Event_Server/Options.h index 9e9bb0e7a14..fbde9aa1c34 100644 --- a/examples/ASX/Event_Server/Event_Server/Options.h +++ b/examples/ASX/Event_Server/Event_Server/Options.h @@ -1,10 +1,15 @@ /* -*- C++ -*- */ // $Id$ -#if !defined (OPTIONS_H) +#ifndef OPTIONS_H #define OPTIONS_H #include "ace/OS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Profile_Timer.h" class Options @@ -72,46 +77,46 @@ private: Options (void); ~Options (void); - ACE_Profile_Timer itimer_; + ACE_Profile_Timer itimer_; // Time the process. - size_t thr_count_; + size_t thr_count_; // Number of threads to spawn. - long t_flags_; + long t_flags_; // Flags to <thr_create>. - size_t high_water_mark_; + size_t high_water_mark_; // ACE_Task high water mark. - size_t low_water_mark_; + size_t low_water_mark_; // ACE_Task low water mark. - size_t message_size_; + size_t message_size_; // Size of a message. - size_t initial_queue_length_; + size_t initial_queue_length_; // Initial number of items in the queue. - size_t iterations_; + size_t iterations_; // Number of iterations to run the test program. - int debugging_; + int debugging_; // Extra debugging info. - int verbosity_; + int verbosity_; // Extra verbose messages. - u_short consumer_port_; + u_short consumer_port_; // Port that the Consumer_Router is using. - u_short supplier_port_; + u_short supplier_port_; // Port that the Supplier_Router is using. static Options *instance_; // Static Singleton. - friend class ACE_Shutup_GPlusPlus; + friend class ACE_Shutup_GPlusPlus; // Turn off g++ warning... }; diff --git a/examples/ASX/Event_Server/Event_Server/Peer_Router.h b/examples/ASX/Event_Server/Event_Server/Peer_Router.h index 3369fe6415f..35ce90ee52d 100644 --- a/examples/ASX/Event_Server/Event_Server/Peer_Router.h +++ b/examples/ASX/Event_Server/Event_Server/Peer_Router.h @@ -1,10 +1,15 @@ /* -*- C++ -*- */ // $Id$ -#if !defined (_PEER_ROUTER_H) +#ifndef _PEER_ROUTER_H #define _PEER_ROUTER_H #include "ace/Acceptor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/SOCK_Acceptor.h" #include "ace/Map_Manager.h" @@ -31,7 +36,7 @@ public: virtual int handle_input (ACE_HANDLE); // Receive input from a peer. - virtual int put (ACE_Message_Block *, ACE_Time_Value *tv = 0); + virtual int put (ACE_Message_Block *, ACE_Time_Value *tv = 0); // Send output to a peer. Note that this implementation "blocks" if // flow control occurs. This is undesirable for "real" // applications. The best way around this is to make the @@ -39,7 +44,7 @@ public: // $ACE_ROOT/apps/Gateway/Gateway application. protected: - Peer_Router_Context *peer_router_context_; + Peer_Router_Context *peer_router_context_; // Pointer to router context. This maintains the state that is // shared by both Tasks in a <Peer_Router> Module. }; @@ -48,7 +53,7 @@ class Peer_Router_Context : public ACE_Acceptor<Peer_Handler, ACE_SOCK_ACCEPTOR> { // = TITLE // Defines state and behavior shared between both Tasks in a - // <Peer_Router> Module. + // <Peer_Router> Module. // // = DESCRIPTION // This class also serves as an <ACE_Acceptor>, which creates @@ -92,11 +97,11 @@ private: // Pointer to the <Peer_Router> that we are accepting for. // = Useful typedefs. - typedef ACE_Map_Manager <ROUTING_KEY, Peer_Handler *, ACE_SYNCH_RW_MUTEX> + typedef ACE_Map_Manager <ROUTING_KEY, Peer_Handler *, ACE_SYNCH_RW_MUTEX> PEER_MAP; - typedef ACE_Map_Iterator<ROUTING_KEY, Peer_Handler *, ACE_SYNCH_RW_MUTEX> + typedef ACE_Map_Iterator<ROUTING_KEY, Peer_Handler *, ACE_SYNCH_RW_MUTEX> PEER_ITERATOR; - typedef ACE_Map_Entry<ROUTING_KEY, Peer_Handler *> + typedef ACE_Map_Entry<ROUTING_KEY, Peer_Handler *> PEER_ENTRY; PEER_MAP peer_map_; @@ -129,7 +134,7 @@ protected: Peer_Router (Peer_Router_Context *prc); // Initialization method. - virtual int control (ACE_Message_Block *); + virtual int control (ACE_Message_Block *); // Handle control messages arriving from adjacent Modules. Peer_Router_Context *context (void) const; diff --git a/examples/ASX/Event_Server/Event_Server/Supplier_Router.h b/examples/ASX/Event_Server/Event_Server/Supplier_Router.h index b83035cc957..b960ff35da2 100644 --- a/examples/ASX/Event_Server/Event_Server/Supplier_Router.h +++ b/examples/ASX/Event_Server/Event_Server/Supplier_Router.h @@ -1,10 +1,15 @@ /* -*- C++ -*- */ // $Id$ -#if !defined (_SUPPLIER_ROUTER_H) +#ifndef _SUPPLIER_ROUTER_H #define _SUPPLIER_ROUTER_H #include "ace/INET_Addr.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/SOCK_Acceptor.h" #include "ace/Map_Manager.h" #include "ace/Svc_Handler.h" @@ -14,8 +19,8 @@ class Supplier_Router : public Peer_Router { // = TITLE // Provides the interface between one or more Suppliers and the - // Event Server ACE_Stream. - // + // Event Server ACE_Stream. + // // = DESCRIPTION // This class normally sits on "bottom" of the Stream and sends // all messages coming from Suppliers via its "write" <Task> diff --git a/examples/ASX/UPIPE_Event_Server/Consumer_Router.h b/examples/ASX/UPIPE_Event_Server/Consumer_Router.h index 4568ddf8311..bfd86f94f05 100644 --- a/examples/ASX/UPIPE_Event_Server/Consumer_Router.h +++ b/examples/ASX/UPIPE_Event_Server/Consumer_Router.h @@ -4,10 +4,15 @@ // The interface between one or more consumers and an Event Server // ACE_Stream. -#if !defined (_CONSUMER_ROUTER_H) +#ifndef _CONSUMER_ROUTER_H #define _CONSUMER_ROUTER_H #include "ace/Thread_Manager.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/UPIPE_Acceptor.h" #include "ace/UPIPE_Addr.h" #include "ace/Svc_Handler.h" @@ -21,7 +26,7 @@ typedef ACE_HANDLE CONSUMER_KEY; typedef Peer_Router<Consumer_Handler, CONSUMER_KEY> CONSUMER_ROUTER; -class Consumer_Handler +class Consumer_Handler : public Peer_Handler<CONSUMER_ROUTER, CONSUMER_KEY> { public: diff --git a/examples/ASX/UPIPE_Event_Server/Event_Analyzer.h b/examples/ASX/UPIPE_Event_Server/Event_Analyzer.h index a815e7d642a..00cdb33cc7c 100644 --- a/examples/ASX/UPIPE_Event_Server/Event_Analyzer.h +++ b/examples/ASX/UPIPE_Event_Server/Event_Analyzer.h @@ -3,10 +3,15 @@ // Signal router. -#if !defined (_EVENT_ANALYZER_H) -#define _EVENT_ANALYZER_H +#ifndef _EVENT_ANALYZER_H +#define _EVENT_ANALYZER_H #include "ace/Stream.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Module.h" #include "ace/Task.h" #include "ace/Synch.h" diff --git a/examples/ASX/UPIPE_Event_Server/Options.h b/examples/ASX/UPIPE_Event_Server/Options.h index fff2593e435..e82729d965a 100644 --- a/examples/ASX/UPIPE_Event_Server/Options.h +++ b/examples/ASX/UPIPE_Event_Server/Options.h @@ -3,10 +3,15 @@ // Option manager for Event Server. -#if !defined (DEVICE_OPTIONS_H) +#ifndef DEVICE_OPTIONS_H #define DEVICE_OPTIONS_H #include "ace/OS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Profile_Timer.h" #if defined (ACE_HAS_THREADS) @@ -24,7 +29,7 @@ public: void thr_count (size_t count); size_t thr_count (void); - void initial_queue_length (size_t length); + void initial_queue_length (size_t length); size_t initial_queue_length (void); void high_water_mark (size_t size); @@ -33,7 +38,7 @@ public: void low_water_mark (size_t size); size_t low_water_mark (void); - void message_size (size_t size); + void message_size (size_t size); size_t message_size (void); void iterations (size_t n); @@ -46,13 +51,13 @@ public: char *supplier_port (void); void consumer_port (char *port); - char *consumer_port (void); + char *consumer_port (void); void supplier_file (char *file); char *supplier_file (void); void consumer_file (char *file); - char *consumer_file (void); + char *consumer_file (void); int debug (void); int verbose (void); @@ -60,20 +65,20 @@ public: void print_results (void); private: - ACE_Profile_Timer itimer_; // Time the process. - size_t thr_count_; // Number of threads to spawn. - long t_flags_; // Flags to thr_create(). - size_t high_water_mark_; // ACE_Task high water mark. - size_t low_water_mark_; // ACE_Task low water mark. - size_t message_size_; // Size of a message. - size_t initial_queue_length_; // Initial number of items in the queue. - size_t iterations_; // Number of iterations to run the test program. - int debugging_; // Extra debugging info. - int verbosity_; // Extra verbose messages. - char *consumer_port_; // Port that the Consumer_Router is using. - char *supplier_port_; // Port that the Supplier_Router is using. - char *consumer_file_; // file that the Consumer_Router is using. - char *supplier_file_; // file that the Supplier_Router is using. + ACE_Profile_Timer itimer_; // Time the process. + size_t thr_count_; // Number of threads to spawn. + long t_flags_; // Flags to thr_create(). + size_t high_water_mark_; // ACE_Task high water mark. + size_t low_water_mark_; // ACE_Task low water mark. + size_t message_size_; // Size of a message. + size_t initial_queue_length_; // Initial number of items in the queue. + size_t iterations_; // Number of iterations to run the test program. + int debugging_; // Extra debugging info. + int verbosity_; // Extra verbose messages. + char *consumer_port_; // Port that the Consumer_Router is using. + char *supplier_port_; // Port that the Supplier_Router is using. + char *consumer_file_; // file that the Consumer_Router is using. + char *supplier_file_; // file that the Supplier_Router is using. }; extern Options options; diff --git a/examples/ASX/UPIPE_Event_Server/Peer_Router.h b/examples/ASX/UPIPE_Event_Server/Peer_Router.h index c60da36c931..54d25ee371e 100644 --- a/examples/ASX/UPIPE_Event_Server/Peer_Router.h +++ b/examples/ASX/UPIPE_Event_Server/Peer_Router.h @@ -4,10 +4,15 @@ // The interface between one or more peers and a stream. A peer // typically runs remotely on another machine. -#if !defined (_PEER_ROUTER_H) +#ifndef _PEER_ROUTER_H #define _PEER_ROUTER_H #include "ace/Acceptor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Svc_Handler.h" #include "ace/UPIPE_Acceptor.h" #include "ace/UPIPE_Addr.h" @@ -20,7 +25,7 @@ template <class PEER_HANDLER, class KEY> class Peer_Router; -template <class PEER_HANDLER, class KEY> +template <class PEER_HANDLER, class KEY> class Acceptor_Factory : public ACE_Acceptor<PEER_HANDLER, ACE_UPIPE_ACCEPTOR> { public: @@ -47,11 +52,11 @@ public: virtual int handle_input (ACE_HANDLE); // Receive input from the peer.. - virtual int put (ACE_Message_Block *, ACE_Time_Value *tv = 0); - // Send output to a peer. + virtual int put (ACE_Message_Block *, ACE_Time_Value *tv = 0); + // Send output to a peer. protected: - ROUTER *router_task_; + ROUTER *router_task_; // Pointer to write task.. private: @@ -85,7 +90,7 @@ public: protected: // Handle control messages arriving from adjacent Modules. - virtual int control (ACE_Message_Block *); + virtual int control (ACE_Message_Block *); // Map used to keep track of active peers. ACE_Map_Manager <PEER_KEY, PEER_HANDLER *, ACE_RW_Mutex> peer_map_; @@ -106,7 +111,7 @@ private: #if defined (__ACE_INLINE__) #define ACE_INLINE inline #else -#define ACE_INLINE +#define ACE_INLINE #endif /* __ACE_INLINE__ */ #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) diff --git a/examples/ASX/UPIPE_Event_Server/Supplier_Router.h b/examples/ASX/UPIPE_Event_Server/Supplier_Router.h index 0fcb72f4c20..3fc61c8acfc 100644 --- a/examples/ASX/UPIPE_Event_Server/Supplier_Router.h +++ b/examples/ASX/UPIPE_Event_Server/Supplier_Router.h @@ -3,10 +3,15 @@ // The interface between a supplier and an Event Service ACE_Stream. -#if !defined (_SUPPLIER_ROUTER_H) +#ifndef _SUPPLIER_ROUTER_H #define _SUPPLIER_ROUTER_H #include "ace/UPIPE_Addr.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/UPIPE_Acceptor.h" #include "ace/Map_Manager.h" #include "ace/Svc_Handler.h" @@ -15,7 +20,7 @@ #if defined (ACE_HAS_THREADS) // Forward declaration. -class Supplier_Handler; +class Supplier_Handler; // Type of search key for SUPPLIER_MAP. typedef ACE_HANDLE SUPPLIER_KEY; @@ -24,7 +29,7 @@ typedef ACE_HANDLE SUPPLIER_KEY; typedef Peer_Router<Supplier_Handler, SUPPLIER_KEY> SUPPLIER_ROUTER; -class Supplier_Handler +class Supplier_Handler : public Peer_Handler<SUPPLIER_ROUTER, SUPPLIER_KEY> { public: diff --git a/examples/Bounded_Packet_Relay/BPR_Drivers.h b/examples/Bounded_Packet_Relay/BPR_Drivers.h index 49812a07d79..83f37022994 100644 --- a/examples/Bounded_Packet_Relay/BPR_Drivers.h +++ b/examples/Bounded_Packet_Relay/BPR_Drivers.h @@ -26,10 +26,15 @@ // // ============================================================================ -#if !defined (_BPR_DRIVERS_H_) +#ifndef _BPR_DRIVERS_H_ #define _BPR_DRIVERS_H_ #include "ace/Functor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Task.h" #include "ace/Synch.h" diff --git a/examples/Bounded_Packet_Relay/BPR_Drivers_T.h b/examples/Bounded_Packet_Relay/BPR_Drivers_T.h index 31a8a41f798..8ad1b48564c 100644 --- a/examples/Bounded_Packet_Relay/BPR_Drivers_T.h +++ b/examples/Bounded_Packet_Relay/BPR_Drivers_T.h @@ -26,11 +26,15 @@ // // ============================================================================ -#if !defined (_BPR_DRIVERS_T_H_) +#ifndef _BPR_DRIVERS_T_H_ #define _BPR_DRIVERS_T_H_ #include "ace/Functor.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + // Forward declarations. class Input_Device_Wrapper_Base; class Output_Device_Wrapper_Base; diff --git a/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.h b/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.h index 11759e10ca5..30cff587f06 100644 --- a/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.h +++ b/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.h @@ -25,12 +25,17 @@ // // ============================================================================ -#if !defined (_THREAD_BOUNDED_PACKET_RELAY_H_) +#ifndef _THREAD_BOUNDED_PACKET_RELAY_H_ #define _THREAD_BOUNDED_PACKET_RELAY_H_ #define ACE_HAS_DEFERRED_TIMER_COMMANDS #include "ace/Functor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Task.h" #include "ace/Timer_Heap_T.h" #include "ace/Timer_Queue_Adapters.h" @@ -39,14 +44,14 @@ // These typedefs ensure that we use the minimal amount of locking // necessary. typedef ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex> - Upcall; + Upcall; typedef ACE_Timer_Heap_T<ACE_Event_Handler *, - Upcall, - ACE_Null_Mutex> - Timer_Heap; + Upcall, + ACE_Null_Mutex> + Timer_Heap; typedef ACE_Timer_Heap_Iterator_T<ACE_Event_Handler *, - Upcall, - ACE_Null_Mutex> + Upcall, + ACE_Null_Mutex> Timer_Heap_Iterator; typedef ACE_Thread_Timer_Queue_Adapter<Timer_Heap> Thread_Timer_Queue; @@ -171,7 +176,7 @@ public: User_Input_Task (Bounded_Packet_Relay *relay, Thread_Timer_Queue *queue, - Thread_Bounded_Packet_Relay_Driver &timer_queue_driver); + Thread_Bounded_Packet_Relay_Driver &timer_queue_driver); // Constructor. ~User_Input_Task (void); @@ -300,7 +305,7 @@ public: // Destructor. virtual int handle_timeout (const ACE_Time_Value ¤t_time, - const void *arg); + const void *arg); // Call back hook. virtual int cancelled (void); @@ -344,7 +349,7 @@ public: // Destructor. virtual int handle_timeout (const ACE_Time_Value ¤t_time, - const void *arg); + const void *arg); // Call back hook. virtual int cancelled (void); diff --git a/examples/CORBA/Test_i.h b/examples/CORBA/Test_i.h index dd1e617d1f6..01fe82c75f1 100644 --- a/examples/CORBA/Test_i.h +++ b/examples/CORBA/Test_i.h @@ -2,13 +2,18 @@ // $Id$ #include "ace/Log_Msg.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "Test.hh" class Test_i { public: virtual void method (long input, - ACE_CORBA_1 (Environment) &IT_env = ACE_CORBA_1 (default_environment)); + ACE_CORBA_1 (Environment) &IT_env = ACE_CORBA_1 (default_environment)); }; DEF_TIE_Test (Test_i) diff --git a/examples/Connection/blocking/SPIPE-acceptor.h b/examples/Connection/blocking/SPIPE-acceptor.h index 6428d6ccf55..84253f2e37c 100644 --- a/examples/Connection/blocking/SPIPE-acceptor.h +++ b/examples/Connection/blocking/SPIPE-acceptor.h @@ -1,10 +1,15 @@ /* -*- C++ -*- */ // $Id$ -#if !defined (SP_ACCEPTOR_H) +#ifndef SP_ACCEPTOR_H #define SP_ACCEPTOR_H #include "ace/Svc_Handler.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Acceptor.h" #include "ace/SPIPE_Stream.h" #include "ace/SPIPE_Acceptor.h" diff --git a/examples/Connection/blocking/SPIPE-connector.h b/examples/Connection/blocking/SPIPE-connector.h index 3bed82195a7..d9ea2d32629 100644 --- a/examples/Connection/blocking/SPIPE-connector.h +++ b/examples/Connection/blocking/SPIPE-connector.h @@ -1,10 +1,15 @@ /* -*- C++ -*- */ // $Id$ -#if !defined (SP_CONNECTOR_H) +#ifndef SP_CONNECTOR_H #define SP_CONNECTOR_H #include "ace/Svc_Handler.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/SPIPE_Stream.h" #include "ace/Connector.h" #include "ace/SPIPE_Connector.h" @@ -26,7 +31,7 @@ public: // = Demultiplexing hooks. virtual int handle_input (ACE_HANDLE); virtual int handle_close (ACE_HANDLE handle = ACE_INVALID_HANDLE, - ACE_Reactor_Mask mask = ACE_Event_Handler::ALL_EVENTS_MASK); + ACE_Reactor_Mask mask = ACE_Event_Handler::ALL_EVENTS_MASK); virtual ACE_HANDLE get_handle (void) const; @@ -53,7 +58,7 @@ public: virtual int svc (void); // Run the svc. - + virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); // Report connection errors. diff --git a/examples/Connection/non_blocking/CPP-acceptor.h b/examples/Connection/non_blocking/CPP-acceptor.h index 70898609aea..3adc524a48c 100644 --- a/examples/Connection/non_blocking/CPP-acceptor.h +++ b/examples/Connection/non_blocking/CPP-acceptor.h @@ -1,11 +1,15 @@ /* -*- C++ -*- */ // $Id$ -#if !defined (CPP_ACCEPTOR_H) +#ifndef CPP_ACCEPTOR_H #define CPP_ACCEPTOR_H #include "ace/Acceptor.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + template <ACE_PEER_STREAM_1> class Svc_Handler : public ACE_Svc_Handler <ACE_PEER_STREAM_2, ACE_NULL_SYNCH> { @@ -18,7 +22,7 @@ public: virtual int open (void *); // Perform the work of the SVC_HANDLER. - + virtual int handle_input (ACE_HANDLE = ACE_INVALID_HANDLE); // Handle data from the client. @@ -29,7 +33,7 @@ public: // Handles acceptor timeouts. private: - typedef ACE_Svc_Handler <ACE_PEER_STREAM_2, ACE_NULL_SYNCH> + typedef ACE_Svc_Handler <ACE_PEER_STREAM_2, ACE_NULL_SYNCH> SVC_HANDLER; }; @@ -63,7 +67,7 @@ public: // Run the interative service. private: - typedef ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> + typedef ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> inherited; ACE_PEER_ACCEPTOR_ADDR server_addr_; diff --git a/examples/Connection/non_blocking/CPP-connector.h b/examples/Connection/non_blocking/CPP-connector.h index 49d7e25ae53..66a75747a51 100644 --- a/examples/Connection/non_blocking/CPP-connector.h +++ b/examples/Connection/non_blocking/CPP-connector.h @@ -1,10 +1,15 @@ /* -*- C++ -*- */ // $Id$ -#if !defined (CPP_CONNECTOR_H) +#ifndef CPP_CONNECTOR_H #define CPP_CONNECTOR_H #include "ace/Service_Config.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Connector.h" template <ACE_PEER_STREAM_1> @@ -12,7 +17,7 @@ class Peer_Handler : public ACE_Svc_Handler<ACE_PEER_STREAM_2, ACE_SYNCH> { // = TITLE // Handles communication with the server. - // + // // = DESCRIPTION // This class uses a very clever state machine pattern to keep // track of how it interacts with the user and the server. @@ -62,12 +67,12 @@ public: virtual int svc (void); // Run the svc. - + virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); // Report connection errors. private: - typedef ACE_Connector<SVC_HANDLER, ACE_PEER_CONNECTOR_2> + typedef ACE_Connector<SVC_HANDLER, ACE_PEER_CONNECTOR_2> inherited; ACE_Synch_Options options_; diff --git a/examples/IPC_SAP/SPIPE_SAP/shared.h b/examples/IPC_SAP/SPIPE_SAP/shared.h index 3f7d7647023..3d49ce9dc04 100644 --- a/examples/IPC_SAP/SPIPE_SAP/shared.h +++ b/examples/IPC_SAP/SPIPE_SAP/shared.h @@ -3,4 +3,8 @@ #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + static const char *rendezvous = ACE_DEFAULT_RENDEZVOUS; diff --git a/examples/Logger/simple-server/Logging_Acceptor.h b/examples/Logger/simple-server/Logging_Acceptor.h index bfc5bbb3d3e..5a69656638c 100644 --- a/examples/Logger/simple-server/Logging_Acceptor.h +++ b/examples/Logger/simple-server/Logging_Acceptor.h @@ -5,24 +5,29 @@ // // = LIBRARY // examples -// +// // = FILENAME -// Logging_Acceptor.h +// Logging_Acceptor.h // // = AUTHOR -// Doug Schmidt -// +// Doug Schmidt +// // ============================================================================ -#if !defined (_CLIENT_ACCEPTOR_H) +#ifndef _CLIENT_ACCEPTOR_H #define _CLIENT_ACCEPTOR_H #include "ace/SOCK_Acceptor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Event_Handler.h" class Logging_Acceptor : public ACE_Event_Handler // = TITLE - // Handle connection requests from remote client clients. + // Handle connection requests from remote client clients. // // = DESCRIPTION // Accepts client connection requests, creates Logging_Handler's @@ -41,7 +46,7 @@ private: virtual int handle_input (ACE_HANDLE); virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); - ACE_SOCK_Acceptor peer_acceptor_; + ACE_SOCK_Acceptor peer_acceptor_; // Passive connection acceptor factory. }; diff --git a/examples/Logger/simple-server/Logging_Handler.h b/examples/Logger/simple-server/Logging_Handler.h index 59b92f7f1e8..6f960694947 100644 --- a/examples/Logger/simple-server/Logging_Handler.h +++ b/examples/Logger/simple-server/Logging_Handler.h @@ -6,26 +6,31 @@ // // = LIBRARY // examples -// +// // = FILENAME -// Logging_Handler.h +// Logging_Handler.h // // = AUTHOR -// Doug Schmidt -// +// Doug Schmidt +// // ============================================================================ -#if !defined (_CLIENT_HANDLER_H) +#ifndef _CLIENT_HANDLER_H #define _CLIENT_HANDLER_H #include "ace/Event_Handler.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/INET_Addr.h" #include "ace/SOCK_Stream.h" class Logging_Handler : public ACE_Event_Handler // = TITLE // Receive client message from the remote clients. - // + // // = DESCRIPTION // This class demonstrates how to receive messages from remote // clients using the notification mechanisms in the @@ -33,7 +38,7 @@ class Logging_Handler : public ACE_Event_Handler // utilize the <ACE_Reactor> timer mechanisms, as well. { public: - Logging_Handler (void); + Logging_Handler (void); // = Hooks for opening and closing handlers. virtual int open (void); @@ -48,18 +53,18 @@ protected: virtual int handle_input (ACE_HANDLE); virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE, ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK); - virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg); + virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg); // = Really should be private... - virtual ~Logging_Handler (void); + virtual ~Logging_Handler (void); // Ensure dynamic allocation. private: char host_name_[MAXHOSTNAMELEN + 1]; // Host we are connected to. - ACE_SOCK_Stream cli_stream_; - // Connection with client + ACE_SOCK_Stream cli_stream_; + // Connection with client }; #endif /* _CLIENT_HANDLER_H */ diff --git a/examples/Logger/simple-server/Reactor_Singleton.h b/examples/Logger/simple-server/Reactor_Singleton.h index 44f2a91eda7..567029bf5c9 100644 --- a/examples/Logger/simple-server/Reactor_Singleton.h +++ b/examples/Logger/simple-server/Reactor_Singleton.h @@ -6,19 +6,24 @@ // // = LIBRARY // examples -// +// // = FILENAME -// Reactor_Singleton.h +// Reactor_Singleton.h // // = AUTHOR -// Doug Schmidt -// +// Doug Schmidt +// // ============================================================================ -#if !defined (_REACTOR_SINGLETON_H) +#ifndef _REACTOR_SINGLETON_H #define _REACTOR_SINGLETON_H #include "ace/Singleton.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Reactor.h" // Our global Reactor Singleton. diff --git a/examples/Mem_Map/IO-tests/IO_Test.h b/examples/Mem_Map/IO-tests/IO_Test.h index 659a85eec15..22dcf578d7f 100644 --- a/examples/Mem_Map/IO-tests/IO_Test.h +++ b/examples/Mem_Map/IO-tests/IO_Test.h @@ -5,6 +5,10 @@ #include "ace/Profile_Timer.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + /* Base class for all the File I/O tests. */ class IO_Test @@ -21,8 +25,8 @@ public: protected: // Name of the test - const char *name_; - + const char *name_; + // Reference to a timer ACE_Profile_Timer &tm_; }; diff --git a/examples/Reactor/Multicast/Log_Wrapper.h b/examples/Reactor/Multicast/Log_Wrapper.h index 859ed3c3ae6..75da02839c5 100644 --- a/examples/Reactor/Multicast/Log_Wrapper.h +++ b/examples/Reactor/Multicast/Log_Wrapper.h @@ -4,26 +4,31 @@ // log_wrapper.h #include "ace/Profile_Timer.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/INET_Addr.h" #include "ace/SOCK_Dgram_Mcast.h" -#if !defined (_LOG_WRAPPER_H) +#ifndef _LOG_WRAPPER_H #define _LOG_WRAPPER_H -class Log_Wrapper +class Log_Wrapper // = TITLE // Provide a wrapper around sending log messages via IP - // multicast. + // multicast. { public: Log_Wrapper (void); ~Log_Wrapper (void); // = Types of logging messages. - enum ACE_Log_Priority + enum ACE_Log_Priority { LOG_MESSAGE, - LOG_DEBUG, + LOG_DEBUG, LOG_WARNING, LOG_ERROR, LOG_EMERG @@ -31,12 +36,12 @@ public: int open (const int port, const char* mcast_addr); // get an object reference from an orbixd - + int log_message (ACE_Log_Priority type, char *message); // send a string to the logger // = Format of the logging record. - struct ACE_Log_Record + struct ACE_Log_Record { u_long sequence_number; ACE_Log_Priority type; diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.h b/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.h index 2f38b1d37d8..dbd7f4ef634 100644 --- a/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.h +++ b/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.h @@ -3,10 +3,15 @@ /* Handles INET broadcast datagram messages from remote hosts on the local subnet. */ -#if !defined (_HANDLE_BROADCAST_H) +#ifndef _HANDLE_BROADCAST_H #define _HANDLE_BROADCAST_H #include "ace/Service_Config.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Service_Types.h" #include "ace/INET_Addr.h" #include "ace/SOCK_Dgram.h" @@ -35,7 +40,7 @@ extern ACE_Service_Object_Type rb; #define ACE_INLINE inline #include "Handle_Broadcast.i" #else -#define ACE_INLINE +#define ACE_INLINE #endif /* __ACE_INLINE__ */ #endif /* _HANDLE_BROADCAST_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.h b/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.h index dcbf65293f2..90452d0f981 100644 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.h +++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.h @@ -3,10 +3,15 @@ /* Handles UNIX datagram messages from local host. */ -#if !defined (_HANDLE_L_CODGRAM_H) +#ifndef _HANDLE_L_CODGRAM_H #define _HANDLE_L_CODGRAM_H #include "ace/Service_Config.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Service_Types.h" #include "ace/LSOCK_CODgram.h" #include "ace/UNIX_Addr.h" @@ -18,13 +23,13 @@ public: virtual int init (int argc, char *argv[]); virtual int info (char **, size_t) const; virtual int fini (void); - + public: int open (const ACE_UNIX_Addr &suad, int async = 0); virtual ACE_HANDLE get_handle (void) const; virtual int handle_input (ACE_HANDLE); virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); - + char rendezvous[MAXPATHLEN + 1]; static const char *DEFAULT_RENDEZVOUS; }; @@ -35,7 +40,7 @@ extern ACE_Service_Object_Type lc; #define ACE_INLINE inline #include "Handle_L_CODgram.i" #else -#define ACE_INLINE +#define ACE_INLINE #endif /* __ACE_INLINE__ */ #endif /* _HANDLE_L_CODGRAM_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.h b/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.h index 20e14810ef5..0cefbba6baf 100644 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.h +++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.h @@ -3,10 +3,15 @@ // Handles UNIX datagram messages from local host. -#if !defined (_HANDLE_L_DGRAM_H) +#ifndef _HANDLE_L_DGRAM_H #define _HANDLE_L_DGRAM_H #include "ace/Service_Config.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Service_Types.h" #include "ace/LSOCK_Dgram.h" #include "ace/UNIX_Addr.h" @@ -37,7 +42,7 @@ extern ACE_Service_Object_Type ld; #define ACE_INLINE inline #include "Handle_L_Dgram.i" #else -#define ACE_INLINE +#define ACE_INLINE #endif /* __ACE_INLINE__ */ #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ #endif /* _HANDLE_L_DGRAM_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.h b/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.h index c7037c2d5be..dec235ca502 100644 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.h +++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.h @@ -4,16 +4,21 @@ /* Handle connections from local UNIX ACE_FIFO */ /* Read from a well known ACE_FIFO and write to stdout. */ -#if !defined (_HANDLE_L_FIFO_H) +#ifndef _HANDLE_L_FIFO_H #define _HANDLE_L_FIFO_H #include "ace/Service_Config.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Service_Types.h" #include "ace/FIFO_Recv_Msg.h" class Handle_L_FIFO : public ACE_Service_Object, public ACE_FIFO_Recv_Msg { -public: +public: Handle_L_FIFO (void); virtual int init (int argc, char *argv[]); virtual int info (char **, size_t) const; @@ -34,7 +39,7 @@ extern ACE_Service_Object_Type lf; #define ACE_INLINE inline #include "Handle_L_FIFO.i" #else -#define ACE_INLINE +#define ACE_INLINE #endif /* __ACE_INLINE__ */ #endif /* _HANDLE_L_FIFO_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.h b/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.h index 3d675e1bcdd..82d784e977a 100644 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.h +++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.h @@ -1,13 +1,18 @@ /* -*- C++ -*- */ // $Id$ -/* Handle connections from local UNIX domain sockets that are sending +/* Handle connections from local UNIX domain sockets that are sending end-points from a pipe! */ -#if !defined (_HANDLE_L_PIPE_H) +#ifndef _HANDLE_L_PIPE_H #define _HANDLE_L_PIPE_H #include "ace/Service_Config.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Service_Types.h" #include "ace/UNIX_Addr.h" #include "ace/LSOCK_Acceptor.h" @@ -37,7 +42,7 @@ extern ACE_Service_Object_Type lp; #define ACE_INLINE inline #include "Handle_L_Pipe.i" #else -#define ACE_INLINE +#define ACE_INLINE #endif /* __ACE_INLINE__ */ #endif /* _HANDLE_L_PIPE_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.h b/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.h index 029965f0c94..96c2cd43bf7 100644 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.h +++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.h @@ -4,10 +4,15 @@ /* Handle connections from local UNIX ACE_SPIPE */ /* Read from a well known ACE_SPIPE and write to stdout. */ -#if !defined (_HANDLE_L_SPIPE_H) +#ifndef _HANDLE_L_SPIPE_H #define _HANDLE_L_SPIPE_H #include "ace/Service_Config.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Service_Types.h" #include "ace/SPIPE_Acceptor.h" @@ -15,7 +20,7 @@ class Handle_L_SPIPE : public ACE_Service_Object, public ACE_SPIPE_Acceptor { -public: +public: Handle_L_SPIPE (void); virtual int init (int argc, char *argv[]); virtual int info (char **, size_t) const; @@ -36,7 +41,7 @@ extern ACE_Service_Object_Type lsp; #define ACE_INLINE inline #include "Handle_L_SPIPE.i" #else -#define ACE_INLINE +#define ACE_INLINE #endif /* __ACE_INLINE__ */ #endif /* _HANDLE_L_SPIPE_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.h b/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.h index d637b4e240a..8d3c605f451 100644 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.h +++ b/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.h @@ -4,10 +4,15 @@ /* Handle connections from local UNIX domain sockets. */ -#if !defined (_HANDLE_L_STREAM_H) +#ifndef _HANDLE_L_STREAM_H #define _HANDLE_L_STREAM_H #include "ace/Service_Config.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Service_Types.h" #include "ace/UNIX_Addr.h" #include "ace/LSOCK_Acceptor.h" @@ -40,7 +45,7 @@ extern ACE_Service_Object_Type ls; #define ACE_INLINE inline #include "Handle_L_Stream.i" #else -#define ACE_INLINE +#define ACE_INLINE #endif /* __ACE_INLINE__ */ #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ #endif /* _HANDLE_L_STREAM_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.h b/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.h index 5a101b50b73..3764d3e3577 100644 --- a/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.h +++ b/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.h @@ -3,10 +3,15 @@ /* Handles INET datagram messages from remote hosts. */ -#if !defined (_HANDLE_R_DGRAM_H) +#ifndef _HANDLE_R_DGRAM_H #define _HANDLE_R_DGRAM_H #include "ace/Service_Config.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Service_Types.h" #include "ace/INET_Addr.h" #include "ace/SOCK_Dgram.h" @@ -34,7 +39,7 @@ extern ACE_Service_Object_Type rd; #define ACE_INLINE inline #include "Handle_R_Dgram.i" #else -#define ACE_INLINE +#define ACE_INLINE #endif /* __ACE_INLINE__ */ #endif /* _HANDLE_R_DGRAM_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.h b/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.h index 7a4c12f28e9..f011e31c81e 100644 --- a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.h +++ b/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.h @@ -3,10 +3,15 @@ /* Handle connections from remote INET connections. */ -#if !defined (_HANDLE_R_STREAM_H) +#ifndef _HANDLE_R_STREAM_H #define _HANDLE_R_STREAM_H #include "ace/Service_Config.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Service_Types.h" #include "ace/SOCK_Stream.h" #include "ace/SOCK_Acceptor.h" @@ -28,7 +33,7 @@ private: ACE_SOCK_Stream new_remote_stream; static u_short DEFAULT_PORT; - static char *login_name; + static char *login_name; }; extern ACE_Service_Object_Type rs; @@ -37,7 +42,7 @@ extern ACE_Service_Object_Type rs; #define ACE_INLINE inline #include "Handle_R_Stream.i" #else -#define ACE_INLINE +#define ACE_INLINE #endif /* __ACE_INLINE__ */ #endif /* _HANDLE_R_STREAM_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.h b/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.h index 2b6f5133665..1dece35cf68 100644 --- a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.h +++ b/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.h @@ -1,10 +1,15 @@ /* -*- C++ -*- */ // $Id$ -#if !defined (_HANDLE_THR_STREAM_H) +#ifndef _HANDLE_THR_STREAM_H #define _HANDLE_THR_STREAM_H #include "ace/Acceptor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Service_Types.h" #if defined (ACE_HAS_THREADS) @@ -13,7 +18,7 @@ template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> class Handle_Thr_Acceptor : public ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> // = TITLE // This factory creates new <SVC_HANDLERS> and runs them with the - // configured <ACE_Thread_Strategy>. + // configured <ACE_Thread_Strategy>. { public: // = Initialization and termination. @@ -64,7 +69,7 @@ extern ACE_Service_Object_Type rts; #define ACE_INLINE inline #include "Handle_Thr_Stream.i" #else -#define ACE_INLINE +#define ACE_INLINE #endif /* __ACE_INLINE__ */ #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.h b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.h index 0bbb3c0457d..7a0aed09737 100644 --- a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.h +++ b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.h @@ -3,10 +3,15 @@ /* Handles timeouts. */ -#if !defined (_HANDLE_TIMEOUT_H) +#ifndef _HANDLE_TIMEOUT_H #define _HANDLE_TIMEOUT_H #include "ace/Service_Config.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Service_Types.h" class Handle_Timeout : public ACE_Service_Object @@ -30,7 +35,7 @@ extern ACE_Service_Object_Type t1; #define ACE_INLINE inline #include "Handle_Timeout.i" #else -#define ACE_INLINE +#define ACE_INLINE #endif /* __ACE_INLINE__ */ #endif /* _HANDLE_TIMEOUT_H */ diff --git a/examples/Service_Configurator/Misc/Timer_Service.h b/examples/Service_Configurator/Misc/Timer_Service.h index 642bc3db019..82f6c1ac222 100644 --- a/examples/Service_Configurator/Misc/Timer_Service.h +++ b/examples/Service_Configurator/Misc/Timer_Service.h @@ -3,6 +3,10 @@ #include "ace/Service_Config.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + class Timer_Service_1 : public ACE_Service_Object { // = TITLE @@ -11,16 +15,16 @@ class Timer_Service_1 : public ACE_Service_Object public: virtual int init (int argc, char *argv[]); // Initialization hook. - + virtual int handle_timeout (const ACE_Time_Value &, - const void *); + const void *); // Timeout hook. virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); // Close hook. private: - enum + enum { TIMEOUT = 4, // Wait 4 seconds between timeouts MAX_TIMEOUTS = 10 // Don't timeout for more than 10 times. diff --git a/examples/Shared_Malloc/Malloc.h b/examples/Shared_Malloc/Malloc.h index 57a1eecd1f2..6d4cb6bfc12 100644 --- a/examples/Shared_Malloc/Malloc.h +++ b/examples/Shared_Malloc/Malloc.h @@ -1,11 +1,15 @@ /* -*- C++ -*- */ // $Id$ -#if !defined (MY_MALLOC_H) +#ifndef MY_MALLOC_H #define MY_MALLOC_H #include "ace/Malloc.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + class Malloc // = TITLE // Allocator Singleton. diff --git a/examples/Shared_Malloc/Options.h b/examples/Shared_Malloc/Options.h index 931f7411673..c96cd5fb322 100644 --- a/examples/Shared_Malloc/Options.h +++ b/examples/Shared_Malloc/Options.h @@ -1,11 +1,15 @@ /* -*- C++ -*- */ // $Id$ -#if !defined (_OPTIONS) +#ifndef _OPTIONS #define _OPTIONS #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + class Options // = TITLE // Options Singleton. diff --git a/examples/System_V_IPC/SV_Message_Queues/test.h b/examples/System_V_IPC/SV_Message_Queues/test.h index 9d1283887dd..e88e567fa40 100644 --- a/examples/System_V_IPC/SV_Message_Queues/test.h +++ b/examples/System_V_IPC/SV_Message_Queues/test.h @@ -2,10 +2,15 @@ // $Id$ #include "ace/OS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/SV_Message.h" #define MSGSZ 128 -#define SRV_KEY ACE_DEFAULT_SHM_KEY +#define SRV_KEY ACE_DEFAULT_SHM_KEY #define SRV_ID 1 class Message_Data @@ -16,7 +21,7 @@ public: ::strncpy (this->username_, user, 9); ::strncpy (this->mtext_, text, MSGSZ); } - + long pid (void) { return this->pid_; } void pid (long p) { this->pid_ = p; } char *user (void) { return this->username_; } @@ -25,10 +30,10 @@ public: void text (char text[]) { ::strncpy (this->mtext_, text, MSGSZ); } int length (void) { return sizeof *this - sizeof this->mtext_ + ::strlen (this->mtext_) + 1; } -protected: +protected: long pid_; - char username_[9]; - char mtext_[MSGSZ]; + char username_[9]; + char mtext_[MSGSZ]; }; class Message_Block : public ACE_SV_Message, public Message_Data @@ -38,7 +43,7 @@ class Message_Block : public ACE_SV_Message, public Message_Data // = DESCRIPTION // This may not be 100 percent portable on all C++ compilers since // it relies on inheritance to be "concatenation." - // + // public: Message_Block (long t, long p = 0, diff --git a/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.h b/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.h index 7712e016a09..4e8cd9b9d13 100644 --- a/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.h +++ b/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.h @@ -2,6 +2,11 @@ // $Id$ #include "ace/OS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #define SHMSZ 27 #define SEM_KEY 1234 #define SHM_KEY 5678 diff --git a/examples/Threads/TSS_Data.h b/examples/Threads/TSS_Data.h index fb8e6312d14..03fd6c8ff50 100644 --- a/examples/Threads/TSS_Data.h +++ b/examples/Threads/TSS_Data.h @@ -4,17 +4,21 @@ // // = LIBRARY // examples -// +// // = FILENAME // TSS_Data.cpp // // = AUTHOR // Prashant Jain and Doug Schmidt -// +// // ============================================================================ #include "ace/Singleton.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + class TSS_Data // = TITLE // Data that is stored in thread-specific storage. @@ -22,7 +26,7 @@ class TSS_Data public: void *data (void) { return this->data_; } void data (void *v) { this->data_ = v; } - + private: // = data_ will be thread-specific data so it doesn't need a lock. void *data_; diff --git a/examples/Threads/TSS_Obj.h b/examples/Threads/TSS_Obj.h index e7d0d553350..c3d087e6188 100644 --- a/examples/Threads/TSS_Obj.h +++ b/examples/Threads/TSS_Obj.h @@ -4,7 +4,7 @@ // // = LIBRARY // tests -// +// // = FILENAME // TSS_Test.cpp // @@ -14,11 +14,15 @@ // // = AUTHOR // Prashant Jain and Doug Schmidt -// +// // ============================================================================ #include "ace/Synch.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + class TSS_Obj // = TITLE // This object is stored in thread-specific storage. diff --git a/examples/Threads/TSS_Task.h b/examples/Threads/TSS_Task.h index fc2b2f7f25c..6ad9b6d1452 100644 --- a/examples/Threads/TSS_Task.h +++ b/examples/Threads/TSS_Task.h @@ -6,16 +6,21 @@ // // = LIBRARY // tests -// +// // = FILENAME // TSS_Task.h // // = AUTHOR // Prashant Jain and Doug Schmidt -// +// // ============================================================================ #include "ace/Synch.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Token.h" class Test_Task diff --git a/examples/Timer_Queue/Async_Timer_Queue_Test.h b/examples/Timer_Queue/Async_Timer_Queue_Test.h index 702512dfb66..92977a58684 100644 --- a/examples/Timer_Queue/Async_Timer_Queue_Test.h +++ b/examples/Timer_Queue/Async_Timer_Queue_Test.h @@ -6,12 +6,12 @@ // // = LIBRARY // examples -// +// // = FILENAME // Async_Timer_Queue_Test.h // // = DESCRIPTION -// This test exercises the <ACE_Asynch_Timer_Queue_Adapter> +// This test exercises the <ACE_Asynch_Timer_Queue_Adapter> // using an <ACE_Timer_Heap>. // // = AUTHORS @@ -19,10 +19,15 @@ // Sergio Flores-Gaitan // ============================================================================ -#if !defined (_ASYNC_TIMER_QUEUE_TEST_H_) +#ifndef _ASYNC_TIMER_QUEUE_TEST_H_ #define _ASYNC_TIMER_QUEUE_TEST_H_ #include "ace/Signal.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Timer_Heap.h" #include "ace/Timer_Queue_Adapters.h" @@ -34,19 +39,19 @@ class Async_Timer_Handler : public ACE_Event_Handler // Target of the asynchronous timeout operation. public: virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg); + const void *arg); // Callback hook invoked by the <Timer_Queue>. }; -class Async_Timer_Queue +class Async_Timer_Queue { // = TITLE // Asynchronous Timer Queue Singleton. // // = DESCRIPTION // We use this class to avoid global variables and to - // consolidate all the Timer Queue processing in one central - // place. + // consolidate all the Timer Queue processing in one central + // place. public: typedef int (Async_Timer_Queue::*ACTION) (void *); diff --git a/examples/Timer_Queue/Driver.h b/examples/Timer_Queue/Driver.h index 01c35f27eee..135272de0f4 100644 --- a/examples/Timer_Queue/Driver.h +++ b/examples/Timer_Queue/Driver.h @@ -19,10 +19,15 @@ // // ============================================================================ -#if !defined (_DRIVER_H_) +#ifndef _DRIVER_H_ #define _DRIVER_H_ #include "ace/Task.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Timer_Heap_T.h" #include "ace/Timer_Queue_Adapters.h" diff --git a/examples/Timer_Queue/Reactor_Timer_Queue_Test.h b/examples/Timer_Queue/Reactor_Timer_Queue_Test.h index 66522f2ce52..f80b067d8b1 100644 --- a/examples/Timer_Queue/Reactor_Timer_Queue_Test.h +++ b/examples/Timer_Queue/Reactor_Timer_Queue_Test.h @@ -20,10 +20,15 @@ // // ============================================================================ -#if !defined (_REACTOR_TIMER_QUEUE_TEST_H_) +#ifndef _REACTOR_TIMER_QUEUE_TEST_H_ #define _REACTOR_TIMER_QUEUE_TEST_H_ #include "ace/Timer_Heap.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "Driver.h" class Reactor_Timer_Queue_Test_Driver; @@ -43,7 +48,7 @@ public: typedef int (Input_Handler::*ACTION) (void *); Input_Handler (ACE_Timer_Queue *tq, - Reactor_Timer_Queue_Test_Driver &timer_queue_driver); + Reactor_Timer_Queue_Test_Driver &timer_queue_driver); // Sets <done_> flag to 0, <driver_> to <timer_queue_driver> and // timer queue <tq_> to <tq> diff --git a/examples/Timer_Queue/Thread_Timer_Queue_Test.h b/examples/Timer_Queue/Thread_Timer_Queue_Test.h index fa4c424ea79..710b133b1e9 100644 --- a/examples/Timer_Queue/Thread_Timer_Queue_Test.h +++ b/examples/Timer_Queue/Thread_Timer_Queue_Test.h @@ -20,10 +20,15 @@ // // ============================================================================ -#if !defined (_THREAD_TIMER_QUEUE_TEST_H_) +#ifndef _THREAD_TIMER_QUEUE_TEST_H_ #define _THREAD_TIMER_QUEUE_TEST_H_ #include "ace/Task.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Timer_Heap_T.h" #include "ace/Timer_Queue_Adapters.h" #include "Driver.h" @@ -31,14 +36,14 @@ // These typedefs ensure that we use the minimal amount of locking // necessary. typedef ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex> - Upcall; + Upcall; typedef ACE_Timer_Heap_T<ACE_Event_Handler *, - Upcall, - ACE_Null_Mutex> - Timer_Heap; + Upcall, + ACE_Null_Mutex> + Timer_Heap; typedef ACE_Timer_Heap_Iterator_T<ACE_Event_Handler *, - Upcall, - ACE_Null_Mutex> + Upcall, + ACE_Null_Mutex> Timer_Heap_Iterator; typedef ACE_Thread_Timer_Queue_Adapter<Timer_Heap> Thread_Timer_Queue; @@ -59,7 +64,7 @@ public: typedef int (Input_Task::*ACTION) (void *); Input_Task (Thread_Timer_Queue *queue, - Thread_Timer_Queue_Test_Driver &timer_queue_driver); + Thread_Timer_Queue_Test_Driver &timer_queue_driver); virtual int svc (void); // This method runs the event loop in the new thread. @@ -133,7 +138,7 @@ public: // messages. virtual int handle_timeout (const ACE_Time_Value ¤t_time, - const void *arg); + const void *arg); // Call back hook. virtual int cancelled (void); |