CDR.i

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // CDR.i,v 1.48 2006/04/20 12:37:17 jwillemsen Exp
00004 
00005 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 ACE_INLINE
00008 TAO_OutputCDR::~TAO_OutputCDR (void)
00009 {
00010 }
00011 
00012 ACE_INLINE bool
00013 TAO_OutputCDR::more_fragments (void) const
00014 {
00015   return this->more_fragments_;
00016 }
00017 
00018 ACE_INLINE void
00019 TAO_OutputCDR::more_fragments (bool more)
00020 {
00021   this->more_fragments_ = more;
00022 }
00023 
00024 ACE_INLINE void
00025 TAO_OutputCDR::message_attributes (CORBA::ULong request_id,
00026                                    TAO_Stub * stub,
00027                                    int message_semantics,
00028                                    ACE_Time_Value * timeout)
00029 {
00030   this->request_id_        = request_id;
00031   this->stub_              = stub;
00032   this->message_semantics_ = message_semantics;
00033   this->timeout_           = timeout;
00034 }
00035 
00036 ACE_INLINE CORBA::ULong
00037 TAO_OutputCDR::request_id (void) const
00038 {
00039   return this->request_id_;
00040 }
00041 
00042 ACE_INLINE TAO_Stub *
00043 TAO_OutputCDR::stub (void) const
00044 {
00045   return this->stub_;
00046 }
00047 
00048 ACE_INLINE int
00049 TAO_OutputCDR::message_semantics (void) const
00050 {
00051   return this->message_semantics_;
00052 }
00053 
00054 ACE_INLINE ACE_Time_Value *
00055 TAO_OutputCDR::timeout (void) const
00056 {
00057   return this->timeout_;
00058 }
00059 
00060 // -------------------------------------------------------------------
00061 
00062 ACE_INLINE
00063 TAO_InputCDR::TAO_InputCDR (const char *buf,
00064                             size_t bufsiz,
00065                             int byte_order,
00066                             ACE_CDR::Octet major_version,
00067                             ACE_CDR::Octet minor_version,
00068                             TAO_ORB_Core* orb_core)
00069   : ACE_InputCDR (buf,
00070                   bufsiz,
00071                   byte_order,
00072                   major_version,
00073                   minor_version),
00074     orb_core_ (orb_core)
00075 {
00076 }
00077 
00078 ACE_INLINE
00079 TAO_InputCDR::TAO_InputCDR (size_t bufsiz,
00080                             int byte_order,
00081                             ACE_CDR::Octet major_version,
00082                             ACE_CDR::Octet minor_version,
00083                             TAO_ORB_Core* orb_core)
00084   : ACE_InputCDR (bufsiz,
00085                   byte_order,
00086                   major_version,
00087                   minor_version),
00088     orb_core_ (orb_core)
00089 {
00090 }
00091 
00092 ACE_INLINE
00093 TAO_InputCDR::TAO_InputCDR (const ACE_Message_Block *data,
00094                             int byte_order,
00095                             ACE_CDR::Octet major_version,
00096                             ACE_CDR::Octet minor_version,
00097                             TAO_ORB_Core* orb_core)
00098   : ACE_InputCDR (data,
00099                   byte_order,
00100                   major_version,
00101                   minor_version),
00102     orb_core_ (orb_core)
00103 {
00104 }
00105 
00106 ACE_INLINE
00107 TAO_InputCDR::TAO_InputCDR (const ACE_Message_Block *data,
00108                             ACE_Lock* lock,
00109                             int byte_order,
00110                             ACE_CDR::Octet major_version,
00111                             ACE_CDR::Octet minor_version,
00112                             TAO_ORB_Core* orb_core)
00113   : ACE_InputCDR (data,
00114                   byte_order,
00115                   major_version,
00116                   minor_version,
00117                   lock),
00118     orb_core_ (orb_core)
00119 {
00120 }
00121 
00122 ACE_INLINE
00123 TAO_InputCDR::TAO_InputCDR (ACE_Data_Block *data,
00124                             ACE_Message_Block::Message_Flags flag,
00125                             int byte_order,
00126                             ACE_CDR::Octet major_version,
00127                             ACE_CDR::Octet minor_version,
00128                             TAO_ORB_Core* orb_core)
00129   : ACE_InputCDR (data,
00130                   flag,
00131                   byte_order,
00132                   major_version,
00133                   minor_version),
00134     orb_core_ (orb_core)
00135 {
00136 }
00137 
00138 
00139 ACE_INLINE
00140 TAO_InputCDR::TAO_InputCDR (ACE_Data_Block *data,
00141                             ACE_Message_Block::Message_Flags flag,
00142                             size_t rd_pos,
00143                             size_t wr_pos,
00144                             int byte_order,
00145                             ACE_CDR::Octet major_version,
00146                             ACE_CDR::Octet minor_version,
00147                             TAO_ORB_Core* orb_core)
00148   : ACE_InputCDR (data,
00149                   flag,
00150                   rd_pos,
00151                   wr_pos,
00152                   byte_order,
00153                   major_version,
00154                   minor_version),
00155     orb_core_ (orb_core)
00156 {
00157 }
00158 
00159 
00160 ACE_INLINE
00161 TAO_InputCDR::TAO_InputCDR (const TAO_InputCDR& rhs,
00162                             size_t size,
00163                             ACE_CDR::Long offset)
00164   : ACE_InputCDR (rhs,
00165                   size,
00166                   offset),
00167     orb_core_ (rhs.orb_core_)
00168 {
00169 }
00170 
00171 ACE_INLINE
00172 TAO_InputCDR::TAO_InputCDR (const TAO_InputCDR& rhs,
00173                             size_t size)
00174   : ACE_InputCDR (rhs,
00175                   size),
00176     orb_core_ (rhs.orb_core_)
00177 {
00178 }
00179 
00180 ACE_INLINE
00181 TAO_InputCDR::TAO_InputCDR (const TAO_InputCDR& rhs)
00182   : ACE_InputCDR (rhs),
00183     orb_core_ (rhs.orb_core_)
00184 {
00185 }
00186 
00187 ACE_INLINE
00188 TAO_InputCDR::TAO_InputCDR (ACE_InputCDR::Transfer_Contents rhs,
00189                             TAO_ORB_Core* orb_core)
00190   : ACE_InputCDR (rhs),
00191     orb_core_ (orb_core)
00192 {
00193 }
00194 
00195 ACE_INLINE
00196 TAO_InputCDR::~TAO_InputCDR (void)
00197 {
00198 }
00199 
00200 ACE_INLINE TAO_ORB_Core*
00201 TAO_InputCDR::orb_core (void) const
00202 {
00203   return this->orb_core_;
00204 }
00205 
00206 // ****************************************************************
00207 
00208 ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
00209                                       CORBA::Short x)
00210 {
00211   return
00212     os.fragment_stream (ACE_CDR::SHORT_ALIGN,
00213                         sizeof (CORBA::Short))
00214     && static_cast<ACE_OutputCDR &> (os) << x;
00215 }
00216 
00217 ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
00218                                       CORBA::UShort x)
00219 {
00220   return
00221     os.fragment_stream (ACE_CDR::SHORT_ALIGN,
00222                         sizeof (CORBA::UShort))
00223     && static_cast<ACE_OutputCDR &> (os) << x;
00224 }
00225 
00226 ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
00227                                       CORBA::Long x)
00228 {
00229   return
00230     os.fragment_stream (ACE_CDR::LONG_ALIGN,
00231                         sizeof (CORBA::Long))
00232     && static_cast<ACE_OutputCDR &> (os) << x;
00233 }
00234 
00235 ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
00236                                       CORBA::ULong x)
00237 {
00238   return
00239     os.fragment_stream (ACE_CDR::LONG_ALIGN,
00240                         sizeof (CORBA::ULong))
00241     && static_cast<ACE_OutputCDR &> (os) << x;
00242 }
00243 
00244 ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
00245                                       CORBA::LongLong x)
00246 {
00247   return
00248     os.fragment_stream (ACE_CDR::LONGLONG_ALIGN,
00249                         sizeof (CORBA::LongLong))
00250     && static_cast<ACE_OutputCDR &> (os) << x;
00251 }
00252 
00253 ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
00254                                       CORBA::ULongLong x)
00255 {
00256   return
00257     os.fragment_stream (ACE_CDR::LONGLONG_ALIGN,
00258                         sizeof (CORBA::ULongLong))
00259     && static_cast<ACE_OutputCDR &> (os) << x;
00260 }
00261 
00262 ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR& os,
00263                                       CORBA::LongDouble x)
00264 {
00265   return
00266     os.fragment_stream (ACE_CDR::LONGDOUBLE_ALIGN,
00267                         sizeof (CORBA::LongDouble))
00268     && static_cast<ACE_OutputCDR &> (os) << x;
00269 }
00270 
00271 ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
00272                                       CORBA::Float x)
00273 {
00274   return
00275     os.fragment_stream (ACE_CDR::LONG_ALIGN,
00276                         sizeof (CORBA::Float))
00277     && static_cast<ACE_OutputCDR &> (os) << x;
00278 }
00279 
00280 ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
00281                                       CORBA::Double x)
00282 {
00283   return
00284     os.fragment_stream (ACE_CDR::LONGLONG_ALIGN,
00285                         sizeof (CORBA::Double))
00286     && static_cast<ACE_OutputCDR &> (os) << x;
00287 }
00288 
00289 ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
00290                                       const char * x)
00291 {
00292   return
00293     os.fragment_stream (ACE_CDR::OCTET_ALIGN,
00294                         sizeof (char))
00295     && static_cast<ACE_OutputCDR &> (os) << x;
00296 }
00297 
00298 ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
00299                                       const CORBA::WChar * x)
00300 {
00301   return
00302     os.fragment_stream ((sizeof (CORBA::WChar) == 2
00303                          ? ACE_CDR::SHORT_ALIGN
00304                          : ACE_CDR::LONG_ALIGN),
00305                         sizeof (CORBA::WChar))
00306     && static_cast<ACE_OutputCDR &> (os) << x;
00307 }
00308 
00309 // ****************************************************************
00310 
00311 ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is,
00312                                       CORBA::Short &x)
00313 {
00314   return static_cast<ACE_InputCDR &> (is) >> x;
00315 }
00316 
00317 ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is,
00318                                       CORBA::UShort &x)
00319 {
00320   return static_cast<ACE_InputCDR &> (is) >> x;
00321 }
00322 
00323 ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is,
00324                                       CORBA::Long &x)
00325 {
00326   return static_cast<ACE_InputCDR&> (is) >> x;
00327 }
00328 
00329 ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is,
00330                                       CORBA::ULong &x)
00331 {
00332   return static_cast<ACE_InputCDR &> (is) >> x;
00333 }
00334 
00335 ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is,
00336                                       CORBA::LongLong &x)
00337 {
00338   return static_cast<ACE_InputCDR &> (is) >> x;
00339 }
00340 
00341 ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is,
00342                                       CORBA::ULongLong &x)
00343 {
00344   return static_cast<ACE_InputCDR &> (is) >> x;
00345 }
00346 
00347 ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is,
00348                                       CORBA::LongDouble &x)
00349 {
00350   return static_cast<ACE_InputCDR &> (is) >> x;
00351 }
00352 
00353 ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is,
00354                                       CORBA::Float &x)
00355 {
00356   return static_cast<ACE_InputCDR &> (is) >> x;
00357 }
00358 
00359 ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is,
00360                                       CORBA::Double &x)
00361 {
00362   return static_cast<ACE_InputCDR &> (is) >> x;
00363 }
00364 
00365 ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is,
00366                                       CORBA::Char* &x)
00367 {
00368   return static_cast<ACE_InputCDR &> (is) >> x;
00369 }
00370 
00371 ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is,
00372                                       CORBA::WChar* &x)
00373 {
00374   return static_cast<ACE_InputCDR &> (is) >> x;
00375 }
00376 
00377 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 11:54:09 2006 for TAO by doxygen 1.3.6