Functions

Principal.cpp File Reference

#include "tao/Principal.h"
#include "tao/CDR.h"
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.

{
  if (x != 0)
    {
      CORBA::ULong length  = x->id.length ();
      cdr.write_long (length);
      cdr.write_octet_array (x->id.get_buffer (), length);
    }
  else
    {
      cdr.write_ulong (0);
    }

  return (CORBA::Boolean) cdr.good_bit ();
}

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

Definition at line 48 of file Principal.cpp.

{
  CORBA::ULong length;
  cdr.read_ulong (length);

  if (length == 0 || !cdr.good_bit ())
    {
      x = 0;
    }
  else
    {
      ACE_NEW_RETURN (x, CORBA::Principal, 0);
      x->id.length (length);
      cdr.read_octet_array (x->id.get_buffer (), length);
    }

  return (CORBA::Boolean) cdr.good_bit ();
}

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines