Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / XtResource / XtResource_Factory.cpp
blob5f24aa4e3d192eaca0f60fed9eb3a3ef4cf06142
1 #include "tao/XtResource/XtResource_Factory.h"
2 #include "tao/debug.h"
3 #include "ace/XtReactor/XtReactor.h"
5 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
7 namespace TAO
9 XtResource_Factory::XtResource_Factory (XtAppContext p_context):
10 reactor_impl_(nullptr),
11 context_(p_context)
15 ACE_Reactor_Impl *
16 XtResource_Factory::reactor_impl ()
18 // synchronized by external locks
19 if (!this->context_)
21 TAOLIB_ERROR ((LM_ERROR,
22 ACE_TEXT("TAO (%P|%t) - XtAppContext is undefined.")
23 ACE_TEXT(" Cannot create ACE_XtReactor\n")));
24 return nullptr; // Private and undefined;
27 if (!this->reactor_impl_)
29 ACE_NEW_RETURN (this->reactor_impl_,
30 ACE_XtReactor (this->context_),
31 nullptr);
33 if (TAO_debug_level > 0)
34 TAOLIB_DEBUG ((LM_DEBUG,
35 "TAO (%P|%t) - ACE_XtReactor created\n"));
38 return this->reactor_impl_;
42 TAO_END_VERSIONED_NAMESPACE_DECL