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

CORBA_String.cpp File Reference

#include "tao_pch.h"
#include "tao/CORBA_String.h"
#include "tao/CORBA_String.inl"

Include dependency graph for CORBA_String.cpp:

Include dependency graph

Go to the source code of this file.

Functions

const char * get_rcsid_tao_CORBA_String (const char *)
ostream & operator<< (ostream &os, const CORBA::String_var &sv)
istream & operator>> (istream &is, CORBA::String_var &sv)
ostream & operator<< (ostream &os, CORBA::String_out &so)
istream & operator>> (istream &is, CORBA::String_out &so)
ostream & operator<< (ostream &os, const CORBA::WString_var &wsv)
istream & operator>> (istream &is, CORBA::WString_var &wsv)
ostream & operator<< (ostream &os, CORBA::WString_out &wso)
istream & operator>> (istream &is, CORBA::WString_out &wso)

Variables

const char * rcsid_tao_CORBA_String = get_rcsid_tao_CORBA_String ( rcsid_tao_CORBA_String )


Function Documentation

const char* get_rcsid_tao_CORBA_String const char *    [inline, static]
 

Definition at line 11 of file CORBA_String.cpp.

00011 : CORBA_String.cpp,v 1.1.1.2.2.1 2003/03/14 16:05:12 chad Exp $")

ostream& operator<< ostream &    os,
CORBA::WString_out   wso
 

Definition at line 202 of file CORBA_String.cpp.

References ACE_OS::wslen.

00203 {
00204   CORBA::WChar *tmp = wso.ptr ();
00205   CORBA::ULong len = ACE_OS::wslen (tmp);
00206 
00207   for (CORBA::ULong i = 0; i < len; ++i)
00208     {
00209       os << tmp[i];
00210     }
00211 
00212   return os;
00213 }

ostream& operator<< ostream &    os,
const CORBA::WString_var   wsv
 

Definition at line 164 of file CORBA_String.cpp.

References ACE_OS::wslen.

00165 {
00166   CORBA::ULong len = ACE_OS::wslen (wsv.in ());
00167 
00168   for (CORBA::ULong i = 0; i < len; ++i)
00169     {
00170       os << wsv[i];
00171     }
00172 
00173   return os;
00174 }

ostream& operator<< ostream &    os,
CORBA::String_out   so
 

Definition at line 143 of file CORBA_String.cpp.

00144 {
00145   os << so.ptr ();
00146   return os;
00147 }

ostream& operator<< ostream &    os,
const CORBA::String_var   sv
 

Definition at line 126 of file CORBA_String.cpp.

00127 {
00128   os << sv.in ();
00129   return os;
00130 }

istream& operator>> istream &    is,
CORBA::WString_out   wso
 

Definition at line 216 of file CORBA_String.cpp.

References CORBA::wstring_alloc.

00217 {
00218   is.seekg (0, ios::end);
00219   // @@ is.tellg()/sizeof(CORBA::WChar) instead?
00220   CORBA::ULong len = is.tellg ();
00221   wso = CORBA::wstring_alloc (len);
00222   is.seekg (0, ios::beg);
00223 
00224   for (CORBA::ULong i = 0; i < len; ++i)
00225     {
00226       CORBA::WChar wc = 0;
00227 
00228       // Unformatted input is used to work around overloaded
00229       // extraction operator (>>) ambiguities on some platforms.
00230       is.read (ACE_reinterpret_cast (char *, &wc), sizeof (wc));
00231 
00232       wso.ptr ()[i] = wc;
00233     }
00234 
00235   wso.ptr ()[len] = 0;  // NULL terminate
00236 
00237   return is;
00238 }

istream& operator>> istream &    is,
CORBA::WString_var   wsv
 

Definition at line 177 of file CORBA_String.cpp.

References CORBA::wstring_alloc.

00178 {
00179   is.seekg (0, ios::end);
00180   // @@ is.tellg()/sizeof(CORBA::WChar) instead?
00181   CORBA::ULong len = is.tellg ();
00182   wsv = CORBA::wstring_alloc (len);
00183   is.seekg (0, ios::beg);
00184 
00185   for (CORBA::ULong i = 0; i < len; ++i)
00186     {
00187       CORBA::WChar wc = 0;
00188 
00189       // Unformatted input is used to work around overloaded
00190       // extraction operator (>>) ambiguities on some platforms.
00191       is.read (ACE_reinterpret_cast (char *, &wc), sizeof (wc));
00192 
00193       wsv[i] = wc;
00194     }
00195 
00196   wsv[len] = 0;  // NULL terminate
00197 
00198   return is;
00199 }

istream& operator>> istream &    is,
CORBA::String_out   so
 

Definition at line 150 of file CORBA_String.cpp.

References CORBA::string_alloc.

00151 {
00152   is.seekg (0, ios::end);
00153   so = CORBA::string_alloc (is.tellg ());
00154   is.seekg (0, ios::beg);
00155   is >> so.ptr ();
00156   return is;
00157 }

istream& operator>> istream &    is,
CORBA::String_var   sv
 

Definition at line 133 of file CORBA_String.cpp.

References CORBA::string_alloc.

00134 {
00135   is.seekg (0, ios::end);
00136   sv = CORBA::string_alloc (is.tellg ());
00137   is.seekg (0, ios::beg);
00138   is >> sv.inout ();
00139   return is;
00140 }


Variable Documentation

const char* rcsid_tao_CORBA_String = get_rcsid_tao_CORBA_String ( rcsid_tao_CORBA_String ) [static]
 

Definition at line 11 of file CORBA_String.cpp.


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