Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / ace / Dynamic_Service_Dependency.cpp
blobc94e7df35fe8829ca74084ec75e0abcaab0bedd1
1 #include "ace/ACE.h"
2 #include "ace/DLL_Manager.h"
3 #include "ace/Dynamic_Service_Dependency.h"
4 #include "ace/Service_Config.h"
5 #include "ace/Log_Category.h"
7 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
9 ACE_Dynamic_Service_Dependency::ACE_Dynamic_Service_Dependency (const ACE_TCHAR *principal)
11 this->init (ACE_Service_Config::current (), principal);
14 ACE_Dynamic_Service_Dependency::ACE_Dynamic_Service_Dependency (const ACE_Service_Gestalt *cfg,
15 const ACE_TCHAR *principal)
17 this->init (cfg, principal);
21 ACE_Dynamic_Service_Dependency::~ACE_Dynamic_Service_Dependency ()
23 if (ACE::debug ())
24 ACELIB_DEBUG ((LM_DEBUG,
25 ACE_TEXT ("(%P|%t) DSD, this=%@ - destroying\n"),
26 this));
29 void
30 ACE_Dynamic_Service_Dependency::init (const ACE_Service_Gestalt *cfg,
31 const ACE_TCHAR *principal)
33 const ACE_Service_Type* st =
34 ACE_Dynamic_Service_Base::find_i (cfg, principal,false);
35 if (ACE::debug ())
37 ACELIB_DEBUG ((LM_DEBUG,
38 ACE_TEXT ("(%P|%t) DSD, this=%@ - creating dependency on "), this));
39 st->dump ();
41 this->tracker_ = st->dll ();
45 ACE_END_VERSIONED_NAMESPACE_DECL