Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / examples / CSD_Strategy / ThreadPool5 / FooServantList.h
blobe0779ed05fdad9fb2d26e988152fe045a07ef780
1 #ifndef FOOSERVANTLIST_H
2 #define FOOSERVANTLIST_H
4 #include "tao/PortableServer/PortableServer.h"
5 #include "tao/PortableServer/Servant_Base.h"
6 #include "ace/SString.h"
9 class ClientTask;
10 class Foo_i;
12 class FooServantList
14 public:
15 FooServantList(const ACE_TCHAR* prefix,
16 unsigned num_servants,
17 unsigned num_clients,
18 int collocated_test,
19 int servant_to_deactivate,
20 CORBA::ORB_ptr orb);
21 ~FooServantList();
23 void create_and_activate(CORBA::ORB_ptr orb,
24 PortableServer::POA_ptr poa);
26 void client_done();
28 ClientTask* collocated_client () const;
30 void deactivate_servant ();
32 private:
33 Foo_i** servants_;
34 PortableServer::ServantBase_var* safe_servants_;
35 ACE_TString prefix_;
36 unsigned num_servants_;
38 TAO_SYNCH_MUTEX num_clients_lock_;
39 unsigned num_clients_;
40 unsigned init_num_clients_;
41 int collocated_test_;
42 // The servant_to_be_deactivate_ should be an integer greater than -2.
43 // -1 => defatult value, DONT deactivate servant.
44 // 0 => deactivate all servants.
45 // > 0 => the index of the servant to be deactivated.
46 int servant_to_deactivate_;
48 ClientTask* collocated_client_;
50 /// The poa to activate and deactivate servant.
51 PortableServer::POA_var poa_;
53 CORBA::ORB_var orb_;
56 #endif