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

Any.h File Reference

#include "ace/pre.h"
#include "tao/CDR.h"
#include "tao/Environment.h"
#include "tao/Object.h"
#include "tao/Typecode.h"
#include "ace/post.h"

Include dependency graph for Any.h:

Include dependency graph

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

Included by dependency graph

Go to the source code of this file.

Compounds

class  CORBA_Any
 Class "Any" can wrap values of any type, with the assistance of a TypeCode to describe that type. More...

struct  CORBA_Any::to_object
struct  CORBA_Any::to_abstract_base
struct  CORBA_Any::to_value
class  CORBA_Any_out
 CORBA_Any_out. More...

class  CORBA_Any_var
 Provide for automatic storage deallocation on going out of scope. More...


Functions

TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &cdr, const CORBA::Any &x)
TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &cdr, CORBA::Any &x)
TAO_Export void operator<<= (CORBA_Any_var &, CORBA::Short)
TAO_Export void operator<<= (CORBA_Any_var &, const CORBA_Any &)
TAO_Export void operator<<= (CORBA_Any_var &, const char *)
TAO_Export void operator<<= (CORBA_Any_var &, CORBA::Any::from_boolean)
TAO_Export CORBA::Boolean operator>>= (CORBA_Any_var &, CORBA::Short &)
TAO_Export CORBA::Boolean operator>>= (CORBA_Any_var &, CORBA::UShort &)
TAO_Export CORBA::Boolean operator>>= (CORBA_Any_var &, CORBA::Long &)
TAO_Export CORBA::Boolean operator>>= (CORBA_Any_var &, CORBA::ULong &)
TAO_Export CORBA::Boolean operator>>= (CORBA_Any_var &, CORBA::LongLong &)
TAO_Export CORBA::Boolean operator>>= (CORBA_Any_var &, CORBA::ULongLong &)
TAO_Export CORBA::Boolean operator>>= (CORBA_Any_var &, CORBA::Float &)
TAO_Export CORBA::Boolean operator>>= (CORBA_Any_var &, CORBA::Double &)
TAO_Export CORBA::Boolean operator>>= (CORBA_Any_var &, CORBA_Any &)
TAO_Export CORBA::Boolean operator>>= (CORBA_Any_var &, CORBA::TypeCode_ptr &)
TAO_Export CORBA::Boolean operator>>= (CORBA_Any_var &, const char *&)
TAO_Export CORBA::Boolean operator>>= (CORBA_Any_var &, const CORBA::WChar *&)
TAO_Export CORBA::Boolean operator>>= (CORBA_Any_var &, CORBA::Any::to_boolean)


Detailed Description

Id:
Any.h,v 1.1.1.4.2.1 2003/04/10 14:04:02 phil Exp

Author:
Copyright 1994-1995 by Sun Microsystems Inc. , Aniruddha Gokhale

Definition in file Any.h.


Function Documentation

TAO_Export CORBA::Boolean operator<< TAO_OutputCDR   cdr,
const CORBA::Any   x
 

TAO_Export void operator<<= CORBA_Any_var  ,
CORBA::Any::from_boolean   
 

Definition at line 205 of file Any.i.

00206 {
00207   lhs.inout () <<= rhs;
00208 }

TAO_Export void operator<<= CORBA_Any_var  ,
const char *   
 

Definition at line 187 of file Any.i.

00188 {
00189   lhs.inout () <<= rhs;
00190 }

TAO_Export void operator<<= CORBA_Any_var  ,
const CORBA_Any  
 

Definition at line 181 of file Any.i.

00182 {
00183   lhs.inout () <<= rhs;
00184 }

TAO_Export void operator<<= CORBA_Any_var  ,
CORBA::Short   
 

Definition at line 133 of file Any.i.

00134 {
00135   lhs.inout () <<= rhs;
00136 }

TAO_Export CORBA::Boolean operator>> TAO_InputCDR   cdr,
CORBA::Any   x
 

Definition at line 1891 of file Any.cpp.

01892 {
01893   CORBA::TypeCode_var tc;
01894 
01895   if (!(cdr >> tc.out ()))
01896     {
01897       return 0;
01898     }
01899 
01900   ACE_TRY_NEW_ENV
01901     {
01902       // @@ (JP) The following code depends on the fact that
01903       //         TAO_InputCDR does not contain chained message blocks,
01904       //         otherwise <begin> and <end> could be part of
01905       //         different buffers!
01906 
01907       // This will be the start of a new message block.
01908       char *begin = cdr.rd_ptr ();
01909 
01910       // Skip over the next aregument.
01911       CORBA::TypeCode::traverse_status status =
01912         TAO_Marshal_Object::perform_skip (tc.in (),
01913                                           &cdr
01914                                           ACE_ENV_ARG_PARAMETER);
01915       ACE_TRY_CHECK;
01916 
01917       if (status != CORBA::TypeCode::TRAVERSE_CONTINUE)
01918         {
01919           return 0;
01920         }
01921 
01922       // This will be the end of the new message block.
01923       char *end = cdr.rd_ptr ();
01924 
01925       // The ACE_CDR::mb_align() call can shift the rd_ptr by up to
01926       // ACE_CDR::MAX_ALIGNMENT-1 bytes. Similarly, the offset adjustment
01927       // can move the rd_ptr by up to the same amount. We accommodate
01928       // this by including 2 * ACE_CDR::MAX_ALIGNMENT bytes of additional
01929       // space in the message block.
01930       size_t size = end - begin;
01931       ACE_Message_Block mb (size + 2 * ACE_CDR::MAX_ALIGNMENT);
01932       ACE_CDR::mb_align (&mb);
01933       ptr_arith_t offset = ptr_arith_t (begin) % ACE_CDR::MAX_ALIGNMENT;
01934       mb.rd_ptr (offset);
01935       mb.wr_ptr (offset + size);
01936       ACE_OS::memcpy (mb.rd_ptr (), begin, size);
01937 
01938       x.char_translator_ = cdr.char_translator();
01939       x.wchar_translator_ = cdr.wchar_translator();
01940 
01941       // Stick it into the Any. It gets duplicated there.
01942       x._tao_replace (tc.in (),
01943                       cdr.byte_order (),
01944                       &mb);
01945     }
01946   ACE_CATCH (CORBA_Exception, ex)
01947     {
01948       return 0;
01949     }
01950   ACE_ENDTRY;
01951 
01952   return 1;
01953 }

TAO_Export CORBA::Boolean operator>>= CORBA_Any_var  ,
CORBA::Any::to_boolean   
 

Definition at line 317 of file Any.i.

00318 {
00319   return lhs.inout () >>= rhs;
00320 }

TAO_Export CORBA::Boolean operator>>= CORBA_Any_var  ,
const CORBA::WChar *&   
 

Definition at line 311 of file Any.i.

00312 {
00313   return lhs.inout () >>= rhs;
00314 }

TAO_Export CORBA::Boolean operator>>= CORBA_Any_var  ,
const char *&   
 

Definition at line 305 of file Any.i.

References ACE_ENV_ARG_DECL_WITH_DEFAULTS.

00306 {
00307   return lhs.inout () >>= rhs;
00308 }

TAO_Export CORBA::Boolean operator>>= CORBA_Any_var  ,
CORBA::TypeCode_ptr  
 

Definition at line 299 of file Any.i.

00300 {
00301   return lhs.inout () >>= rhs;
00302 }

TAO_Export CORBA::Boolean operator>>= CORBA_Any_var  ,
CORBA_Any  
 

Definition at line 293 of file Any.i.

00294 {
00295   return lhs.inout () >>= rhs;
00296 }

TAO_Export CORBA::Boolean operator>>= CORBA_Any_var  ,
CORBA::Double  
 

Definition at line 287 of file Any.i.

00288 {
00289   return lhs.inout () >>= rhs;
00290 }

TAO_Export CORBA::Boolean operator>>= CORBA_Any_var  ,
CORBA::Float  
 

Definition at line 281 of file Any.i.

00282 {
00283   return lhs.inout () >>= rhs;
00284 }

TAO_Export CORBA::Boolean operator>>= CORBA_Any_var  ,
CORBA::ULongLong  
 

Definition at line 275 of file Any.i.

00276 {
00277   return lhs.inout () >>= rhs;
00278 }

TAO_Export CORBA::Boolean operator>>= CORBA_Any_var  ,
CORBA::LongLong  
 

Definition at line 269 of file Any.i.

00270 {
00271   return lhs.inout () >>= rhs;
00272 }

TAO_Export CORBA::Boolean operator>>= CORBA_Any_var  ,
CORBA::ULong  
 

Definition at line 263 of file Any.i.

References TAO_Export.

00264 {
00265   return lhs.inout () >>= rhs;
00266 }

TAO_Export CORBA::Boolean operator>>= CORBA_Any_var  ,
CORBA::Long  
 

Definition at line 257 of file Any.i.

References TAO_Export.

00258 {
00259   return lhs.inout () >>= rhs;
00260 }

TAO_Export CORBA::Boolean operator>>= CORBA_Any_var  ,
CORBA::UShort  
 

Definition at line 251 of file Any.i.

00252 {
00253   return lhs.inout () >>= rhs;
00254 }

TAO_Export CORBA::Boolean operator>>= CORBA_Any_var  ,
CORBA::Short  
 

Definition at line 245 of file Any.i.

00246 {
00247   return lhs.inout () >>= rhs;
00248 }


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