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

CurrentC.cpp

Go to the documentation of this file.
00001 #include "tao_pch.h"
00002 // -*- C++ -*-
00003 //
00004 // $Id: CurrentC.cpp,v 1.1.1.4.2.1 2003/03/14 16:05:12 chad Exp $
00005 
00006 // ****  Code generated by the The ACE ORB (TAO) IDL Compiler ****
00007 // TAO and the TAO IDL Compiler have been developed by:
00008 //       Center for Distributed Object Computing
00009 //       Washington University
00010 //       St. Louis, MO
00011 //       USA
00012 //       http://www.cs.wustl.edu/~schmidt/doc-center.html
00013 // and
00014 //       Distributed Object Computing Laboratory
00015 //       University of California at Irvine
00016 //       Irvine, CA
00017 //       USA
00018 //       http://doc.ece.uci.edu/
00019 //
00020 // Information about TAO is available at:
00021 //     http://www.cs.wustl.edu/~schmidt/TAO.html
00022 
00023 #include "tao/CurrentC.h"
00024 #include "tao/Sequence_T.h"
00025 
00026 #if defined (__BORLANDC__)
00027 #pragma option -w-rvl -w-rch -w-ccc -w-aus
00028 #endif /* __BORLANDC__ */
00029 
00030 #if !defined (__ACE_INLINE__)
00031 #include "tao/CurrentC.i"
00032 #endif /* !defined INLINE */
00033 
00034 int CORBA_Current::_tao_class_id = 0;
00035 
00036 CORBA::Current_ptr
00037 tao_CORBA_Current_duplicate (
00038     CORBA::Current_ptr p
00039   )
00040 {
00041   return CORBA::Current::_duplicate (p);
00042 }
00043 
00044 void
00045 tao_CORBA_Current_release (
00046     CORBA::Current_ptr p
00047   )
00048 {
00049   CORBA::release (p);
00050 }
00051 
00052 CORBA_Current_ptr
00053 tao_CORBA_Current_nil (
00054     void
00055   )
00056 {
00057   return CORBA_Current::_nil ();
00058 }
00059 
00060 CORBA_Current_ptr
00061 tao_CORBA_Current_narrow (
00062     CORBA::Object *p
00063     ACE_ENV_ARG_DECL
00064   )
00065 {
00066   return CORBA_Current::_narrow (p ACE_ENV_ARG_PARAMETER);
00067 }
00068 
00069 CORBA::Object *
00070 tao_CORBA_Current_upcast (
00071     void *src
00072   )
00073 {
00074   CORBA_Current **tmp =
00075     ACE_static_cast (CORBA_Current **, src);
00076   return *tmp;
00077 }
00078 
00079 // *************************************************************
00080 // Operations for class CORBA_Current_var
00081 // *************************************************************
00082 
00083 CORBA_Current_var::CORBA_Current_var (void) // default constructor
00084   : ptr_ (CORBA_Current::_nil ())
00085 {}
00086 
00087 ::CORBA_Current_ptr
00088 CORBA_Current_var::ptr (void) const
00089 {
00090   return this->ptr_;
00091 }
00092 
00093 CORBA_Current_var::CORBA_Current_var (const ::CORBA_Current_var &p) // copy constructor
00094   : TAO_Base_var (),
00095     ptr_ (CORBA_Current::_duplicate (p.ptr ()))
00096 {}
00097 
00098 CORBA_Current_var::~CORBA_Current_var (void) // destructor
00099 {
00100   CORBA::release (this->ptr_);
00101 }
00102 
00103 CORBA_Current_var &
00104 CORBA_Current_var::operator= (CORBA_Current_ptr p)
00105 {
00106   CORBA::release (this->ptr_);
00107   this->ptr_ = p;
00108   return *this;
00109 }
00110 
00111 CORBA_Current_var &
00112 CORBA_Current_var::operator= (const ::CORBA_Current_var &p)
00113 {
00114   if (this != &p)
00115   {
00116     CORBA::release (this->ptr_);
00117     this->ptr_ = ::CORBA_Current::_duplicate (p.ptr ());
00118   }
00119   return *this;
00120 }
00121 
00122 CORBA_Current_var::operator const ::CORBA_Current_ptr &() const // cast
00123 {
00124   return this->ptr_;
00125 }
00126 
00127 CORBA_Current_var::operator ::CORBA_Current_ptr &() // cast
00128 {
00129   return this->ptr_;
00130 }
00131 
00132 ::CORBA_Current_ptr
00133 CORBA_Current_var::operator-> (void) const
00134 {
00135   return this->ptr_;
00136 }
00137 
00138 ::CORBA_Current_ptr
00139 CORBA_Current_var::in (void) const
00140 {
00141   return this->ptr_;
00142 }
00143 
00144 ::CORBA_Current_ptr &
00145 CORBA_Current_var::inout (void)
00146 {
00147   return this->ptr_;
00148 }
00149 
00150 ::CORBA_Current_ptr &
00151 CORBA_Current_var::out (void)
00152 {
00153   CORBA::release (this->ptr_);
00154   this->ptr_ = ::CORBA_Current::_nil ();
00155   return this->ptr_;
00156 }
00157 
00158 ::CORBA_Current_ptr
00159 CORBA_Current_var::_retn (void)
00160 {
00161   // yield ownership of managed obj reference
00162   ::CORBA_Current_ptr val = this->ptr_;
00163   this->ptr_ = ::CORBA_Current::_nil ();
00164   return val;
00165 }
00166 
00167 ::CORBA_Current_ptr
00168 CORBA_Current_var::tao_duplicate (CORBA_Current_ptr p)
00169 {
00170   return ::CORBA_Current::_duplicate (p);
00171 }
00172 
00173 void
00174 CORBA_Current_var::tao_release (CORBA_Current_ptr p)
00175 {
00176   CORBA::release (p);
00177 }
00178 
00179 ::CORBA_Current_ptr
00180 CORBA_Current_var::tao_nil (void)
00181 {
00182   return ::CORBA_Current::_nil ();
00183 }
00184 
00185 ::CORBA_Current_ptr
00186 CORBA_Current_var::tao_narrow (
00187     CORBA::Object *p
00188     ACE_ENV_ARG_DECL
00189   )
00190 {
00191   return ::CORBA_Current::_narrow (p ACE_ENV_ARG_PARAMETER);
00192 }
00193 
00194 CORBA::Object *
00195 CORBA_Current_var::tao_upcast (void *src)
00196 {
00197   CORBA_Current **tmp =
00198     ACE_static_cast (CORBA_Current **, src);
00199   return *tmp;
00200 }
00201 
00202 // *************************************************************
00203 // Operations for class CORBA_Current_out
00204 // *************************************************************
00205 
00206 CORBA_Current_out::CORBA_Current_out (CORBA_Current_ptr &p)
00207   : ptr_ (p)
00208 {
00209   this->ptr_ = ::CORBA_Current::_nil ();
00210 }
00211 
00212 CORBA_Current_out::CORBA_Current_out (CORBA_Current_var &p) // constructor from _var
00213   : ptr_ (p.out ())
00214 {
00215   CORBA::release (this->ptr_);
00216   this->ptr_ = ::CORBA_Current::_nil ();
00217 }
00218 
00219 CORBA_Current_out::CORBA_Current_out (const ::CORBA_Current_out &p) // copy constructor
00220   : ptr_ (ACE_const_cast (CORBA_Current_out &, p).ptr_)
00221 {}
00222 
00223 ::CORBA_Current_out &
00224 CORBA_Current_out::operator= (const ::CORBA_Current_out &p)
00225 {
00226   this->ptr_ = ACE_const_cast (CORBA_Current_out&, p).ptr_;
00227   return *this;
00228 }
00229 
00230 CORBA_Current_out &
00231 CORBA_Current_out::operator= (const ::CORBA_Current_var &p)
00232 {
00233   this->ptr_ = ::CORBA_Current::_duplicate (p.ptr ());
00234   return *this;
00235 }
00236 
00237 CORBA_Current_out &
00238 CORBA_Current_out::operator= (CORBA_Current_ptr p)
00239 {
00240   this->ptr_ = p;
00241   return *this;
00242 }
00243 
00244 CORBA_Current_out::operator ::CORBA_Current_ptr &() // cast
00245 {
00246   return this->ptr_;
00247 }
00248 
00249 ::CORBA_Current_ptr &
00250 CORBA_Current_out::ptr (void) // ptr
00251 {
00252   return this->ptr_;
00253 }
00254 
00255 ::CORBA_Current_ptr
00256 CORBA_Current_out::operator-> (void)
00257 {
00258   return this->ptr_;
00259 }
00260 
00261 
00262 // default constructor
00263 CORBA_Current::CORBA_Current (void)
00264 {}
00265 
00266   // destructor
00267   CORBA_Current::~CORBA_Current (void)
00268   {}
00269 
00270   CORBA_Current_ptr CORBA_Current::_narrow (
00271       CORBA::Object_ptr obj
00272       ACE_ENV_ARG_DECL
00273     )
00274   {
00275     return CORBA_Current::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
00276   }
00277 
00278   CORBA_Current_ptr CORBA_Current::_unchecked_narrow (
00279       CORBA::Object_ptr obj
00280       ACE_ENV_ARG_DECL_NOT_USED
00281     )
00282   {
00283     if (CORBA::is_nil (obj))
00284       return CORBA_Current::_nil ();
00285     return
00286         ACE_reinterpret_cast
00287           (
00288             CORBA_Current_ptr,
00289               obj->_tao_QueryInterface
00290                 (
00291                   ACE_reinterpret_cast
00292                     (
00293                       ptr_arith_t,
00294                       &CORBA_Current::_tao_class_id
00295                     )
00296                 )
00297           );
00298 }
00299 
00300 CORBA_Current_ptr
00301 CORBA_Current::_duplicate (CORBA_Current_ptr obj)
00302 {
00303   if (!CORBA::is_nil (obj))
00304     obj->_add_ref ();
00305   return obj;
00306 }
00307 
00308 void *CORBA_Current::_tao_QueryInterface (ptr_arith_t type)
00309 {
00310   void *retv = 0;
00311   if (type == ACE_reinterpret_cast
00312     (ptr_arith_t,
00313       &CORBA_Current::_tao_class_id))
00314     retv = ACE_reinterpret_cast (void*, this);
00315   else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
00316     retv = ACE_reinterpret_cast (void *,
00317       ACE_static_cast (CORBA::Object_ptr, this));
00318 
00319   if (retv)
00320     this->_add_ref ();
00321   return retv;
00322 }
00323 
00324 const char* CORBA_Current::_interface_repository_id (void) const
00325 {
00326   return "IDL:omg.org/CORBA/Current:1.0";
00327 }
00328 
00329 #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
00330     defined (ACE_HAS_GNU_REPO)
00331     template class TAO_Object_Manager<CORBA_Current,CORBA_Current_var>;
00332   #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
00333   #  pragma instantiate TAO_Object_Manager<CORBA_Current,CORBA_Current_var>
00334 #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

Generated on Mon Jun 16 13:48:12 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002