TAO::Portable_Server::LifespanStrategyTransientFactoryImpl Class Reference

#include <LifespanStrategyTransientFactoryImpl.h>

Inheritance diagram for TAO::Portable_Server::LifespanStrategyTransientFactoryImpl:

Inheritance graph
[legend]
Collaboration diagram for TAO::Portable_Server::LifespanStrategyTransientFactoryImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual LifespanStrategycreate (::PortableServer::LifespanPolicyValue value)
 Create a new strategy.
virtual void destroy (LifespanStrategy *strategy)
 Cleanup the given strategy instance.

Detailed Description

Definition at line 33 of file LifespanStrategyTransientFactoryImpl.h.


Member Function Documentation

LifespanStrategy * TAO::Portable_Server::LifespanStrategyTransientFactoryImpl::create ( ::PortableServer::LifespanPolicyValue  value  )  [virtual]

Create a new strategy.

Implements TAO::Portable_Server::LifespanStrategyFactory.

Definition at line 18 of file LifespanStrategyTransientFactoryImpl.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_ERROR ((LM_ERROR, "Incorrect type in LifespanStrategyTransientFactoryImpl"));
00028           break;
00029         }
00030         case ::PortableServer::TRANSIENT :
00031         {
00032           ACE_NEW_RETURN (strategy, LifespanStrategyTransient, 0);
00033           break;
00034         }
00035       }
00036 
00037       return strategy;
00038     }

void TAO::Portable_Server::LifespanStrategyTransientFactoryImpl::destroy ( LifespanStrategy strategy  )  [virtual]

Cleanup the given strategy instance.

Implements TAO::Portable_Server::LifespanStrategyFactory.

Definition at line 41 of file LifespanStrategyTransientFactoryImpl.cpp.

References TAO::Portable_Server::LifespanStrategy::strategy_cleanup().

00042     {
00043       strategy->strategy_cleanup ();
00044 
00045       delete strategy;
00046     }


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:41:44 2010 for TAO_PortableServer by  doxygen 1.4.7