Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / RTEvent / lib / Control.h
blob9bd10c31d2b905f833f68d463303296867472454
1 /**
2 * @file Control.h
3 */
5 #ifndef TAO_RTEC_PERF_CONTROL_H
6 #define TAO_RTEC_PERF_CONTROL_H
7 #include /**/ "ace/pre.h"
9 #include "Federated_TestS.h"
11 #if !defined (ACE_LACKS_PRAGMA_ONCE)
12 # pragma once
13 #endif /* ACE_LACKS_PRAGMA_ONCE */
15 /**
16 * @class Control
18 * @brief Implement the Federated_Test::Control interface
20 class TAO_RTEC_Perf_Export Control
21 : public virtual POA_Federated_Test::Control
23 public:
24 /// Constructor
25 Control (size_t peers_expected,
26 size_t iterations,
27 int do_dump_history,
28 CORBA::ORB_ptr orb,
29 PortableServer::POA_ptr poa);
31 /// Destructor
32 virtual ~Control ();
34 //@{
35 /** @name The Federated_Test::Control methods
37 virtual void join (Federated_Test::Peer_ptr peer);
39 virtual PortableServer::POA_ptr _default_POA ();
40 //@}
42 private:
43 /// Synchronize access to the internal data
44 TAO_SYNCH_MUTEX mutex_;
46 /// Number of peers expected
47 size_t peers_expected_;
49 /// Number of iterations on each test
50 size_t iterations_;
52 /// This flag is set to 1 to dump the complete test history
53 int do_dump_history_;
55 /// Keep a reference to the ORB, used in shutdown
56 CORBA::ORB_var orb_;
58 /// The default POA
59 PortableServer::POA_var poa_;
61 /// Current number of items in the in the @c peers_ array.
62 size_t peers_count_;
64 /// An array to keep the list of peers.
65 /**
66 * @todo I would like to use ACE_Array<> but the interface is too
67 * confusing. std::vector<> would be better, but I'm not allowed to
69 Federated_Test::Peer_var *peers_;
72 #include /**/ "ace/post.h"
73 #endif /* TAO_RTEC_PERF_CONTROL_H */