Classes | Namespaces | Functions

CORBA_String.h File Reference

#include "tao/Basic_Types.h"
#include "tao/String_Traits_Base_T.h"
#include "ace/iosfwd.h"
#include <algorithm>
#include "tao/CORBA_String.inl"
Include dependency graph for CORBA_String.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TAO::String_var< charT >
class  TAO::String_out< charT >
 String_out. More...
struct  TAO::String_Var_Equal_To

Namespaces

namespace  TAO
 

Define symbolic names for the ORB collocation strategies.


namespace  CORBA
 

FUZZ: disable check_for_include/.


Functions

TAO_Export ostream & operator<< (ostream &, const CORBA::String_var &)
TAO_Export istream & operator>> (istream &, CORBA::String_var &)
TAO_Export ostream & operator<< (ostream &, CORBA::String_out &)
TAO_Export istream & operator>> (istream &, CORBA::String_out &)
TAO_Export ostream & operator<< (ostream &, const CORBA::WString_var &)
TAO_Export istream & operator>> (istream &, CORBA::WString_var &)
TAO_Export ostream & operator<< (ostream &, CORBA::WString_out &)
TAO_Export istream & operator>> (istream &, CORBA::WString_out &)

Detailed Description

Id:
CORBA_String.h 74014 2006-08-14 13:52:22Z johnnyw

Header file for the CORBA string types.

Author:
DOC Group at Wash U, UCI, and Vanderbilt U.

Definition in file CORBA_String.h.


Function Documentation

TAO_Export ostream& operator<< ( ostream &  ,
const CORBA::String_var  
)

Definition at line 28 of file CORBA_String.cpp.

{
  os << sv.in ();
  return os;
}

TAO_Export ostream& operator<< ( ostream &  ,
const CORBA::WString_var  
)

Definition at line 66 of file CORBA_String.cpp.

{
  CORBA::ULong const len =
    static_cast <CORBA::ULong> (ACE_OS::strlen (wsv.in ()));

  for (CORBA::ULong i = 0; i < len; ++i)
    {
      os << wsv[i];
    }

  return os;
}

TAO_Export ostream& operator<< ( ostream &  ,
CORBA::WString_out  
)

Definition at line 105 of file CORBA_String.cpp.

{
  CORBA::WChar *tmp = wso.ptr ();
  const size_t len = ACE_OS::strlen (tmp);

  for (size_t i = 0; i < len; ++i)
    {
      os << tmp[i];
    }

  return os;
}

TAO_Export ostream& operator<< ( ostream &  ,
CORBA::String_out  
)

Definition at line 45 of file CORBA_String.cpp.

{
  os << so.ptr ();
  return os;
}

TAO_Export istream& operator>> ( istream &  ,
CORBA::String_var  
)

Definition at line 35 of file CORBA_String.cpp.

{
  is.seekg (0, ios::end);
  sv = CORBA::string_alloc (is.tellg ());
  is.seekg (0, ios::beg);
  is >> sv.inout ();
  return is;
}

TAO_Export istream& operator>> ( istream &  ,
CORBA::String_out  
)

Definition at line 52 of file CORBA_String.cpp.

{
  is.seekg (0, ios::end);
  so = CORBA::string_alloc (is.tellg ());
  is.seekg (0, ios::beg);
  is >> so.ptr ();
  return is;
}

TAO_Export istream& operator>> ( istream &  ,
CORBA::WString_var  
)

Definition at line 80 of file CORBA_String.cpp.

{
  is.seekg (0, ios::end);
  // @@ is.tellg()/sizeof(CORBA::WChar) instead?
  CORBA::ULong const len = is.tellg ();
  wsv = CORBA::wstring_alloc (len);
  is.seekg (0, ios::beg);

  for (CORBA::ULong i = 0; i < len; ++i)
    {
      CORBA::WChar wc = 0;

      // Unformatted input is used to work around overloaded
      // extraction operator (>>) ambiguities on some platforms.
      is.read (reinterpret_cast<char *> (&wc), sizeof (wc));

      wsv[i] = wc;
    }

  wsv[len] = 0;  // NULL terminate

  return is;
}

TAO_Export istream& operator>> ( istream &  ,
CORBA::WString_out  
)

Definition at line 119 of file CORBA_String.cpp.

{
  is.seekg (0, ios::end);
  // @@ is.tellg()/sizeof(CORBA::WChar) instead?
  const CORBA::ULong len = is.tellg ();
  wso = CORBA::wstring_alloc (len);
  is.seekg (0, ios::beg);

  for (CORBA::ULong i = 0; i < len; ++i)
    {
      CORBA::WChar wc = 0;

      // Unformatted input is used to work around overloaded
      // extraction operator (>>) ambiguities on some platforms.
      is.read (reinterpret_cast<char *> (&wc), sizeof (wc));

      wso.ptr ()[i] = wc;
    }

  wso.ptr ()[len] = 0;  // NULL terminate

  return is;
}

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines