=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / tests / ORB_Local_Config / lib / Service_Configuration_Per_ORB.h
blob16e74fd89f31cc0241e78a8ffd519ceb576928e0
1 #ifndef SERVICE_CONFIGURATION_PER_ORB_H
2 # define SERVICE_CONFIGURATION_PER_ORB_H
5 #include "ace/Trace.h"
6 #include "ace/Service_Config.h"
8 /// We need this wrapper to "break" the encapsulation and test
9 /// the internals of the class. The class also does a complete
10 /// teardown on the service repository used. So, do not expect
11 /// to find *any*, even static services in the global repo afer
12 /// this class desructor is done.
14 class ACE_Service_Gestalt_Test : public ACE_Service_Gestalt
16 public:
17 ACE_Service_Gestalt_Test (size_t n)
18 : ACE_Service_Gestalt (n)
19 , teardown_ (false)
23 ACE_Service_Gestalt_Test ()
24 : ACE_Service_Gestalt (ACE_Service_Repository::DEFAULT_SIZE)
25 , teardown_ (true)
29 ~ACE_Service_Gestalt_Test ()
31 if (this->teardown_)
33 // Close and possibly delete all service instances in the Service
34 // Repository.
35 ACE_Service_Config::fini_svcs ();
37 // Unlink all services in the Service Repository and close/delete
38 // all ACE library services and singletons.
39 ACE_Service_Config::close ();
43 size_t command_line_directives_count () const
45 return this->svc_queue_->size ();
48 size_t service_config_files_count () const
50 return this->svc_conf_file_queue_->size ();
53 size_t services_count () const
55 return this->repo_->current_size ();
58 bool has_same_service_repository (ACE_Service_Gestalt_Test const * psg)
60 return (this->repo_ == psg->repo_);
63 private:
64 bool teardown_;
68 #endif /* SERVICE_CONFIGURATION_PER_ORB_H */