CDR.h File Reference

#include "tao/orbconf.h"
#include "tao/Basic_Types.h"
#include "tao/GIOP_Message_Version.h"
#include "tao/Transport.h"
#include "ace/CDR_Stream.h"

Include dependency graph for CDR.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TAO_OutputCDR
 A CDR stream for writing, i.e. for marshalling. More...
class  TAO_InputCDR
 A CDR stream for reading, i.e. for demarshalling. More...

Functions

TAO_END_VERSIONED_NAMESPACE_DECL
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_Export CORBA::Boolean 
operator<< (TAO_OutputCDR &os, CORBA::Short x)
TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::UShort x)
TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::Long x)
TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::ULong x)
TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::LongLong x)
TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::ULongLong x)
TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::LongDouble x)
TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::Float x)
TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os, CORBA::Double x)
TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os, const CORBA::Char *x)
TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &os, const CORBA::WChar *x)
TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::Short &x)
TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::UShort &x)
TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::Long &x)
TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::ULong &x)
TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::LongLong &x)
TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::ULongLong &x)
TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::LongDouble &x)
TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::Float &x)
TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::Double &x)
TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::Char *&x)
TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::WChar *&x)


Detailed Description

Id
CDR.h 80289 2007-12-17 20:34:44Z johnnyw

Common Data Representation (CDR) marshaling streams.

This implementation assumes that the native numeric representation is two's complement for integers, IEEE single/double for floats. Also that characters are in ISO Latin/1.

Note that CDR itself makes no such assumptions, but this implementation makes such assumptions for reasons of efficiency. Careful enhancements could preserve that efficiency where the assumptions are true, yet still allow the code to work when they aren't true.

The implementation expects that buffers are aligned according to the strongest CDR alignment restriction.

NOTE: this does everything "CDR 1.1" does ... that is, it supports the five extended OMG-IDL data types in UNO Appendix A, which provide richer arithmetic types (64 bit integers, "quad precision" FP) and UNICODE-based characters and strings. Those types are not standard parts of OMG-IDL at this time.

THREADING NOTE: CDR data structures must be protected against concurrent access by their owning thread.

Author:
Copyright 1994-1995 by Sun Microsystems Inc.

Aniruddha Gokhale

Carlos O'Ryan

Definition in file CDR.h.


Function Documentation

TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR os,
const CORBA::WChar x 
)

Definition at line 304 of file CDR.inl.

00306 {
00307   return
00308     os.fragment_stream ((sizeof (CORBA::WChar) == 2
00309                          ? ACE_CDR::SHORT_ALIGN
00310                          : ACE_CDR::LONG_ALIGN),
00311                         sizeof (CORBA::WChar))
00312     && static_cast<ACE_OutputCDR &> (os) << x;
00313 }

TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR os,
const CORBA::Char x 
)

TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR os,
CORBA::Double  x 
)

Definition at line 286 of file CDR.inl.

00288 {
00289   return
00290     os.fragment_stream (ACE_CDR::LONGLONG_ALIGN,
00291                         sizeof (CORBA::Double))
00292     && static_cast<ACE_OutputCDR &> (os) << x;
00293 }

TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR os,
CORBA::Float  x 
)

Definition at line 277 of file CDR.inl.

00279 {
00280   return
00281     os.fragment_stream (ACE_CDR::LONG_ALIGN,
00282                         sizeof (CORBA::Float))
00283     && static_cast<ACE_OutputCDR &> (os) << x;
00284 }

TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR os,
CORBA::LongDouble  x 
)

Definition at line 268 of file CDR.inl.

00270 {
00271   return
00272     os.fragment_stream (ACE_CDR::LONGDOUBLE_ALIGN,
00273                         sizeof (CORBA::LongDouble))
00274     && static_cast<ACE_OutputCDR &> (os) << x;
00275 }

TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR os,
CORBA::ULongLong  x 
)

Definition at line 259 of file CDR.inl.

00261 {
00262   return
00263     os.fragment_stream (ACE_CDR::LONGLONG_ALIGN,
00264                         sizeof (CORBA::ULongLong))
00265     && static_cast<ACE_OutputCDR &> (os) << x;
00266 }

TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR os,
CORBA::LongLong  x 
)

Definition at line 250 of file CDR.inl.

00252 {
00253   return
00254     os.fragment_stream (ACE_CDR::LONGLONG_ALIGN,
00255                         sizeof (CORBA::LongLong))
00256     && static_cast<ACE_OutputCDR &> (os) << x;
00257 }

TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR os,
CORBA::ULong  x 
)

Definition at line 241 of file CDR.inl.

00243 {
00244   return
00245     os.fragment_stream (ACE_CDR::LONG_ALIGN,
00246                         sizeof (CORBA::ULong))
00247     && static_cast<ACE_OutputCDR &> (os) << x;
00248 }

TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR os,
CORBA::Long  x 
)

Definition at line 232 of file CDR.inl.

00234 {
00235   return
00236     os.fragment_stream (ACE_CDR::LONG_ALIGN,
00237                         sizeof (CORBA::Long))
00238     && static_cast<ACE_OutputCDR &> (os) << x;
00239 }

TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR os,
CORBA::UShort  x 
)

Definition at line 223 of file CDR.inl.

00225 {
00226   return
00227     os.fragment_stream (ACE_CDR::SHORT_ALIGN,
00228                         sizeof (CORBA::UShort))
00229     && static_cast<ACE_OutputCDR &> (os) << x;
00230 }

TAO_END_VERSIONED_NAMESPACE_DECL TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR os,
CORBA::Short  x 
)

Definition at line 214 of file CDR.inl.

00216 {
00217   return
00218     os.fragment_stream (ACE_CDR::SHORT_ALIGN,
00219                         sizeof (CORBA::Short))
00220     && static_cast<ACE_OutputCDR &> (os) << x;
00221 }

TAO_Export CORBA::Boolean operator>> ( TAO_InputCDR is,
CORBA::WChar *&  x 
)

Definition at line 377 of file CDR.inl.

00379 {
00380   return static_cast<ACE_InputCDR &> (is) >> x;
00381 }

TAO_Export CORBA::Boolean operator>> ( TAO_InputCDR is,
CORBA::Char *&  x 
)

Definition at line 371 of file CDR.inl.

00373 {
00374   return static_cast<ACE_InputCDR &> (is) >> x;
00375 }

TAO_Export CORBA::Boolean operator>> ( TAO_InputCDR is,
CORBA::Double x 
)

Definition at line 365 of file CDR.inl.

00367 {
00368   return static_cast<ACE_InputCDR &> (is) >> x;
00369 }

TAO_Export CORBA::Boolean operator>> ( TAO_InputCDR is,
CORBA::Float x 
)

Definition at line 359 of file CDR.inl.

00361 {
00362   return static_cast<ACE_InputCDR &> (is) >> x;
00363 }

TAO_Export CORBA::Boolean operator>> ( TAO_InputCDR is,
CORBA::LongDouble x 
)

Definition at line 353 of file CDR.inl.

00355 {
00356   return static_cast<ACE_InputCDR &> (is) >> x;
00357 }

TAO_Export CORBA::Boolean operator>> ( TAO_InputCDR is,
CORBA::ULongLong x 
)

Definition at line 347 of file CDR.inl.

00349 {
00350   return static_cast<ACE_InputCDR &> (is) >> x;
00351 }

TAO_Export CORBA::Boolean operator>> ( TAO_InputCDR is,
CORBA::LongLong x 
)

Definition at line 341 of file CDR.inl.

00343 {
00344   return static_cast<ACE_InputCDR &> (is) >> x;
00345 }

TAO_Export CORBA::Boolean operator>> ( TAO_InputCDR is,
CORBA::ULong x 
)

Definition at line 335 of file CDR.inl.

00337 {
00338   return static_cast<ACE_InputCDR &> (is) >> x;
00339 }

TAO_Export CORBA::Boolean operator>> ( TAO_InputCDR is,
CORBA::Long x 
)

Definition at line 329 of file CDR.inl.

00331 {
00332   return static_cast<ACE_InputCDR&> (is) >> x;
00333 }

TAO_Export CORBA::Boolean operator>> ( TAO_InputCDR is,
CORBA::UShort x 
)

Definition at line 323 of file CDR.inl.

00325 {
00326   return static_cast<ACE_InputCDR &> (is) >> x;
00327 }

TAO_Export CORBA::Boolean operator>> ( TAO_InputCDR is,
CORBA::Short x 
)

Definition at line 317 of file CDR.inl.

00319 {
00320   return static_cast<ACE_InputCDR &> (is) >> x;
00321 }


Generated on Tue Feb 2 17:38:01 2010 for TAO by  doxygen 1.4.7