command_factory_t.cpp
来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C++ 代码 · 共 54 行
CPP
54 行
// Command_Factory_T.cpp,v 1.5 2003/08/24 13:50:14 jwillemsen Exp
#ifndef TAO_Notify_Tests_COMMAND_FACTORY_T_CPP
#define TAO_Notify_Tests_COMMAND_FACTORY_T_CPP
#include "Command_Factory_T.h"
ACE_RCSID(Notify, TAO_Command_Factory_T, "Command_Factory_T.cpp,v 1.5 2003/08/24 13:50:14 jwillemsen Exp")
#include "ace/Dynamic_Service.h"
#include "tao/debug.h"
#include "Command_Builder.h"
#include "Name.h"
template <class COMMAND>
TAO_Notify_Tests_Command_Factory_T<COMMAND>::TAO_Notify_Tests_Command_Factory_T (void)
{
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "Creating command factory for %s\n", COMMAND::name()));
}
template <class COMMAND>
TAO_Notify_Tests_Command_Factory_T<COMMAND>::~TAO_Notify_Tests_Command_Factory_T ()
{
}
template <class COMMAND> int
TAO_Notify_Tests_Command_Factory_T<COMMAND>::init (int /*argc*/, char/*argv*/ *[])
{
/// register with Command builder
TAO_Notify_Tests_Command_Builder* cmd_builder =
ACE_Dynamic_Service<TAO_Notify_Tests_Command_Builder>::instance (TAO_Notify_Tests_Name::command_builder);
if (cmd_builder)
cmd_builder->_register (COMMAND::name(), this);
else
ACE_DEBUG ((LM_DEBUG, "Could not register command builder %s\n", COMMAND::name()));
return 0;
}
template <class COMMAND> int
TAO_Notify_Tests_Command_Factory_T<COMMAND>::fini (void)
{
return 0;
}
template <class COMMAND> TAO_Notify_Tests_Command*
TAO_Notify_Tests_Command_Factory_T<COMMAND>::create (void)
{
return new COMMAND ();
}
#endif /* TAO_Notify_Tests_COMMAND_FACTORY_T_CPP */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?