#include <LifespanStrategyPersistentFactoryImpl.h>
Inheritance diagram for TAO::Portable_Server::LifespanStrategyPersistentFactoryImpl:


Public Member Functions | |
| virtual LifespanStrategy * | create (::PortableServer::LifespanPolicyValue value) |
| Create a new strategy. | |
| virtual void | destroy (LifespanStrategy *strategy) |
| Cleanup the given strategy instance. | |
|
|
Create a new strategy.
Implements TAO::Portable_Server::LifespanStrategyFactory. Definition at line 18 of file LifespanStrategyPersistentFactoryImpl.cpp. References ACE_ERROR, ACE_NEW_RETURN, and LM_ERROR.
00020 {
00021 LifespanStrategy* strategy = 0;
00022
00023 switch (value)
00024 {
00025 case ::PortableServer::PERSISTENT :
00026 {
00027 ACE_NEW_RETURN (strategy, LifespanStrategyPersistent, 0);
00028 break;
00029 }
00030 case ::PortableServer::TRANSIENT :
00031 {
00032 ACE_ERROR ((LM_ERROR, "Incorrect type in LifespanStrategyPersistentFactoryImpl"));
00033 break;
00034 }
00035 }
00036
00037 return strategy;
00038 }
|
|
|
Cleanup the given strategy instance.
Implements TAO::Portable_Server::LifespanStrategyFactory. Definition at line 41 of file LifespanStrategyPersistentFactoryImpl.cpp. References TAO::Portable_Server::LifespanStrategy::strategy_cleanup().
00042 {
00043 strategy->strategy_cleanup ();
00044
00045 delete strategy;
00046 }
|
1.3.6