TAO_ThreadpoolPolicy Class Reference

RTCORBA::ThreadpoolPolicy implementation. More...

#include <RT_Policy_i.h>

Inheritance diagram for TAO_ThreadpoolPolicy:

Inheritance graph
[legend]
Collaboration diagram for TAO_ThreadpoolPolicy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_ThreadpoolPolicy (RTCORBA::ThreadpoolId id)
 Constructor.
 TAO_ThreadpoolPolicy (const TAO_ThreadpoolPolicy &rhs)
 Copy constructor.
RTCORBA::ThreadpoolId threadpool (void)
CORBA::PolicyType policy_type (void)
CORBA::Policy_ptr copy (void)
void destroy (void)
TAO_Cached_Policy_Type _tao_cached_type (void) const
TAO_Policy_Scope _tao_scope (void) const

Static Public Member Functions

static CORBA::Policy_ptr create (const CORBA::Any &val)

Protected Member Functions

virtual ~TAO_ThreadpoolPolicy (void)

Private Attributes

RTCORBA::ThreadpoolId id_
 Attribute.

Detailed Description

RTCORBA::ThreadpoolPolicy implementation.

This policy controls which threadpool is associated with a POA.

Definition at line 121 of file RT_Policy_i.h.


Constructor & Destructor Documentation

TAO_ThreadpoolPolicy::TAO_ThreadpoolPolicy ( RTCORBA::ThreadpoolId  id  ) 

Constructor.

Definition at line 144 of file RT_Policy_i.cpp.

00145   : ::CORBA::Object ()
00146   , ::CORBA::Policy ()
00147   , RTCORBA::ThreadpoolPolicy ()
00148   , ::CORBA::LocalObject ()
00149   , id_ (id)
00150 {
00151 }

TAO_ThreadpoolPolicy::TAO_ThreadpoolPolicy ( const TAO_ThreadpoolPolicy rhs  ) 

Copy constructor.

Definition at line 153 of file RT_Policy_i.cpp.

00154   : ::CORBA::Object ()
00155   , ::CORBA::Policy ()
00156   , RTCORBA::ThreadpoolPolicy ()
00157   , ::CORBA::LocalObject ()
00158   , id_ (rhs.id_)
00159 {
00160 }

TAO_ThreadpoolPolicy::~TAO_ThreadpoolPolicy ( void   )  [protected, virtual]

Protected destructor to enforce proper memory management of this reference counted object.

Definition at line 162 of file RT_Policy_i.cpp.

00163 {
00164 }


Member Function Documentation

TAO_Cached_Policy_Type TAO_ThreadpoolPolicy::_tao_cached_type ( void   )  const

Definition at line 212 of file RT_Policy_i.cpp.

References TAO_CACHED_POLICY_THREADPOOL.

00213 {
00214   return TAO_CACHED_POLICY_THREADPOOL;
00215 }

TAO_Policy_Scope TAO_ThreadpoolPolicy::_tao_scope ( void   )  const

Definition at line 218 of file RT_Policy_i.cpp.

References TAO_POLICY_ORB_SCOPE, and TAO_POLICY_POA_SCOPE.

00219 {
00220   return static_cast<TAO_Policy_Scope> (TAO_POLICY_ORB_SCOPE |
00221                           TAO_POLICY_POA_SCOPE);
00222 }

CORBA::Policy_ptr TAO_ThreadpoolPolicy::copy ( void   ) 

Definition at line 195 of file RT_Policy_i.cpp.

References ACE_NEW_THROW_EX, CORBA::COMPLETED_NO, and TAO::VMCID.

00196 {
00197   TAO_ThreadpoolPolicy* tmp = 0;
00198   ACE_NEW_THROW_EX (tmp,
00199                     TAO_ThreadpoolPolicy (*this),
00200                     CORBA::NO_MEMORY (TAO::VMCID,
00201                                       CORBA::COMPLETED_NO));
00202 
00203   return tmp;
00204 }

CORBA::Policy_ptr TAO_ThreadpoolPolicy::create ( const CORBA::Any &  val  )  [static]

Helper method for the implementation of CORBA::ORB::create_policy.

Definition at line 167 of file RT_Policy_i.cpp.

References ACE_NEW_THROW_EX, CORBA::BAD_POLICY_VALUE, CORBA::COMPLETED_NO, and TAO::VMCID.

Referenced by TAO_RT_PolicyFactory::create_policy().

00168 {
00169   RTCORBA::ThreadpoolId value;
00170   if ((val >>= value) == 0)
00171     throw ::CORBA::PolicyError (CORBA::BAD_POLICY_VALUE);
00172 
00173   TAO_ThreadpoolPolicy *tmp = 0;
00174   ACE_NEW_THROW_EX (tmp,
00175                     TAO_ThreadpoolPolicy (value),
00176                     CORBA::NO_MEMORY (TAO::VMCID,
00177                                       CORBA::COMPLETED_NO));
00178 
00179   return tmp;
00180 }

void TAO_ThreadpoolPolicy::destroy ( void   ) 

Definition at line 207 of file RT_Policy_i.cpp.

00208 {
00209 }

CORBA::PolicyType TAO_ThreadpoolPolicy::policy_type ( void   ) 

Definition at line 189 of file RT_Policy_i.cpp.

00190 {
00191   return RTCORBA::THREADPOOL_POLICY_TYPE;
00192 }

RTCORBA::ThreadpoolId TAO_ThreadpoolPolicy::threadpool ( void   ) 

Definition at line 183 of file RT_Policy_i.cpp.

References id_.

00184 {
00185   return this->id_;
00186 }


Member Data Documentation

RTCORBA::ThreadpoolId TAO_ThreadpoolPolicy::id_ [private]

Attribute.

Definition at line 159 of file RT_Policy_i.h.

Referenced by threadpool().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:43:04 2010 for TAO_RTCORBA by  doxygen 1.4.7