summaryrefslogtreecommitdiff
path: root/examples/ASX
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ASX')
-rw-r--r--examples/ASX/Event_Server/Event_Server/Consumer_Router.h9
-rw-r--r--examples/ASX/Event_Server/Event_Server/Event_Analyzer.h9
-rw-r--r--examples/ASX/Event_Server/Event_Server/Options.h33
-rw-r--r--examples/ASX/Event_Server/Event_Server/Peer_Router.h21
-rw-r--r--examples/ASX/Event_Server/Event_Server/Supplier_Router.h11
-rw-r--r--examples/ASX/UPIPE_Event_Server/Consumer_Router.h9
-rw-r--r--examples/ASX/UPIPE_Event_Server/Event_Analyzer.h9
-rw-r--r--examples/ASX/UPIPE_Event_Server/Options.h43
-rw-r--r--examples/ASX/UPIPE_Event_Server/Peer_Router.h19
-rw-r--r--examples/ASX/UPIPE_Event_Server/Supplier_Router.h11
10 files changed, 112 insertions, 62 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: