Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / tests / Notify / lib / Command_Factory_T.cpp
blobba80b5e438247111112d03c75685e96945d776e2
1 #ifndef TAO_Notify_Tests_COMMAND_FACTORY_T_CPP
2 #define TAO_Notify_Tests_COMMAND_FACTORY_T_CPP
4 #include "Command_Factory_T.h"
7 #include "ace/Dynamic_Service.h"
8 #include "tao/debug.h"
9 #include "Command_Builder.h"
10 #include "Name.h"
12 template <class COMMAND>
13 TAO_Notify_Tests_Command_Factory_T<COMMAND>::TAO_Notify_Tests_Command_Factory_T ()
15 if (TAO_debug_level > 0)
16 ACE_DEBUG ((LM_DEBUG, "Creating command factory for %s\n", COMMAND::name()));
19 template <class COMMAND>
20 TAO_Notify_Tests_Command_Factory_T<COMMAND>::~TAO_Notify_Tests_Command_Factory_T ()
24 template <class COMMAND> int
25 TAO_Notify_Tests_Command_Factory_T<COMMAND>::init (int /*argc*/, ACE_TCHAR/*argv*/ *[])
27 /// register with Command builder
28 TAO_Notify_Tests_Command_Builder* cmd_builder =
29 ACE_Dynamic_Service<TAO_Notify_Tests_Command_Builder>::instance (TAO_Notify_Tests_Name::command_builder);
31 if (cmd_builder)
32 cmd_builder->_register (COMMAND::name(), this);
33 else
34 ACE_DEBUG ((LM_DEBUG, "Could not register command builder %s\n", COMMAND::name()));
35 return 0;
38 template <class COMMAND> int
39 TAO_Notify_Tests_Command_Factory_T<COMMAND>::fini ()
41 return 0;
44 template <class COMMAND> TAO_Notify_Tests_Command*
45 TAO_Notify_Tests_Command_Factory_T<COMMAND>::create ()
47 return new COMMAND ();
50 #endif /* TAO_Notify_Tests_COMMAND_FACTORY_T_CPP */