PolicyS_T.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // PolicyS_T.inl,v 1.10 2005/11/26 03:01:29 ossama Exp
00004 
00005 // ****  Code generated by the The ACE ORB (TAO) IDL Compiler ****
00006 // TAO and the TAO IDL Compiler have been developed by:
00007 //       Center for Distributed Object Computing
00008 //       Washington University
00009 //       St. Louis, MO
00010 //       USA
00011 //       http://www.cs.wustl.edu/~schmidt/doc-center.html
00012 // and
00013 //       Distributed Object Computing Laboratory
00014 //       University of California at Irvine
00015 //       Irvine, CA
00016 //       USA
00017 //       http://doc.ece.uci.edu/
00018 // and
00019 //       Institute for Software Integrated Systems
00020 //       Vanderbilt University
00021 //       Nashville, TN
00022 //       USA
00023 //       http://www.isis.vanderbilt.edu/
00024 //
00025 // Information about TAO is available at:
00026 //     http://www.cs.wustl.edu/~schmidt/TAO.html
00027 
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 // TAO_IDL - Generated from
00032 // be\be_visitor_interface/tie_si.cpp:96
00033 
00034 template <class T> ACE_INLINE
00035 POA_CORBA::Policy_tie<T>::Policy_tie (T &t)
00036         : ptr_ (&t),
00037           poa_ (PortableServer::POA::_nil ()),
00038           rel_ (0)
00039 {}
00040 
00041 template <class T> ACE_INLINE
00042 POA_CORBA::Policy_tie<T>::Policy_tie (T &t, PortableServer::POA_ptr poa)
00043         : ptr_ (&t),
00044           poa_ (PortableServer::POA::_duplicate (poa)),
00045           rel_ (0)
00046 {}
00047 
00048 template <class T> ACE_INLINE
00049 POA_CORBA::Policy_tie<T>::Policy_tie (T *tp, CORBA::Boolean release)
00050         : ptr_ (tp),
00051           poa_ (PortableServer::POA::_nil ()),
00052           rel_ (release)
00053 {}
00054 
00055 template <class T> ACE_INLINE
00056 POA_CORBA::Policy_tie<T>::Policy_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release)
00057         : ptr_ (tp),
00058           poa_ (PortableServer::POA::_duplicate (poa)),
00059           rel_ (release)
00060 {}
00061 
00062 template <class T> ACE_INLINE
00063 POA_CORBA::Policy_tie<T>::~Policy_tie (void)
00064 {
00065   if (this->rel_)
00066     {
00067       delete this->ptr_;
00068     }
00069 }
00070 
00071 template <class T> ACE_INLINE T *
00072 POA_CORBA::Policy_tie<T>::_tied_object (void)
00073 {
00074   return this->ptr_;
00075 }
00076 
00077 template <class T> ACE_INLINE void
00078 POA_CORBA::Policy_tie<T>::_tied_object (T &obj)
00079 {
00080   if (this->rel_)
00081     {
00082       delete this->ptr_;
00083     }
00084   
00085   this->ptr_ = &obj;
00086   this->rel_ = 0;
00087 }
00088 
00089 template <class T> ACE_INLINE void
00090 POA_CORBA::Policy_tie<T>::_tied_object (T *obj, CORBA::Boolean release)
00091 {
00092   if (this->rel_)
00093     {
00094       delete this->ptr_;
00095     }
00096   
00097   this->ptr_ = obj;
00098   this->rel_ = release;
00099 }
00100 
00101 template <class T> ACE_INLINE CORBA::Boolean
00102 POA_CORBA::Policy_tie<T>::_is_owner (void)
00103 {
00104   return this->rel_;
00105 }
00106 
00107 template <class T> ACE_INLINE void
00108 POA_CORBA::Policy_tie<T>::_is_owner (CORBA::Boolean b)
00109 {
00110   this->rel_ = b;
00111 }
00112 
00113 template <class T> ACE_INLINE PortableServer::POA_ptr
00114 POA_CORBA::Policy_tie<T>::_default_POA (ACE_ENV_SINGLE_ARG_DECL)
00115 {
00116   if (!CORBA::is_nil (this->poa_.in ()))
00117     {
00118       return PortableServer::POA::_duplicate (this->poa_.in ());
00119     }
00120   
00121   return this->Policy::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
00122 }
00123 
00124 // TAO_IDL - Generated from 
00125 // be\be_visitor_operation/tie_si.cpp:68
00126 
00127 template <class T> ACE_INLINE
00128 CORBA::PolicyType POA_CORBA::Policy_tie<T>::policy_type  (
00129     ACE_ENV_SINGLE_ARG_DECL
00130   )
00131   ACE_THROW_SPEC ((
00132     CORBA::SystemException
00133   ))
00134 {
00135   return this->ptr_->policy_type (
00136     ACE_ENV_SINGLE_ARG_PARAMETER
00137   );
00138 }
00139 
00140 // TAO_IDL - Generated from 
00141 // be\be_visitor_operation/tie_si.cpp:68
00142 
00143 template <class T> ACE_INLINE
00144 ::CORBA::Policy_ptr POA_CORBA::Policy_tie<T>::copy  (
00145     ACE_ENV_SINGLE_ARG_DECL
00146   )
00147   ACE_THROW_SPEC ((
00148     CORBA::SystemException
00149   ))
00150 {
00151   return this->ptr_->copy (
00152     ACE_ENV_SINGLE_ARG_PARAMETER
00153   );
00154 }
00155 
00156 // TAO_IDL - Generated from 
00157 // be\be_visitor_operation/tie_si.cpp:68
00158 
00159 template <class T> ACE_INLINE
00160 void POA_CORBA::Policy_tie<T>::destroy  (
00161     ACE_ENV_SINGLE_ARG_DECL
00162   )
00163   ACE_THROW_SPEC ((
00164     CORBA::SystemException
00165   ))
00166 {
00167   this->ptr_->destroy (
00168     ACE_ENV_SINGLE_ARG_PARAMETER
00169   );
00170 }
00171 
00172 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 12:40:40 2006 for TAO_PortableServer by doxygen 1.3.6