#include <EC_Lifetime_Utils_T.h>
Collaboration diagram for TAO_EC_Servant_Var< T >:
Public Member Functions | |
TAO_EC_Servant_Var (T *p=0) | |
Constructor. Assumes ownership of p . | |
TAO_EC_Servant_Var (TAO_EC_Servant_Var< T > const &rhs) | |
Copy constructor. Adds reference to rhs . | |
TAO_EC_Servant_Var< T > & | operator= (TAO_EC_Servant_Var< T > const &rhs) |
Assignment operator. Adds reference to rhs . | |
~TAO_EC_Servant_Var () | |
TAO_EC_Servant_Var< T > & | operator= (T *p) |
Assignment operator. Assumes ownership of p . | |
template<class Y> | TAO_EC_Servant_Var (Y *p) |
template<class Y> | TAO_EC_Servant_Var (TAO_EC_Servant_Var< Y > const &rhs) |
template<class Y> TAO_EC_Servant_Var< T > & | operator= (TAO_EC_Servant_Var< Y > const &rhs) |
template<class Y> TAO_EC_Servant_Var< T > & | operator= (Y *p) |
T const * | operator-> () const |
Smart pointer operator-> provides access to the underlying object. | |
T * | operator-> () |
Smart pointer operator-> provides access to the underlying object. | |
T const & | operator * () const |
Dereference the underlying object. | |
T & | operator * () |
Dereference the underlying object. | |
operator void const * () const | |
T * | in () const |
As an IN parameter. | |
T *& | inout () |
As an INOUT parameter. | |
T *& | out () |
As an OUT parameter. | |
T * | _retn () |
Private Attributes | |
T * | ptr_ |
|
Constructor. Assumes ownership of
Definition at line 124 of file EC_Lifetime_Utils_T.inl.
00125 : ptr_(p) 00126 { 00127 } |
|
Copy constructor. Adds reference to
Definition at line 133 of file EC_Lifetime_Utils_T.inl.
|
|
Destructor. Removes a reference from the underlying object, possibly destroying it. Definition at line 179 of file EC_Lifetime_Utils_T.inl.
00180 { 00181 // Unfortunately, there is no throw spec on _remove_ref, so we 00182 // can't assume that it will not throw. If it does, then we are in 00183 // trouble. In any event, we can't let the exception escape our 00184 // destructor. 00185 if (ptr_ != 0) 00186 { 00187 try 00188 { 00189 ptr_->_remove_ref (); 00190 } 00191 catch (...) 00192 { 00193 } 00194 } 00195 } |
|
Template member constructor from a pointer that will implicitly cast to type T. Assumes ownership of Definition at line 200 of file EC_Lifetime_Utils_T.inl.
00201 : ptr_(p) 00202 { 00203 } |
|
Template member copy constructor from a TAO_EC_Servant_Var<Y>, where Y can be implicitly cast to type T. Definition at line 207 of file EC_Lifetime_Utils_T.inl.
|
|
Definition at line 310 of file EC_Lifetime_Utils_T.inl. Referenced by TAO_ECG_Mcast_Gateway::init_address_server().
00311 { 00312 T * rval = ptr_; 00313 ptr_ = 0; 00314 return rval; 00315 } |
|
As an IN parameter.
Definition at line 282 of file EC_Lifetime_Utils_T.inl. Referenced by TAO_ECG_Mcast_Gateway::init_address_server(), TAO_ECG_Mcast_Gateway::init_receiver(), TAO_ECG_Mcast_Gateway::init_sender(), operator!=(), operator==(), and TAO_ECG_Mcast_Gateway::run().
00283 { 00284 return ptr_; 00285 } |
|
As an INOUT parameter.
Definition at line 289 of file EC_Lifetime_Utils_T.inl.
00290 { 00291 return ptr_; 00292 } |
|
Dereference the underlying object.
Definition at line 268 of file EC_Lifetime_Utils_T.inl.
00269 { 00270 return *ptr_; 00271 } |
|
Dereference the underlying object.
Definition at line 261 of file EC_Lifetime_Utils_T.inl.
00262 { 00263 return *ptr_; 00264 } |
|
Return a void pointer to the underlying object. This allows it to be used in conditional code and tested against 0. Definition at line 275 of file EC_Lifetime_Utils_T.inl.
00276 { 00277 return ptr_; 00278 } |
|
Smart pointer operator-> provides access to the underlying object.
Definition at line 254 of file EC_Lifetime_Utils_T.inl.
00255 { 00256 return ptr_; 00257 } |
|
Smart pointer operator-> provides access to the underlying object.
Definition at line 247 of file EC_Lifetime_Utils_T.inl.
00248 { 00249 return ptr_; 00250 } |
|
Template member assignment operator from a pointer to Y, where Y can be implicitly cast to type T. Definition at line 232 of file EC_Lifetime_Utils_T.inl. References TAO_EC_Servant_Var< T >::ptr_.
00233 { 00234 TAO_EC_Servant_Var<T> tmp(p); 00235 00236 // std::swap(tmp.ptr_, ptr_); 00237 T * swap_temp = tmp.ptr_; 00238 tmp.ptr_ = ptr_; 00239 ptr_ = swap_temp; 00240 00241 return *this; 00242 } |
|
Template member assignment operator from a TAO_EC_Servant_Var<Y>, where Y can be implicitly cast to type T. Definition at line 218 of file EC_Lifetime_Utils_T.inl. References TAO_EC_Servant_Var< T >::ptr_.
00219 { 00220 TAO_EC_Servant_Var<T> tmp(rhs); 00221 00222 // std::swap(tmp.ptr_, ptr_); 00223 T * swap_temp = tmp.ptr_; 00224 tmp.ptr_ = ptr_; 00225 ptr_ = swap_temp; 00226 00227 return *this; 00228 } |
|
Assignment operator. Assumes ownership of
Definition at line 165 of file EC_Lifetime_Utils_T.inl. References TAO_EC_Servant_Var< T >::ptr_.
00166 { 00167 TAO_EC_Servant_Var<T> tmp(p); 00168 00169 // std::swap(tmp.ptr_, ptr_); 00170 T * swap_temp = tmp.ptr_; 00171 tmp.ptr_ = ptr_; 00172 ptr_ = swap_temp; 00173 00174 return *this; 00175 } |
|
Assignment operator. Adds reference to
Definition at line 151 of file EC_Lifetime_Utils_T.inl. References TAO_EC_Servant_Var< T >::ptr_.
00152 { 00153 TAO_EC_Servant_Var<T> tmp(rhs); 00154 00155 // std::swap(tmp.ptr_, ptr_); 00156 T * swap_temp = tmp.ptr_; 00157 tmp.ptr_ = ptr_; 00158 ptr_ = swap_temp; 00159 00160 return *this; 00161 } |
|
As an OUT parameter.
Definition at line 296 of file EC_Lifetime_Utils_T.inl. References TAO_EC_Servant_Var< T >::ptr_.
|
|
Definition at line 174 of file EC_Lifetime_Utils_T.h. Referenced by TAO_EC_Servant_Var< T >::operator=(), and TAO_EC_Servant_Var< T >::out(). |