Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

CORBA::Policy Interface Reference

#include <PolicyC.h>

Inheritance diagram for CORBA::Policy:

Inheritance graph
[legend]
Collaboration diagram for CORBA::Policy:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Policy_ptr _ptr_type
typedef Policy_var _var_type

Public Methods

Policy copy ()
void destroy ()
virtual CORBA::PolicyType policy_type (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw ( CORBA::SystemException )
virtual::CORBA::Policy_ptr copy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw ( CORBA::SystemException )
virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw ( CORBA::SystemException )
virtual CORBA::Boolean _is_a (const CORBA::Char *type_id ACE_ENV_ARG_DECL_WITH_DEFAULTS)
virtual void * _tao_QueryInterface (ptr_arith_t type)
 Downcasting this object pointer to some other derived class. This QueryInterface stuff only work for local object. More...

virtual const char * _interface_repository_id (void) const
 The repository ID for the most derived class, this is an implementation method and does no remote invocations! More...

virtual CORBA::Boolean _tao_encode (TAO_OutputCDR &)
 Encodes the object implementing this method into a CDR stream. Returns true on success and false on failure. More...

virtual CORBA::Boolean _tao_decode (TAO_InputCDR &)
 Decodes the object implementing this method from a CDR stream. Returns true on success and false on failure. More...

virtual TAO_Cached_Policy_Type _tao_cached_type (void) const
virtual TAO_Policy_Scope _tao_scope (void) const

Static Public Methods

Policy_ptr _duplicate (Policy_ptr obj)
Policy_ptr _narrow (CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS)
Policy_ptr _unchecked_narrow (CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS)
Policy_ptr _nil (void)
 Return a NULL object. More...

void _tao_any_destructor (void *)
 Used in the implementation of CORBA::Any. More...


Public Attributes

readonly attribute PolicyType policy_type

Static Public Attributes

int _tao_class_id = 0
 Address of this variable used in _unchecked_narrow(). More...


Protected Methods

 Policy (int collocated=0)
virtual void CORBA_Policy_setup_collocation (int collocated)
 Policy (TAO_Stub *objref, CORBA::Boolean _tao_collocated=0, TAO_Abstract_ServantBase *servant=0)
virtual ~Policy (void)

Private Methods

 Policy (const Policy &)
void operator= (const Policy &)

Private Attributes

_TAO_Policy_Proxy_Brokerthe_TAO_Policy_Proxy_Broker_

Friends

class _TAO_Policy_Remote_Proxy_Impl
class _TAO_Policy_ThruPOA_Proxy_Impl
class _TAO_Policy_Direct_Proxy_Impl

Member Typedef Documentation

typedef Policy_ptr CORBA::Policy::_ptr_type
 

Reimplemented from CORBA_Object.

Implemented in CORBA::ConstructionPolicy.

Definition at line 364 of file PolicyC.h.

typedef Policy_var CORBA::Policy::_var_type
 

Reimplemented from CORBA_Object.

Implemented in CORBA::ConstructionPolicy.

Definition at line 365 of file PolicyC.h.


Constructor & Destructor Documentation

CORBA::Policy::Policy int    collocated = 0 [protected]
 

Definition at line 1555 of file PolicyC.cpp.

References CORBA_Policy_setup_collocation.

Referenced by _tao_any_destructor, and _tao_QueryInterface.

01556 {
01557   this->CORBA_Policy_setup_collocation (collocated);
01558 }

ACE_INLINE CORBA::Policy::Policy TAO_Stub   objref,
CORBA::Boolean    _tao_collocated = 0,
TAO_Abstract_ServantBase   servant = 0
[protected]
 

Definition at line 211 of file PolicyC.i.

References CORBA_Policy_setup_collocation.

00216   : CORBA_Object (objref, _tao_collocated, servant)
00217 {
00218   this->CORBA_Policy_setup_collocation (_tao_collocated);
00219 }

CORBA::Policy::~Policy void    [protected, virtual]
 

Definition at line 1560 of file PolicyC.cpp.

01561 {}

CORBA::Policy::Policy const Policy &    [private]
 


Member Function Documentation

CORBA::Policy_ptr CORBA::Policy::_duplicate Policy_ptr    obj [static]
 

Definition at line 1662 of file PolicyC.cpp.

References CORBA_Object::_add_ref, CORBA::is_nil, and CORBA::Policy_ptr.

Referenced by TAO_Policy_Set::get_cached_policy, TAO_Policy_Set::get_policy_by_index, TAO_Policy_Set::get_policy_overrides, operator<<=, TAO_Policy_Set::set_policy_overrides, and tao_CORBA_Policy_duplicate.

01663 {
01664   if (!CORBA::is_nil (obj))
01665     obj->_add_ref ();
01666   return obj;
01667 }

const char * CORBA::Policy::_interface_repository_id void    const [virtual]
 

The repository ID for the most derived class, this is an implementation method and does no remote invocations!

Reimplemented from CORBA_Object.

Implemented in CORBA::ConstructionPolicy.

Definition at line 1695 of file PolicyC.cpp.

01696 {
01697   return "IDL:omg.org/CORBA/Policy:1.0";
01698 }

virtual CORBA::Boolean CORBA::Policy::_is_a const CORBA::Char *type_id    ACE_ENV_ARG_DECL_WITH_DEFAULTS [virtual]
 

Implemented in CORBA::ConstructionPolicy.

CORBA::Policy_ptr CORBA::Policy::_narrow CORBA::Object_ptr obj    ACE_ENV_ARG_DECL_WITH_DEFAULTS [static]
 

Implemented in CORBA::ConstructionPolicy.

Definition at line 1580 of file PolicyC.cpp.

References ACE_CHECK_RETURN, ACE_ENV_ARG_DECL, ACE_ENV_ARG_PARAMETER, and CORBA::is_nil.

Referenced by tao_CORBA_Policy_narrow.

01584 {
01585   if (CORBA::is_nil (obj))
01586     return Policy::_nil ();
01587   if (! obj->_is_local ())
01588     {
01589       CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CORBA/Policy:1.0" ACE_ENV_ARG_PARAMETER);
01590       ACE_CHECK_RETURN (Policy::_nil ());
01591       if (is_a == 0)
01592         return Policy::_nil ();
01593     }
01594   return Policy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
01595 }

Policy_ptr CORBA::Policy::_nil void    [inline, static]
 

Return a NULL object.

Reimplemented from CORBA_Object.

Implemented in CORBA::ConstructionPolicy.

Definition at line 383 of file PolicyC.h.

References CORBA::Policy_ptr.

Referenced by TAO_PolicyFactory_Registry::_create_policy, CORBA_ORB::_create_policy, CORBA_Object::_get_client_policy, CORBA_LocalObject::_get_client_policy, CORBA_Object::_get_policy, CORBA_LocalObject::_get_policy, CORBA_Object::_set_policy_overrides, CORBA_LocalObject::_set_policy_overrides, TAO_Policy_Set::cleanup_i, CORBA::_TAO_Policy_Remote_Proxy_Impl::copy, TAO_Buffering_Constraint_Policy::copy, TAO_Buffering_Constraint_Policy::create, TAO_PolicyFactory_Registry::create_policy, CORBA_ORB::create_policy, TAO_Policy_Set::get_cached_const_policy, TAO_Policy_Set::get_cached_policy, TAO_Stub::get_client_policy, CORBA::_TAO_DomainManager_Remote_Proxy_Impl::get_domain_policy, TAO_Stub::get_policy, TAO_ClientRequestInfo::get_request_policy, operator>>=, and tao_CORBA_Policy_nil.

00384       {
00385         return (Policy_ptr)0;
00386       }

void CORBA::Policy::_tao_any_destructor void *    [static]
 

Used in the implementation of CORBA::Any.

Reimplemented from CORBA_Object.

Implemented in CORBA::ConstructionPolicy.

Definition at line 1574 of file PolicyC.cpp.

References Policy, and CORBA::release.

Referenced by operator<<=, and operator>>=.

01575 {
01576   Policy *tmp = ACE_static_cast (Policy*, _tao_void_pointer);
01577   CORBA::release (tmp);
01578 }

TAO_Cached_Policy_Type CORBA::Policy::_tao_cached_type void    const [virtual]
 

Implemented in TAO_Buffering_Constraint_Policy.

Definition at line 1714 of file PolicyC.cpp.

References TAO_CACHED_POLICY_UNCACHED.

01715 {
01716   return TAO_CACHED_POLICY_UNCACHED;
01717 }

CORBA::Boolean CORBA::Policy::_tao_decode TAO_InputCDR   [virtual]
 

Decodes the object implementing this method from a CDR stream. Returns true on success and false on failure.

Implements TAO_Encodable.

Definition at line 1708 of file PolicyC.cpp.

01709 {
01710   return 0;
01711 }

CORBA::Boolean CORBA::Policy::_tao_encode TAO_OutputCDR   [virtual]
 

Encodes the object implementing this method into a CDR stream. Returns true on success and false on failure.

Implements TAO_Encodable.

Definition at line 1702 of file PolicyC.cpp.

01703 {
01704   return 0;
01705 }

void * CORBA::Policy::_tao_QueryInterface ptr_arith_t    type [virtual]
 

Downcasting this object pointer to some other derived class. This QueryInterface stuff only work for local object.

Reimplemented from CORBA_Object.

Implemented in CORBA::ConstructionPolicy.

Definition at line 1679 of file PolicyC.cpp.

References CORBA_Object::_add_ref, _tao_class_id, ACE_NESTED_CLASS, Policy, and ptr_arith_t.

01680 {
01681   void *retv = 0;
01682   if (type == ACE_reinterpret_cast
01683     (ptr_arith_t,
01684       &ACE_NESTED_CLASS (::CORBA, Policy)::_tao_class_id))
01685     retv = ACE_reinterpret_cast (void*, this);
01686   else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
01687     retv = ACE_reinterpret_cast (void *,
01688       ACE_static_cast (CORBA::Object_ptr, this));
01689     
01690   if (retv)
01691     this->_add_ref ();
01692   return retv;
01693 }

TAO_Policy_Scope CORBA::Policy::_tao_scope void    const [virtual]
 

Definition at line 1720 of file PolicyC.cpp.

References TAO_POLICY_DEFAULT_SCOPE.

01721 {
01722   return TAO_POLICY_DEFAULT_SCOPE;
01723 }

CORBA::Policy_ptr CORBA::Policy::_unchecked_narrow CORBA::Object_ptr obj    ACE_ENV_ARG_DECL_WITH_DEFAULTS [static]
 

Implemented in CORBA::ConstructionPolicy.

Definition at line 1598 of file PolicyC.cpp.

References TAO_Stub::_incr_refcnt, ACE_ENV_ARG_DECL_NOT_USED, ACE_NEW_RETURN, CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer, CORBA::is_nil, CORBA::Policy_ptr, ptr_arith_t, and TAO_Stub::servant_orb_var.

Referenced by operator>>.

01602 {
01603   if (CORBA::is_nil (obj))
01604     return Policy::_nil ();
01605   if (! obj->_is_local ())
01606     {
01607       TAO_Stub* stub = obj->_stubobj ();
01608       if (stub)
01609         stub->_incr_refcnt ();
01610       Policy_ptr default_proxy = Policy::_nil ();
01611 
01612       if (
01613           !CORBA::is_nil (stub->servant_orb_var ().ptr ()) &&
01614           stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects () &&
01615           obj->_is_collocated () &&
01616           CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer != 0
01617         )
01618         {
01619           ACE_NEW_RETURN (
01620               default_proxy,
01621               ::CORBA::Policy (
01622                   stub,
01623                   1,
01624                   obj->_servant ()
01625                 ),
01626               Policy::_nil ()
01627             );
01628         }
01629       
01630       if (CORBA::is_nil (default_proxy))
01631         {
01632           ACE_NEW_RETURN (
01633               default_proxy,
01634               ::CORBA::Policy (
01635                   stub,
01636                   0,
01637                   obj->_servant ()
01638                 ),
01639               Policy::_nil ()
01640             );
01641         }
01642       
01643       return default_proxy;
01644     }
01645   else 
01646     return
01647       ACE_reinterpret_cast
01648         (
01649           Policy_ptr,
01650             obj->_tao_QueryInterface
01651               (
01652                 ACE_reinterpret_cast
01653                   (
01654                     ptr_arith_t,
01655                     &Policy::_tao_class_id
01656                   )
01657               )
01658         );
01659 }

CORBA::Policy_ptr CORBA::Policy::copy ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS    throw ( CORBA::SystemException )
 

Implemented in TAO_Buffering_Constraint_Policy.

Definition at line 1743 of file PolicyC.cpp.

References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, and ACE_ENV_SINGLE_ARG_DECL.

01750 {
01751   _TAO_Policy_Proxy_Impl &proxy = 
01752     this->the_TAO_Policy_Proxy_Broker_->select_proxy (this ACE_ENV_ARG_PARAMETER);
01753   ACE_CHECK_RETURN (0);
01754   
01755   return proxy.copy (
01756       this ACE_ENV_ARG_PARAMETER
01757     );
01758 }

Policy CORBA::Policy::copy  
 

void CORBA::Policy::CORBA_Policy_setup_collocation int    collocated [protected, virtual]
 

Definition at line 1564 of file PolicyC.cpp.

References the_TAO_Policy_Proxy_Broker_.

Referenced by CORBA::ConstructionPolicy::CORBA_ConstructionPolicy_setup_collocation, and Policy.

01565 {
01566   if (collocated)
01567     this->the_TAO_Policy_Proxy_Broker_ =
01568       ::CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer (this);
01569   else
01570     this->the_TAO_Policy_Proxy_Broker_ =
01571       ::CORBA::_TAO_Policy_Remote_Proxy_Broker::the_TAO_Policy_Remote_Proxy_Broker ();
01572 }

void CORBA::Policy::destroy ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS    throw ( CORBA::SystemException ) [virtual]
 

Implemented in TAO_Buffering_Constraint_Policy.

Definition at line 1760 of file PolicyC.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, and ACE_ENV_SINGLE_ARG_DECL.

01767 {
01768   _TAO_Policy_Proxy_Impl &proxy = 
01769     this->the_TAO_Policy_Proxy_Broker_->select_proxy (this ACE_ENV_ARG_PARAMETER);
01770   ACE_CHECK;
01771   
01772   proxy.destroy (
01773       this ACE_ENV_ARG_PARAMETER
01774     );
01775 }

void CORBA::Policy::destroy  
 

void CORBA::Policy::operator= const Policy &    [private]
 

virtual CORBA::PolicyType CORBA::Policy::policy_type ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS    throw ( CORBA::SystemException ) [virtual]
 

Implemented in TAO_Buffering_Constraint_Policy.


Friends And Related Function Documentation

friend class _TAO_Policy_Direct_Proxy_Impl [friend]
 

Definition at line 448 of file PolicyC.h.

friend class _TAO_Policy_Remote_Proxy_Impl [friend]
 

Definition at line 446 of file PolicyC.h.

friend class _TAO_Policy_ThruPOA_Proxy_Impl [friend]
 

Definition at line 447 of file PolicyC.h.


Member Data Documentation

int CORBA::Policy::_tao_class_id = 0 [static]
 

Address of this variable used in _unchecked_narrow().

Reimplemented from CORBA_Object.

Implemented in CORBA::ConstructionPolicy.

Definition at line 538 of file PolicyC.cpp.

Referenced by _tao_QueryInterface.

CORBA::PolicyType CORBA::Policy::policy_type
 

Definition at line 1726 of file PolicyC.cpp.

01733 {
01734   _TAO_Policy_Proxy_Impl &proxy = 
01735     this->the_TAO_Policy_Proxy_Broker_->select_proxy (this ACE_ENV_ARG_PARAMETER);
01736   ACE_CHECK_RETURN (0);
01737   
01738   return proxy.policy_type (
01739       this ACE_ENV_ARG_PARAMETER
01740     );
01741 }

_TAO_Policy_Proxy_Broker* CORBA::Policy::the_TAO_Policy_Proxy_Broker_ [private]
 

Definition at line 431 of file PolicyC.h.

Referenced by CORBA_Policy_setup_collocation.


The documentation for this interface was generated from the following files:
Generated on Mon Jun 16 15:54:01 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002