blob: e382d9281472aa89e9546983297e02b016591258 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
// $Id$
// ============================================================================
//
// = LIBRARY
// TAO/examples/AMI/FL_Callback
//
// = FILENAME
// Progress_i.h
//
// = AUTHOR
// Carlos O'Ryan
//
// ============================================================================
#ifndef PROGRESS_I_H
#define PROGRESS_I_H
#include "testS.h"
#if defined(ACE_HAS_FL)
#include <FL/Fl_Box.h>
class Progress_Window : public Fl_Box
{
public:
Progress_Window (int n_peers,
int n_iterations,
int x, int y,
int w, int h,
const char* l = 0);
// Constructor
void sent_request (CORBA::Long id);
void recv_reply (CORBA::Long id);
// Keep track of the progress on each peer
CORBA::Long bind (Peer_ptr a_peer
ACE_ENV_ARG_DECL);
// One of the peers has bound to the server
void start (void);
// Start the peers...
private:
static void start_callback (Fl_Widget* widget, void *data);
// The callback method
private:
int n_peers_;
// The total number of peers
PeerSet peers_;
// The peers
int n_iterations_;
// The number of iterations;
Fl_Widget** request_progress_;
Fl_Widget** reply_progress_;
// The set of sliders where we keep track of each client
};
class Progress_i : public POA_Progress
{
// = TITLE
// Progress server implementation
//
// = DESCRIPTION
// Implements the Progress interface in test.idl, forward the
// calls to the Progress_Window class
//
public:
Progress_i (Progress_Window* window);
// ctor
// = The Progress methods.
void sent_request (CORBA::Long id
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
void recv_reply (CORBA::Long id
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
CORBA::Long bind (Peer_ptr a_peer
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException));
private:
Progress_Window* window_;
// Display the graphics...
};
#if defined(__ACE_INLINE__)
#include "Progress_i.i"
#endif /* __ACE_INLINE__ */
#endif /* ACE_HAS_FL */
#endif /* PROGRESS_I_H */
|