diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-20 05:11:47 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-20 05:11:47 +0000 |
commit | 2316a1f3555b996f9bb9093425380c2591620368 (patch) | |
tree | a352ed9f55d048f43cf0202c53c5c5716b54bf3f /TAO/tao/Principal.cpp | |
parent | 681d704df04173c7440ad354288e91b5c02dc6f5 (diff) | |
download | ATCD-2316a1f3555b996f9bb9093425380c2591620368.tar.gz |
ChangeLogTag:Sat Jun 20 00:00:56 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Principal.cpp')
-rw-r--r-- | TAO/tao/Principal.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/TAO/tao/Principal.cpp b/TAO/tao/Principal.cpp index 6e3748730a3..5798da4ad93 100644 --- a/TAO/tao/Principal.cpp +++ b/TAO/tao/Principal.cpp @@ -6,6 +6,10 @@ #include "tao/corba.h" +#if !defined (__ACE_INLINE__) +#include "tao/Principal.i" +#endif /* __ACE_INLINE__ */ + void CORBA::release (CORBA::Principal_ptr principal) { @@ -45,3 +49,37 @@ CORBA_Principal::Release (void) delete this; return 0; } + +TAO_OutputCDR& +operator<< (TAO_OutputCDR& cdr, CORBA_Principal* x) +{ + 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 cdr; +} + +TAO_InputCDR& +operator>> (TAO_InputCDR& cdr, CORBA_Principal*& x) +{ + CORBA::ULong length; + cdr.read_ulong (length); + if (length == 0 || !cdr.good_bit ()) + { + x = 0; + } + else + { + ACE_NEW_RETURN (x, CORBA::Principal, cdr); + x->id.length (length); + cdr.read_octet_array (x->id.get_buffer (), length); + } + return cdr; +} |