#include <IdAssignmentStrategyFactoryImpl.h>
Inheritance diagram for TAO::Portable_Server::IdAssignmentStrategyFactoryImpl:
Public Member Functions | |
virtual IdAssignmentStrategy * | create (::PortableServer::IdAssignmentPolicyValue value) |
Create a new servant retention strategy. | |
virtual void | destroy (IdAssignmentStrategy *strategy) |
Definition at line 32 of file IdAssignmentStrategyFactoryImpl.h.
IdAssignmentStrategy * TAO::Portable_Server::IdAssignmentStrategyFactoryImpl::create | ( | ::PortableServer::IdAssignmentPolicyValue | value | ) | [virtual] |
Create a new servant retention strategy.
Implements TAO::Portable_Server::IdAssignmentStrategyFactory.
Definition at line 18 of file IdAssignmentStrategyFactoryImpl.cpp.
References ACE_ERROR, ACE_TEXT(), and LM_ERROR.
00020 { 00021 IdAssignmentStrategy *strategy = 0; 00022 const char *strategy_name = 0; 00023 00024 switch (value) 00025 { 00026 case ::PortableServer::SYSTEM_ID : 00027 { 00028 strategy_name = "IdAssignmentStrategySystem"; 00029 break; 00030 } 00031 case ::PortableServer::USER_ID : 00032 { 00033 strategy_name = "IdAssignmentStrategyUser"; 00034 break; 00035 } 00036 } 00037 00038 strategy = 00039 ACE_Dynamic_Service <IdAssignmentStrategy>::instance (strategy_name); 00040 00041 if (strategy == 0) 00042 ACE_ERROR ((LM_ERROR, 00043 ACE_TEXT ("(%P|%t) ERROR, Unable to get %s\n"), 00044 strategy_name)); 00045 00046 return strategy; 00047 }
void TAO::Portable_Server::IdAssignmentStrategyFactoryImpl::destroy | ( | IdAssignmentStrategy * | strategy | ) | [virtual] |
Implements TAO::Portable_Server::IdAssignmentStrategyFactory.
Definition at line 50 of file IdAssignmentStrategyFactoryImpl.cpp.