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

BoundsC.cpp

Go to the documentation of this file.
00001 #include "tao_pch.h"
00002 // -*- C++ -*-
00003 //
00004 // $Id: BoundsC.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 "BoundsC.h"
00024 
00025 #include "tao/Stub.h"
00026 #include "tao/Invocation.h"
00027 #include "tao/PortableInterceptor.h"
00028 
00029 #if TAO_HAS_INTERCEPTORS == 1
00030 #include "tao/RequestInfo_Util.h"
00031 #include "tao/ClientRequestInfo_i.h"
00032 #include "tao/ClientInterceptorAdapter.h"
00033 #endif  /* TAO_HAS_INTERCEPTORS == 1 */
00034 
00035 #if defined (__BORLANDC__)
00036 #pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig
00037 #endif /* __BORLANDC__ */
00038 
00039 #if !defined (__ACE_INLINE__)
00040 #include "BoundsC.i"
00041 #endif /* !defined INLINE */
00042 
00043 // Default constructor.
00044 CORBA::Bounds::Bounds (void)
00045   : CORBA_UserException ("IDL:omg.org/CORBA/Bounds:1.0",
00046                          "Bounds")
00047 {
00048 }
00049 
00050 // Destructor - all members are of self managing types.
00051 CORBA::Bounds::~Bounds (void)
00052 {
00053 }
00054 
00055 // Copy constructor.
00056 CORBA::Bounds::Bounds (const ::CORBA::Bounds &_tao_excp)
00057   : CORBA_UserException (_tao_excp._rep_id (),
00058                          _tao_excp._name ())
00059 {
00060 }
00061 
00062 // Assignment operator.
00063 CORBA::Bounds&
00064 CORBA::Bounds::operator= (const ::CORBA::Bounds &_tao_excp)
00065 {
00066   this->CORBA_UserException::operator= (_tao_excp);
00067   return *this;
00068 }
00069 
00070 void CORBA::Bounds::_tao_any_destructor (void *_tao_void_pointer)
00071 {
00072   Bounds *tmp = ACE_static_cast (Bounds*, _tao_void_pointer);
00073   delete tmp;
00074 }
00075 
00076 CORBA::Bounds *
00077 CORBA::Bounds::_downcast (CORBA::Exception *exc)
00078 {
00079   if (!ACE_OS::strcmp ("IDL:omg.org/CORBA/Bounds:1.0", exc->_rep_id ()))
00080     {
00081       return ACE_dynamic_cast (Bounds *, exc);
00082     }
00083   else
00084     {
00085       return 0;
00086     }
00087 }
00088 
00089 CORBA::Exception *CORBA::Bounds::_alloc (void)
00090 {
00091   CORBA::Exception *retval = 0;
00092   ACE_NEW_RETURN (retval, ::CORBA::Bounds, 0);
00093   return retval;
00094 }
00095 
00096 CORBA::Exception *
00097 CORBA::Bounds::_tao_duplicate (void) const
00098 {
00099   CORBA::Exception *result;
00100   ACE_NEW_RETURN (
00101       result,
00102       CORBA::Bounds (*this),
00103       0
00104     );
00105   return result;
00106 }
00107 
00108 void CORBA::Bounds::_raise ()
00109 {
00110   TAO_RAISE (*this);
00111 }
00112 
00113 void CORBA::Bounds::_tao_encode (
00114     TAO_OutputCDR &cdr
00115     ACE_ENV_ARG_DECL
00116   ) const
00117 {
00118   if (cdr << *this)
00119     {
00120       return;
00121     }
00122 
00123   ACE_THROW (CORBA::MARSHAL ());
00124 }
00125 
00126 void CORBA::Bounds::_tao_decode (
00127     TAO_InputCDR &cdr
00128     ACE_ENV_ARG_DECL
00129   )
00130 {
00131   if (cdr >> *this)
00132     {
00133       return;
00134     }
00135 
00136   ACE_THROW (CORBA::MARSHAL ());
00137 }
00138 
00139 static const CORBA::Long _oc_CORBA_Bounds[] =
00140 {
00141   TAO_ENCAP_BYTE_ORDER, // byte order
00142   29,
00143   ACE_NTOHL (0x49444c3a),
00144   ACE_NTOHL (0x6f6d672e),
00145   ACE_NTOHL (0x6f72672f),
00146   ACE_NTOHL (0x434f5242),
00147   ACE_NTOHL (0x412f426f),
00148   ACE_NTOHL (0x756e6473),
00149   ACE_NTOHL (0x3a312e30),
00150   ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CORBA/Bounds:1.0
00151   7,
00152   ACE_NTOHL (0x426f756e),
00153   ACE_NTOHL (0x64730000),  // name = Bounds
00154   0, // member count
00155 };
00156 
00157 static CORBA::TypeCode _tc_TAO_tc_CORBA_Bounds (
00158     CORBA::tk_except,
00159     sizeof (_oc_CORBA_Bounds),
00160     (char *) &_oc_CORBA_Bounds,
00161     0,
00162     sizeof (CORBA::Bounds)
00163   );
00164 
00165 TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
00166 TAO_NAMESPACE_BEGIN (CORBA)
00167 TAO_NAMESPACE_DEFINE (::CORBA::TypeCode_ptr, _tc_Bounds, &_tc_TAO_tc_CORBA_Bounds)
00168 TAO_NAMESPACE_END
00169 
00170 
00171 // TAO extension - the virtual _type method.
00172 CORBA::TypeCode_ptr CORBA::Bounds::_type (void) const
00173 {
00174   return ::CORBA::_tc_Bounds;
00175 }
00176 
00177 void operator<<= (CORBA::Any &_tao_any, const CORBA::Bounds &_tao_elem) // copying
00178 {
00179   TAO_OutputCDR stream;
00180   stream << _tao_elem;
00181   _tao_any._tao_replace (
00182       CORBA::_tc_Bounds,
00183       TAO_ENCAP_BYTE_ORDER,
00184       stream.begin ()
00185     );
00186 }
00187 
00188 void operator<<= (CORBA::Any &_tao_any, CORBA::Bounds *_tao_elem) // non copying
00189 {
00190   TAO_OutputCDR stream;
00191   stream << *_tao_elem;
00192   _tao_any._tao_replace (
00193       CORBA::_tc_Bounds,
00194       TAO_ENCAP_BYTE_ORDER,
00195       stream.begin (),
00196       1,
00197       _tao_elem,
00198       CORBA::Bounds::_tao_any_destructor
00199     );
00200 }
00201 
00202 CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Bounds *&_tao_elem)
00203 {
00204   return _tao_any >>= ACE_const_cast(
00205       const CORBA::Bounds*&,
00206       _tao_elem
00207     );
00208 }
00209 
00210 CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::Bounds *&_tao_elem)
00211 {
00212   _tao_elem = 0;
00213   ACE_TRY_NEW_ENV
00214   {
00215     CORBA::TypeCode_var type = _tao_any.type ();
00216 
00217     CORBA::Boolean result = type->equivalent (CORBA::_tc_Bounds ACE_ENV_ARG_PARAMETER);
00218     ACE_TRY_CHECK;
00219 
00220     if (!result)
00221       return 0; // not equivalent
00222 
00223     if (_tao_any.any_owns_data ())
00224     {
00225       _tao_elem = (CORBA::Bounds *)_tao_any.value ();
00226       return 1;
00227     }
00228     else
00229     {
00230       CORBA::Bounds *tmp;
00231       ACE_NEW_RETURN (tmp, CORBA::Bounds, 0);
00232       TAO_InputCDR stream (
00233           _tao_any._tao_get_cdr (),
00234           _tao_any._tao_byte_order ()
00235         );
00236       CORBA::String_var interface_repository_id;
00237       if (!(stream >> interface_repository_id.out ()))
00238         return 0;
00239       if (ACE_OS::strcmp (
00240           interface_repository_id.in (),
00241           "IDL:omg.org/CORBA/Bounds:1.0"))
00242         return 0;
00243       if (stream >> *tmp)
00244       {
00245         ((CORBA::Any *)&_tao_any)->_tao_replace (
00246             CORBA::_tc_Bounds,
00247             1,
00248             tmp,
00249             CORBA::Bounds::_tao_any_destructor
00250           );
00251         _tao_elem = tmp;
00252         return 1;
00253       }
00254       else
00255       {
00256         delete tmp;
00257       }
00258     }
00259   }
00260   ACE_CATCHANY
00261   {
00262   }
00263   ACE_ENDTRY;
00264   return 0;
00265 }

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