Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / TAO / examples / AMI / FL_Callback / Progress_i.h
blob6b4643b44ede3f92e6915632fd4c354d7c464028
2 //=============================================================================
3 /**
4 * @file Progress_i.h
6 * @author Carlos O'Ryan
7 */
8 //=============================================================================
11 #ifndef PROGRESS_I_H
12 #define PROGRESS_I_H
14 #include "testS.h"
16 #include <FL/Fl_Box.H>
18 class Progress_Window : public Fl_Box
20 public:
21 /// Constructor
22 Progress_Window (int n_peers,
23 int n_iterations,
24 int x, int y,
25 int w, int h,
26 const char* l = 0);
28 /// Keep track of the progress on each peer
29 void sent_request (CORBA::Long id);
30 void recv_reply (CORBA::Long id);
32 /// One of the peers has bound to the server
33 CORBA::Long bind (Peer_ptr a_peer);
35 /// Start the peers...
36 void start ();
38 private:
39 /// The callback method
40 static void start_callback (Fl_Widget* widget, void *data);
42 private:
43 /// The total number of peers
44 int n_peers_;
46 /// The peers
47 PeerSet peers_;
49 /// The number of iterations;
50 int n_iterations_;
52 /// The set of sliders where we keep track of each client
53 Fl_Widget** request_progress_;
54 Fl_Widget** reply_progress_;
57 /**
58 * @class Progress_i
60 * @brief Progress server implementation
62 * Implements the Progress interface in test.idl, forward the
63 * calls to the Progress_Window class
65 class Progress_i : public POA_Progress
67 public:
68 /// ctor
69 Progress_i (Progress_Window* window);
71 // = The Progress methods.
72 void sent_request (CORBA::Long id);
73 void recv_reply (CORBA::Long id);
74 CORBA::Long bind (Peer_ptr a_peer);
76 private:
77 /// Display the graphics...
78 Progress_Window* window_;
81 #endif /* PROGRESS_I_H */