Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / examples / ASX / UPIPE_Event_Server / Options.h
blobac228624f05c4419b5b312510394d11669c0a964
1 /* -*- C++ -*- */
2 // Option manager for Event Server.
4 #ifndef DEVICE_OPTIONS_H
5 #define DEVICE_OPTIONS_H
7 #include "ace/config-all.h"
9 #if !defined (ACE_LACKS_PRAGMA_ONCE)
10 # pragma once
11 #endif /* ACE_LACKS_PRAGMA_ONCE */
13 #include "ace/Profile_Timer.h"
15 #if defined (ACE_HAS_THREADS)
17 class Options
19 public:
20 Options ();
21 ~Options ();
22 void parse_args (int argc, ACE_TCHAR *argv[]);
24 void stop_timer ();
25 void start_timer ();
27 void thr_count (size_t count);
28 size_t thr_count ();
30 void initial_queue_length (size_t length);
31 size_t initial_queue_length ();
33 void high_water_mark (size_t size);
34 size_t high_water_mark ();
36 void low_water_mark (size_t size);
37 size_t low_water_mark ();
39 void message_size (size_t size);
40 size_t message_size ();
42 void iterations (size_t n);
43 size_t iterations ();
45 void t_flags (long flag);
46 long t_flags ();
48 void supplier_port (const ACE_TCHAR *port);
49 const ACE_TCHAR *supplier_port ();
51 void consumer_port (const ACE_TCHAR *port);
52 const ACE_TCHAR *consumer_port ();
54 void supplier_file (const ACE_TCHAR *file);
55 const ACE_TCHAR *supplier_file ();
57 void consumer_file (const ACE_TCHAR *file);
58 const ACE_TCHAR *consumer_file ();
60 int debug ();
61 int verbose ();
63 void print_results ();
65 private:
66 ACE_Profile_Timer itimer_; // Time the process.
67 size_t thr_count_; // Number of threads to spawn.
68 long t_flags_; // Flags to thr_create().
69 size_t high_water_mark_; // ACE_Task high water mark.
70 size_t low_water_mark_; // ACE_Task low water mark.
71 size_t message_size_; // Size of a message.
72 size_t initial_queue_length_; // Initial number of items in the queue.
73 size_t iterations_; // Number of iterations to run the test program.
74 int debugging_; // Extra debugging info.
75 int verbosity_; // Extra verbose messages.
76 const ACE_TCHAR *consumer_port_; // Port that the Consumer_Router is using.
77 const ACE_TCHAR *supplier_port_; // Port that the Supplier_Router is using.
78 const ACE_TCHAR *consumer_file_; // file that the Consumer_Router is using.
79 const ACE_TCHAR *supplier_file_; // file that the Supplier_Router is using.
82 extern Options options;
84 #include "Options.inl"
85 #endif /* ACE_HAS_THREADS */
86 #endif /* DEVICE_OPTIONS_H */