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

DynamicC.i

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: DynamicC.i,v 1.1.1.2 2003/02/21 18:36:44 chad 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 //
00019 // Information about TAO is available at:
00020 //     http://www.cs.wustl.edu/~schmidt/TAO.html
00021 
00022 // *************************************************************
00023 // Inline operations for class Dynamic::Parameter_var
00024 // *************************************************************
00025 
00026 ACE_INLINE
00027 Dynamic::Parameter_var::Parameter_var (void) // default constructor
00028   : ptr_ (0)
00029 {}
00030 
00031 ACE_INLINE
00032 Dynamic::Parameter_var::Parameter_var (Parameter *p)
00033   : ptr_ (p)
00034 {}
00035 
00036 ACE_INLINE
00037 Dynamic::Parameter_var::Parameter_var (const ::Dynamic::Parameter_var &p) // copy constructor
00038 {
00039   if (p.ptr_)
00040     ACE_NEW (this->ptr_, ::Dynamic::Parameter (*p.ptr_));
00041   else
00042     this->ptr_ = 0;
00043 }
00044 
00045 ACE_INLINE
00046 Dynamic::Parameter_var::~Parameter_var (void) // destructor
00047 {
00048   delete this->ptr_;
00049 }
00050 
00051 ACE_INLINE Dynamic::Parameter_var &
00052 Dynamic::Parameter_var::operator= (Parameter *p)
00053 {
00054   delete this->ptr_;
00055   this->ptr_ = p;
00056   return *this;
00057 }
00058 
00059 ACE_INLINE ::Dynamic::Parameter_var &
00060 Dynamic::Parameter_var::operator= (const ::Dynamic::Parameter_var &p)
00061 {
00062   if (this != &p)
00063     {
00064       if (p.ptr_ == 0)
00065         {
00066           delete this->ptr_;
00067           this->ptr_ = 0;
00068         }
00069       else
00070         {
00071           Parameter *deep_copy =
00072             new Parameter (*p.ptr_);
00073           
00074           if (deep_copy != 0)
00075             {
00076               Parameter *tmp = deep_copy;
00077               deep_copy = this->ptr_;
00078               this->ptr_ = tmp;
00079               delete deep_copy;
00080             }
00081         }
00082     }
00083   
00084   return *this;
00085 }
00086 
00087 ACE_INLINE const ::Dynamic::Parameter *
00088 Dynamic::Parameter_var::operator-> (void) const
00089 {
00090   return this->ptr_;
00091 }
00092 
00093 ACE_INLINE ::Dynamic::Parameter *
00094 Dynamic::Parameter_var::operator-> (void)
00095 {
00096   return this->ptr_;
00097 }
00098 
00099 ACE_INLINE
00100 Dynamic::Parameter_var::operator const ::Dynamic::Parameter &() const // cast
00101 {
00102   return *this->ptr_;
00103 }
00104 
00105 ACE_INLINE
00106 Dynamic::Parameter_var::operator ::Dynamic::Parameter &() // cast 
00107 {
00108   return *this->ptr_;
00109 }
00110 
00111 ACE_INLINE
00112 Dynamic::Parameter_var::operator ::Dynamic::Parameter &() const // cast 
00113 {
00114   return *this->ptr_;
00115 }
00116 
00117 // variable-size types only
00118 ACE_INLINE
00119 Dynamic::Parameter_var::operator ::Dynamic::Parameter *&() // cast 
00120 {
00121   return this->ptr_;
00122 }
00123 
00124 ACE_INLINE const ::Dynamic::Parameter &
00125 Dynamic::Parameter_var::in (void) const
00126 {
00127   return *this->ptr_;
00128 }
00129 
00130 ACE_INLINE ::Dynamic::Parameter &
00131 Dynamic::Parameter_var::inout (void)
00132 {
00133   return *this->ptr_;
00134 }
00135 
00136 // mapping for variable size 
00137 ACE_INLINE ::Dynamic::Parameter *&
00138 Dynamic::Parameter_var::out (void)
00139 {
00140   delete this->ptr_;
00141   this->ptr_ = 0;
00142   return this->ptr_;
00143 }
00144 
00145 ACE_INLINE ::Dynamic::Parameter *
00146 Dynamic::Parameter_var::_retn (void)
00147 {
00148   ::Dynamic::Parameter *tmp = this->ptr_;
00149   this->ptr_ = 0;
00150   return tmp;
00151 }
00152 
00153 ACE_INLINE ::Dynamic::Parameter *
00154 Dynamic::Parameter_var::ptr (void) const
00155 {
00156   return this->ptr_;
00157 }
00158 
00159 // *************************************************************
00160 // Inline operations for class Dynamic::Parameter_out
00161 // *************************************************************
00162 
00163 ACE_INLINE
00164 Dynamic::Parameter_out::Parameter_out (::Dynamic::Parameter *&p)
00165   : ptr_ (p)
00166 {
00167   this->ptr_ = 0;
00168 }
00169 
00170 ACE_INLINE
00171 Dynamic::Parameter_out::Parameter_out (Parameter_var &p) // constructor from _var
00172   : ptr_ (p.out ())
00173 {
00174   delete this->ptr_;
00175   this->ptr_ = 0;
00176 }
00177 
00178 ACE_INLINE
00179 Dynamic::Parameter_out::Parameter_out (const ::Dynamic::Parameter_out &p) // copy constructor
00180   : ptr_ (ACE_const_cast (Parameter_out&, p).ptr_)
00181 {}
00182 
00183 ACE_INLINE Dynamic::Parameter_out &
00184 Dynamic::Parameter_out::operator= (const ::Dynamic::Parameter_out &p)
00185 {
00186   this->ptr_ = ACE_const_cast (Parameter_out&, p).ptr_;
00187   return *this;
00188 }
00189 
00190 ACE_INLINE Dynamic::Parameter_out &
00191 Dynamic::Parameter_out::operator= (Parameter *p)
00192 {
00193   this->ptr_ = p;
00194   return *this;
00195 }
00196 
00197 ACE_INLINE 
00198 Dynamic::Parameter_out::operator ::Dynamic::Parameter *&() // cast
00199 {
00200   return this->ptr_;
00201 }
00202 
00203 ACE_INLINE ::Dynamic::Parameter *&
00204 Dynamic::Parameter_out::ptr (void) // ptr
00205 {
00206   return this->ptr_;
00207 }
00208 
00209 ACE_INLINE ::Dynamic::Parameter *
00210 Dynamic::Parameter_out::operator-> (void)
00211 {
00212   return this->ptr_;
00213 }
00214 
00215 
00216 #if !defined (TAO_USE_SEQUENCE_TEMPLATES)
00217 
00218 #if !defined (__TAO_UNBOUNDED_SEQUENCE_DYNAMIC_PARAMETERLIST_CI_)
00219 #define __TAO_UNBOUNDED_SEQUENCE_DYNAMIC_PARAMETERLIST_CI_
00220 
00221 // = Static operations.
00222 ACE_INLINE Dynamic::Parameter *
00223 Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList::allocbuf (CORBA::ULong size)
00224 // Allocate storage for the sequence.
00225 {
00226   Dynamic::Parameter *retval = 0;
00227   ACE_NEW_RETURN (retval, Dynamic::Parameter[size], 0);
00228   return retval;
00229 }
00230 
00231 ACE_INLINE void Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList::freebuf (Dynamic::Parameter *buffer)
00232 // Free the sequence.
00233 {
00234   delete [] buffer;
00235 }
00236 
00237 ACE_INLINE
00238 Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList::_TAO_Unbounded_Sequence_Dynamic_ParameterList (void) // Default constructor.
00239 {
00240 }
00241 
00242 ACE_INLINE
00243 Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList::_TAO_Unbounded_Sequence_Dynamic_ParameterList (CORBA::ULong maximum) // Constructor using a maximum length value.
00244   : TAO_Unbounded_Base_Sequence (maximum, _TAO_Unbounded_Sequence_Dynamic_ParameterList::allocbuf (maximum))
00245 {
00246 }
00247 
00248 ACE_INLINE
00249 Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList::_TAO_Unbounded_Sequence_Dynamic_ParameterList (CORBA::ULong maximum,
00250   CORBA::ULong length,
00251   Dynamic::Parameter *data,
00252   CORBA::Boolean release)
00253 : TAO_Unbounded_Base_Sequence (maximum, length, data, release)
00254 {
00255 }
00256 
00257 ACE_INLINE
00258 Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList::_TAO_Unbounded_Sequence_Dynamic_ParameterList (const _TAO_Unbounded_Sequence_Dynamic_ParameterList &rhs)
00259 // Copy constructor.
00260   : TAO_Unbounded_Base_Sequence (rhs)
00261 {
00262   if (rhs.buffer_ != 0)
00263   {
00264     Dynamic::Parameter *tmp1 = _TAO_Unbounded_Sequence_Dynamic_ParameterList::allocbuf (this->maximum_);
00265     Dynamic::Parameter * const tmp2 = ACE_reinterpret_cast (Dynamic::Parameter * ACE_CAST_CONST, rhs.buffer_);
00266     
00267     for (CORBA::ULong i = 0; i < this->length_; ++i)
00268       tmp1[i] = tmp2[i];
00269     
00270     this->buffer_ = tmp1;
00271   }
00272   else
00273   {
00274     this->buffer_ = 0;
00275   }
00276 }
00277 
00278 ACE_INLINE Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList &
00279 Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList::operator= (const _TAO_Unbounded_Sequence_Dynamic_ParameterList &rhs)
00280 // Assignment operator.
00281 {
00282   if (this == &rhs)
00283     return *this;
00284   
00285   if (this->release_)
00286   {
00287     if (this->maximum_ < rhs.maximum_)
00288     {
00289       // free the old buffer
00290       Dynamic::Parameter *tmp = ACE_reinterpret_cast (Dynamic::Parameter *, this->buffer_);
00291       _TAO_Unbounded_Sequence_Dynamic_ParameterList::freebuf (tmp);
00292       this->buffer_ = _TAO_Unbounded_Sequence_Dynamic_ParameterList::allocbuf (rhs.maximum_);
00293     }
00294   }
00295   else
00296     this->buffer_ = _TAO_Unbounded_Sequence_Dynamic_ParameterList::allocbuf (rhs.maximum_);
00297   
00298   TAO_Unbounded_Base_Sequence::operator= (rhs);
00299   
00300   Dynamic::Parameter *tmp1 = ACE_reinterpret_cast (Dynamic::Parameter *, this->buffer_);
00301   Dynamic::Parameter * const tmp2 = ACE_reinterpret_cast (Dynamic::Parameter * ACE_CAST_CONST, rhs.buffer_);
00302   
00303   for (CORBA::ULong i = 0; i < this->length_; ++i)
00304     tmp1[i] = tmp2[i];
00305   
00306   return *this;
00307 }
00308 
00309 // = Accessors.
00310 ACE_INLINE Dynamic::Parameter &
00311 Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList::operator[] (CORBA::ULong i)
00312 // operator []
00313 {
00314   ACE_ASSERT (i < this->maximum_);
00315   Dynamic::Parameter* tmp = ACE_reinterpret_cast(Dynamic::Parameter*,this->buffer_);
00316   return tmp[i];
00317 }
00318 
00319 ACE_INLINE const Dynamic::Parameter &
00320 Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList::operator[] (CORBA::ULong i) const
00321 // operator []
00322 {
00323   ACE_ASSERT (i < this->maximum_);
00324   Dynamic::Parameter * const tmp = ACE_reinterpret_cast (Dynamic::Parameter* ACE_CAST_CONST, this->buffer_);
00325   return tmp[i];
00326 }
00327 
00328 // Implement the TAO_Base_Sequence methods (see Sequence.h)
00329 
00330 ACE_INLINE Dynamic::Parameter *
00331 Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList::get_buffer (CORBA::Boolean orphan)
00332 {
00333   Dynamic::Parameter *result = 0;
00334   if (orphan == 0)
00335   {
00336     // We retain ownership.
00337     if (this->buffer_ == 0)
00338     {
00339       result = _TAO_Unbounded_Sequence_Dynamic_ParameterList::allocbuf (this->length_);
00340       this->buffer_ = result;
00341       this->release_ = 1;
00342     }
00343     else
00344     {
00345       result = ACE_reinterpret_cast (Dynamic::Parameter*, this->buffer_);
00346     }
00347   }
00348   else // if (orphan == 1)
00349   {
00350     if (this->release_ != 0)
00351     {
00352       // We set the state back to default and relinquish
00353       // ownership.
00354       result = ACE_reinterpret_cast(Dynamic::Parameter*,this->buffer_);
00355       this->maximum_ = 0;
00356       this->length_ = 0;
00357       this->buffer_ = 0;
00358       this->release_ = 0;
00359     }
00360   }
00361   return result;
00362 }
00363 
00364 ACE_INLINE const Dynamic::Parameter *
00365 Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList::get_buffer (void) const
00366 {
00367   return ACE_reinterpret_cast(const Dynamic::Parameter * ACE_CAST_CONST, this->buffer_);
00368 }
00369 
00370 ACE_INLINE void
00371 Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList::replace (CORBA::ULong max,
00372 CORBA::ULong length,
00373 Dynamic::Parameter *data,
00374 CORBA::Boolean release)
00375 {
00376   this->maximum_ = max;
00377   this->length_ = length;
00378   if (this->buffer_ && this->release_ == 1)
00379   {
00380     Dynamic::Parameter *tmp = ACE_reinterpret_cast(Dynamic::Parameter*,this->buffer_);
00381     _TAO_Unbounded_Sequence_Dynamic_ParameterList::freebuf (tmp);
00382   }
00383   this->buffer_ = data;
00384   this->release_ = release;
00385 }
00386 
00387 #endif /* end #if !defined */
00388 
00389 
00390 #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ 
00391 
00392 #if !defined (_DYNAMIC_PARAMETERLIST_CI_)
00393 #define _DYNAMIC_PARAMETERLIST_CI_
00394 
00395 // *************************************************************
00396 // Inline operations for class Dynamic::ParameterList_var
00397 // *************************************************************
00398 
00399 ACE_INLINE
00400 Dynamic::ParameterList_var::ParameterList_var (void) // default constructor
00401   : ptr_ (0)
00402 {}
00403 
00404 ACE_INLINE
00405 Dynamic::ParameterList_var::ParameterList_var (ParameterList *p)
00406   : ptr_ (p)
00407 {}
00408 
00409 ACE_INLINE
00410 Dynamic::ParameterList_var::ParameterList_var (const ::Dynamic::ParameterList_var &p) // copy constructor
00411 {
00412   if (p.ptr_)
00413     ACE_NEW (this->ptr_, ::Dynamic::ParameterList (*p.ptr_));
00414   else
00415     this->ptr_ = 0;
00416 }
00417 
00418 ACE_INLINE
00419 Dynamic::ParameterList_var::~ParameterList_var (void) // destructor
00420 {
00421   delete this->ptr_;
00422 }
00423 
00424 ACE_INLINE Dynamic::ParameterList_var &
00425 Dynamic::ParameterList_var::operator= (ParameterList *p)
00426 {
00427   delete this->ptr_;
00428   this->ptr_ = p;
00429   return *this;
00430 }
00431 
00432 ACE_INLINE ::Dynamic::ParameterList_var &
00433 Dynamic::ParameterList_var::operator= (const ::Dynamic::ParameterList_var &p)
00434 {
00435   if (this != &p)
00436     {
00437       if (p.ptr_ == 0)
00438         {
00439           delete this->ptr_;
00440           this->ptr_ = 0;
00441         }
00442       else
00443         {
00444           ParameterList *deep_copy =
00445             new ParameterList (*p.ptr_);
00446           
00447           if (deep_copy != 0)
00448             {
00449               ParameterList *tmp = deep_copy;
00450               deep_copy = this->ptr_;
00451               this->ptr_ = tmp;
00452               delete deep_copy;
00453             }
00454         }
00455     }
00456   
00457   return *this;
00458 }
00459 
00460 ACE_INLINE const ::Dynamic::ParameterList *
00461 Dynamic::ParameterList_var::operator-> (void) const
00462 {
00463   return this->ptr_;
00464 }
00465 
00466 ACE_INLINE ::Dynamic::ParameterList *
00467 Dynamic::ParameterList_var::operator-> (void)
00468 {
00469   return this->ptr_;
00470 }
00471 
00472 ACE_INLINE 
00473 Dynamic::ParameterList_var::operator const ::Dynamic::ParameterList &() const // cast
00474 {
00475   return *this->ptr_;
00476 }
00477 
00478 ACE_INLINE 
00479 Dynamic::ParameterList_var::operator ::Dynamic::ParameterList &() // cast 
00480 {
00481   return *this->ptr_;
00482 }
00483 
00484 ACE_INLINE 
00485 Dynamic::ParameterList_var::operator ::Dynamic::ParameterList &() const // cast 
00486 {
00487   return *this->ptr_;
00488 }
00489 
00490 // variable-size types only
00491 ACE_INLINE
00492 Dynamic::ParameterList_var::operator ::Dynamic::ParameterList *&() // cast 
00493 {
00494   return this->ptr_;
00495 }
00496 
00497 ACE_INLINE Dynamic::Parameter &
00498 Dynamic::ParameterList_var::operator[] (CORBA::ULong index)
00499 {
00500   return this->ptr_->operator[] (index);
00501 }
00502 
00503 ACE_INLINE const Dynamic::Parameter &
00504 Dynamic::ParameterList_var::operator[] (CORBA::ULong index) const
00505 {
00506   return ACE_const_cast (const Dynamic::Parameter &, this->ptr_->operator[] (index));
00507 }
00508 
00509 ACE_INLINE const ::Dynamic::ParameterList &
00510 Dynamic::ParameterList_var::in (void) const
00511 {
00512   return *this->ptr_;
00513 }
00514 
00515 ACE_INLINE ::Dynamic::ParameterList &
00516 Dynamic::ParameterList_var::inout (void)
00517 {
00518   return *this->ptr_;
00519 }
00520 
00521 // mapping for variable size 
00522 ACE_INLINE ::Dynamic::ParameterList *&
00523 Dynamic::ParameterList_var::out (void)
00524 {
00525   delete this->ptr_;
00526   this->ptr_ = 0;
00527   return this->ptr_;
00528 }
00529 
00530 ACE_INLINE ::Dynamic::ParameterList *
00531 Dynamic::ParameterList_var::_retn (void)
00532 {
00533   ::Dynamic::ParameterList *tmp = this->ptr_;
00534   this->ptr_ = 0;
00535   return tmp;
00536 }
00537 
00538 ACE_INLINE ::Dynamic::ParameterList *
00539 Dynamic::ParameterList_var::ptr (void) const
00540 {
00541   return this->ptr_;
00542 }
00543 
00544 // *************************************************************
00545 // Inline operations for class Dynamic::ParameterList_out
00546 // *************************************************************
00547 
00548 ACE_INLINE
00549 Dynamic::ParameterList_out::ParameterList_out (ParameterList *&p)
00550   : ptr_ (p)
00551 {
00552   this->ptr_ = 0;
00553 }
00554 
00555 ACE_INLINE
00556 Dynamic::ParameterList_out::ParameterList_out (ParameterList_var &p) // constructor from _var
00557   : ptr_ (p.out ())
00558 {
00559   delete this->ptr_;
00560   this->ptr_ = 0;
00561 }
00562 
00563 ACE_INLINE
00564 Dynamic::ParameterList_out::ParameterList_out (const ::Dynamic::ParameterList_out &p) // copy constructor
00565   : ptr_ (ACE_const_cast (ParameterList_out&, p).ptr_)
00566 {}
00567 
00568 ACE_INLINE ::Dynamic::ParameterList_out &
00569 Dynamic::ParameterList_out::operator= (const ::Dynamic::ParameterList_out &p)
00570 {
00571   this->ptr_ = ACE_const_cast (ParameterList_out&, p).ptr_;
00572   return *this;
00573 }
00574 
00575 ACE_INLINE ::Dynamic::ParameterList_out &
00576 Dynamic::ParameterList_out::operator= (ParameterList *p)
00577 {
00578   this->ptr_ = p;
00579   return *this;
00580 }
00581 
00582 ACE_INLINE 
00583 Dynamic::ParameterList_out::operator ::Dynamic::ParameterList *&() // cast
00584 {
00585   return this->ptr_;
00586 }
00587 
00588 ACE_INLINE ::Dynamic::ParameterList *&
00589 Dynamic::ParameterList_out::ptr (void) // ptr
00590 {
00591   return this->ptr_;
00592 }
00593 
00594 ACE_INLINE ::Dynamic::ParameterList *
00595 Dynamic::ParameterList_out::operator-> (void)
00596 {
00597   return this->ptr_;
00598 }
00599 
00600 ACE_INLINE Dynamic::Parameter &
00601 Dynamic::ParameterList_out::operator[] (CORBA::ULong index)
00602 {
00603   return this->ptr_->operator[] (index);
00604 }
00605 
00606 
00607 #endif /* end #if !defined */
00608 
00609 
00610 #if !defined (TAO_USE_SEQUENCE_TEMPLATES)
00611 
00612 #if !defined (__TAO_UNBOUNDED_OBJECT_SEQUENCE_DYNAMIC_EXCEPTIONLIST_CI_)
00613 #define __TAO_UNBOUNDED_OBJECT_SEQUENCE_DYNAMIC_EXCEPTIONLIST_CI_
00614 
00615 ACE_INLINE CORBA::TypeCode **
00616 Dynamic::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::allocbuf (CORBA::ULong nelems)
00617 {
00618   CORBA::TypeCode **buf = 0;
00619   
00620   ACE_NEW_RETURN (buf, CORBA::TypeCode*[nelems], 0);
00621   
00622   for (CORBA::ULong i = 0; i < nelems; i++)
00623     {
00624       buf[i] = CORBA::TypeCode::_nil ();
00625     }
00626   
00627   return buf;
00628 }
00629 
00630 ACE_INLINE void 
00631 Dynamic::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::freebuf (CORBA::TypeCode **buffer)
00632 {
00633   if (buffer == 0)
00634     return;
00635   delete[] buffer;
00636 }
00637 
00638 ACE_INLINE
00639 Dynamic::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList (void)
00640 {
00641 }
00642 
00643 ACE_INLINE
00644 Dynamic::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList (CORBA::ULong maximum)
00645   : TAO_Unbounded_Base_Sequence (maximum, _TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::allocbuf (maximum))
00646 {
00647 }
00648 
00649 ACE_INLINE
00650 Dynamic::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList (CORBA::ULong maximum,
00651   CORBA::ULong length,
00652   CORBA::TypeCode* *value,
00653   CORBA::Boolean release)
00654 : TAO_Unbounded_Base_Sequence (maximum, length, value, release)
00655 {
00656 }
00657 
00658 ACE_INLINE
00659 Dynamic::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList(const _TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList &rhs)
00660   : TAO_Unbounded_Base_Sequence (rhs)
00661 {
00662   if (rhs.buffer_ != 0)
00663   {
00664     CORBA::TypeCode **tmp1 = _TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::allocbuf (this->maximum_);
00665     CORBA::TypeCode ** const tmp2 = ACE_reinterpret_cast (CORBA::TypeCode ** ACE_CAST_CONST, rhs.buffer_);
00666     
00667     for (CORBA::ULong i = 0; i < rhs.length_; ++i)
00668       {
00669         tmp1[i] = CORBA::TypeCode::_duplicate (tmp2[i]);
00670       }
00671     
00672     this->buffer_ = tmp1;
00673   }
00674   else
00675   {
00676     this->buffer_ = 0;
00677   }
00678 }
00679 
00680 ACE_INLINE Dynamic::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList &
00681 Dynamic::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::operator= (const _TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList &rhs)
00682 {
00683   if (this == &rhs)
00684     return *this;
00685   
00686   if (this->release_)
00687   {
00688     CORBA::TypeCode **tmp = ACE_reinterpret_cast (CORBA::TypeCode **, this->buffer_);
00689     
00690     for (CORBA::ULong i = 0; i < this->length_; ++i)
00691     {
00692       CORBA::release (tmp[i]);
00693       tmp[i] = CORBA::TypeCode::_nil ();
00694     }
00695     if (this->maximum_ < rhs.maximum_)
00696     {
00697       _TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::freebuf (tmp);
00698       this->buffer_ = _TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::allocbuf (rhs.maximum_);
00699     }
00700   }
00701   else
00702     this->buffer_ = _TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::allocbuf (rhs.maximum_);
00703   
00704   TAO_Unbounded_Base_Sequence::operator= (rhs);
00705   
00706   CORBA::TypeCode **tmp1 = ACE_reinterpret_cast (CORBA::TypeCode **, this->buffer_);
00707   CORBA::TypeCode ** const tmp2 = ACE_reinterpret_cast (CORBA::TypeCode ** ACE_CAST_CONST, rhs.buffer_);
00708   
00709   for (CORBA::ULong i = 0; i < rhs.length_; ++i)
00710     {
00711       tmp1[i] = CORBA::TypeCode::_duplicate (tmp2[i]);
00712     }
00713   
00714   return *this;
00715 }
00716 
00717 ACE_INLINE TAO_Pseudo_Object_Manager<Dynamic::TypeCode,Dynamic::TypeCode_var>
00718 Dynamic::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::operator[] (CORBA::ULong index) const
00719 // read-write accessor
00720 {
00721   ACE_ASSERT (index < this->maximum_);
00722   CORBA::TypeCode ** const tmp = ACE_reinterpret_cast (CORBA::TypeCode ** ACE_CAST_CONST, this->buffer_);
00723   return TAO_Pseudo_Object_Manager<Dynamic::TypeCode,Dynamic::TypeCode_var> (tmp + index, this->release_);
00724 }
00725 
00726 ACE_INLINE CORBA::TypeCode* *
00727 Dynamic::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::get_buffer (CORBA::Boolean orphan)
00728 {
00729   CORBA::TypeCode **result = 0;
00730   if (orphan == 0)
00731   {
00732     // We retain ownership.
00733     if (this->buffer_ == 0)
00734     {
00735       result = _TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::allocbuf (this->maximum_);
00736       this->buffer_ = result;
00737       this->release_ = 1;
00738     }
00739     else
00740     {
00741       result = ACE_reinterpret_cast (CORBA::TypeCode**, this->buffer_);
00742     }
00743   }
00744   else // if (orphan == 1)
00745   {
00746     if (this->release_ != 0)
00747     {
00748       // We set the state back to default and relinquish
00749       // ownership.
00750       result = ACE_reinterpret_cast(CORBA::TypeCode**,this->buffer_);
00751       this->maximum_ = 0;
00752       this->length_ = 0;
00753       this->buffer_ = 0;
00754       this->release_ = 0;
00755     }
00756   }
00757   return result;
00758 }
00759 
00760 ACE_INLINE const CORBA::TypeCode* *
00761 Dynamic::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::get_buffer (void) const
00762 {
00763   return ACE_reinterpret_cast(const CORBA::TypeCode ** ACE_CAST_CONST, this->buffer_);
00764 }
00765 
00766 
00767 #endif /* end #if !defined */
00768 
00769 
00770 #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ 
00771 
00772 #if !defined (_DYNAMIC_EXCEPTIONLIST_CI_)
00773 #define _DYNAMIC_EXCEPTIONLIST_CI_
00774 
00775 // *************************************************************
00776 // Inline operations for class Dynamic::ExceptionList_var
00777 // *************************************************************
00778 
00779 ACE_INLINE
00780 Dynamic::ExceptionList_var::ExceptionList_var (void) // default constructor
00781   : ptr_ (0)
00782 {}
00783 
00784 ACE_INLINE
00785 Dynamic::ExceptionList_var::ExceptionList_var (ExceptionList *p)
00786   : ptr_ (p)
00787 {}
00788 
00789 ACE_INLINE
00790 Dynamic::ExceptionList_var::ExceptionList_var (const ::Dynamic::ExceptionList_var &p) // copy constructor
00791 {
00792   if (p.ptr_)
00793     ACE_NEW (this->ptr_, ::Dynamic::ExceptionList (*p.ptr_));
00794   else
00795     this->ptr_ = 0;
00796 }
00797 
00798 ACE_INLINE
00799 Dynamic::ExceptionList_var::~ExceptionList_var (void) // destructor
00800 {
00801   delete this->ptr_;
00802 }
00803 
00804 ACE_INLINE Dynamic::ExceptionList_var &
00805 Dynamic::ExceptionList_var::operator= (ExceptionList *p)
00806 {
00807   delete this->ptr_;
00808   this->ptr_ = p;
00809   return *this;
00810 }
00811 
00812 ACE_INLINE ::Dynamic::ExceptionList_var &
00813 Dynamic::ExceptionList_var::operator= (const ::Dynamic::ExceptionList_var &p)
00814 {
00815   if (this != &p)
00816     {
00817       if (p.ptr_ == 0)
00818         {
00819           delete this->ptr_;
00820           this->ptr_ = 0;
00821         }
00822       else
00823         {
00824           ExceptionList *deep_copy =
00825             new ExceptionList (*p.ptr_);
00826           
00827           if (deep_copy != 0)
00828             {
00829               ExceptionList *tmp = deep_copy;
00830               deep_copy = this->ptr_;
00831               this->ptr_ = tmp;
00832               delete deep_copy;
00833             }
00834         }
00835     }
00836   
00837   return *this;
00838 }
00839 
00840 ACE_INLINE const ::Dynamic::ExceptionList *
00841 Dynamic::ExceptionList_var::operator-> (void) const
00842 {
00843   return this->ptr_;
00844 }
00845 
00846 ACE_INLINE ::Dynamic::ExceptionList *
00847 Dynamic::ExceptionList_var::operator-> (void)
00848 {
00849   return this->ptr_;
00850 }
00851 
00852 ACE_INLINE 
00853 Dynamic::ExceptionList_var::operator const ::Dynamic::ExceptionList &() const // cast
00854 {
00855   return *this->ptr_;
00856 }
00857 
00858 ACE_INLINE 
00859 Dynamic::ExceptionList_var::operator ::Dynamic::ExceptionList &() // cast 
00860 {
00861   return *this->ptr_;
00862 }
00863 
00864 ACE_INLINE 
00865 Dynamic::ExceptionList_var::operator ::Dynamic::ExceptionList &() const // cast 
00866 {
00867   return *this->ptr_;
00868 }
00869 
00870 // variable-size types only
00871 ACE_INLINE
00872 Dynamic::ExceptionList_var::operator ::Dynamic::ExceptionList *&() // cast 
00873 {
00874   return this->ptr_;
00875 }
00876 
00877 ACE_INLINE TAO_Pseudo_Object_Manager<Dynamic::TypeCode,Dynamic::TypeCode_var>
00878 Dynamic::ExceptionList_var::operator[] (CORBA::ULong index)
00879 {
00880   return this->ptr_->operator[] (index);
00881 }
00882 
00883 ACE_INLINE const ::Dynamic::ExceptionList &
00884 Dynamic::ExceptionList_var::in (void) const
00885 {
00886   return *this->ptr_;
00887 }
00888 
00889 ACE_INLINE ::Dynamic::ExceptionList &
00890 Dynamic::ExceptionList_var::inout (void)
00891 {
00892   return *this->ptr_;
00893 }
00894 
00895 // mapping for variable size 
00896 ACE_INLINE ::Dynamic::ExceptionList *&
00897 Dynamic::ExceptionList_var::out (void)
00898 {
00899   delete this->ptr_;
00900   this->ptr_ = 0;
00901   return this->ptr_;
00902 }
00903 
00904 ACE_INLINE ::Dynamic::ExceptionList *
00905 Dynamic::ExceptionList_var::_retn (void)
00906 {
00907   ::Dynamic::ExceptionList *tmp = this->ptr_;
00908   this->ptr_ = 0;
00909   return tmp;
00910 }
00911 
00912 ACE_INLINE ::Dynamic::ExceptionList *
00913 Dynamic::ExceptionList_var::ptr (void) const
00914 {
00915   return this->ptr_;
00916 }
00917 
00918 // *************************************************************
00919 // Inline operations for class Dynamic::ExceptionList_out
00920 // *************************************************************
00921 
00922 ACE_INLINE
00923 Dynamic::ExceptionList_out::ExceptionList_out (ExceptionList *&p)
00924   : ptr_ (p)
00925 {
00926   this->ptr_ = 0;
00927 }
00928 
00929 ACE_INLINE
00930 Dynamic::ExceptionList_out::ExceptionList_out (ExceptionList_var &p) // constructor from _var
00931   : ptr_ (p.out ())
00932 {
00933   delete this->ptr_;
00934   this->ptr_ = 0;
00935 }
00936 
00937 ACE_INLINE
00938 Dynamic::ExceptionList_out::ExceptionList_out (const ::Dynamic::ExceptionList_out &p) // copy constructor
00939   : ptr_ (ACE_const_cast (ExceptionList_out&, p).ptr_)
00940 {}
00941 
00942 ACE_INLINE ::Dynamic::ExceptionList_out &
00943 Dynamic::ExceptionList_out::operator= (const ::Dynamic::ExceptionList_out &p)
00944 {
00945   this->ptr_ = ACE_const_cast (ExceptionList_out&, p).ptr_;
00946   return *this;
00947 }
00948 
00949 ACE_INLINE ::Dynamic::ExceptionList_out &
00950 Dynamic::ExceptionList_out::operator= (ExceptionList *p)
00951 {
00952   this->ptr_ = p;
00953   return *this;
00954 }
00955 
00956 ACE_INLINE 
00957 Dynamic::ExceptionList_out::operator ::Dynamic::ExceptionList *&() // cast
00958 {
00959   return this->ptr_;
00960 }
00961 
00962 ACE_INLINE ::Dynamic::ExceptionList *&
00963 Dynamic::ExceptionList_out::ptr (void) // ptr
00964 {
00965   return this->ptr_;
00966 }
00967 
00968 ACE_INLINE ::Dynamic::ExceptionList *
00969 Dynamic::ExceptionList_out::operator-> (void)
00970 {
00971   return this->ptr_;
00972 }
00973 
00974 ACE_INLINE TAO_Pseudo_Object_Manager<Dynamic::TypeCode,Dynamic::TypeCode_var>
00975 Dynamic::ExceptionList_out::operator[] (CORBA::ULong index)
00976 {
00977   return this->ptr_->operator[] (index);
00978 }
00979 
00980 
00981 #endif /* end #if !defined */
00982 
00983 ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const Dynamic::Parameter &_tao_aggregate)
00984 {
00985   if (
00986     (strm << _tao_aggregate.argument) &&
00987     (strm << _tao_aggregate.mode)
00988   )
00989     return 1;
00990   else
00991     return 0;
00992   
00993 }
00994 
00995 ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, Dynamic::Parameter &_tao_aggregate)
00996 {
00997   if (
00998     (strm >> _tao_aggregate.argument) &&
00999     (strm >> _tao_aggregate.mode)
01000   )
01001     return 1;
01002   else
01003     return 0;
01004   
01005 }
01006 
01007 
01008 #if !defined _TAO_CDR_OP_Dynamic_ParameterList_I_
01009 #define _TAO_CDR_OP_Dynamic_ParameterList_I_
01010 
01011 CORBA::Boolean TAO_Export operator<< (
01012     TAO_OutputCDR &,
01013     const Dynamic::ParameterList &
01014   );
01015 CORBA::Boolean TAO_Export operator>> (
01016     TAO_InputCDR &,
01017     Dynamic::ParameterList &
01018   );
01019 
01020 #endif /* _TAO_CDR_OP_Dynamic_ParameterList_I_ */
01021 
01022 
01023 #if !defined _TAO_CDR_OP_Dynamic_ExceptionList_I_
01024 #define _TAO_CDR_OP_Dynamic_ExceptionList_I_
01025 
01026 CORBA::Boolean TAO_Export operator<< (
01027     TAO_OutputCDR &,
01028     const Dynamic::ExceptionList &
01029   );
01030 CORBA::Boolean TAO_Export operator>> (
01031     TAO_InputCDR &,
01032     Dynamic::ExceptionList &
01033   );
01034 
01035 #endif /* _TAO_CDR_OP_Dynamic_ExceptionList_I_ */
01036 

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