=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / performance-tests / CSD_Strategy / TestInf / ServantList_T.h
blob61ff56473b86983e6f34ea23b8a53e84b3105ca5
1 #ifndef SERVANTLIST_T_H
2 #define SERVANTLIST_T_H
4 #include "tao/PortableServer/PortableServer.h"
5 #include "tao/PortableServer/Servant_Base.h"
6 #include "ace/Vector_T.h"
9 // The T type is a concrete servant type.
10 template <class T>
11 class ServantList
13 public:
14 typedef typename T::_stub_type T_stub;
15 typedef typename T::_stub_ptr_type T_stub_ptr;
16 typedef typename T::_stub_var_type T_stub_var;
18 ServantList();
19 ~ServantList();
21 /// Activate servant and output ior to a file.
22 void create_and_activate(unsigned num_servants,
23 CORBA::ORB_ptr orb,
24 PortableServer::POA_ptr poa,
25 const ACE_TCHAR* ior_fname_prefix);
27 /// Activate servant and not output ior to a file.
28 void create_and_activate(unsigned num_servants,
29 PortableServer::POA_ptr poa);
32 /// Get a (copy) of one of the object references (for a specific servant).
33 T_stub_ptr objref(unsigned index);
35 /// This doesn't return a copy.
36 T* servant(unsigned index);
39 private:
40 struct ServantRecord
42 T* servant_;
43 PortableServer::ServantBase_var safe_servant_;
44 T_stub_var obj_;
47 typedef ACE_Vector<ServantRecord> ServantRecordVector;
49 ServantRecordVector servant_records_;
52 #include "ServantList_T.cpp"
54 #endif /* SERVANTLIST_T_H */