Principal.cpp File Reference

#include "tao/Principal.h"
#include "tao/CDR.h"
#include "tao/Principal.inl"

Include dependency graph for Principal.cpp:

Go to the source code of this file.

Functions

CORBA::Boolean operator<< (TAO_OutputCDR &cdr, CORBA::Principal *x)
CORBA::Boolean operator>> (TAO_InputCDR &cdr, CORBA::Principal *&x)


Function Documentation

CORBA::Boolean operator<< ( TAO_OutputCDR cdr,
CORBA::Principal x 
)

Definition at line 31 of file Principal.cpp.

00032 {
00033   if (x != 0)
00034     {
00035       CORBA::ULong length  = x->id.length ();
00036       cdr.write_long (length);
00037       cdr.write_octet_array (x->id.get_buffer (), length);
00038     }
00039   else
00040     {
00041       cdr.write_ulong (0);
00042     }
00043 
00044   return (CORBA::Boolean) cdr.good_bit ();
00045 }

CORBA::Boolean operator>> ( TAO_InputCDR cdr,
CORBA::Principal *&  x 
)

Definition at line 48 of file Principal.cpp.

00049 {
00050   CORBA::ULong length;
00051   cdr.read_ulong (length);
00052 
00053   if (length == 0 || !cdr.good_bit ())
00054     {
00055       x = 0;
00056     }
00057   else
00058     {
00059       ACE_NEW_RETURN (x, CORBA::Principal, 0);
00060       x->id.length (length);
00061       cdr.read_octet_array (x->id.get_buffer (), length);
00062     }
00063 
00064   return (CORBA::Boolean) cdr.good_bit ();
00065 }


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