#include "tao/Basic_Types.h"
#include "tao/String_Traits_Base_T.h"
#include "ace/iosfwd.h"
#include <algorithm>
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.
Namespaces | |
namespace | TAO |
namespace | CORBA |
Classes | |
class | TAO::String_var< charT > |
class | TAO::String_out< charT > |
String_out. More... | |
struct | TAO::String_Var_Equal_To |
Typedefs | |
typedef TAO::String_var< char > | CORBA::String_var |
typedef TAO::String_out< char > | CORBA::String_out |
typedef TAO::String_var< CORBA::WChar > | CORBA::WString_var |
typedef TAO::String_out< CORBA::WChar > | CORBA::WString_out |
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 &) |
Header file for the CORBA string types.
Definition in file CORBA_String.h.
TAO_Export ostream& operator<< | ( | ostream & | , | |
CORBA::WString_out & | ||||
) |
Definition at line 105 of file CORBA_String.cpp.
References ACE_OS::strlen().
00106 { 00107 CORBA::WChar *tmp = wso.ptr (); 00108 const size_t len = ACE_OS::strlen (tmp); 00109 00110 for (size_t i = 0; i < len; ++i) 00111 { 00112 os << tmp[i]; 00113 } 00114 00115 return os; 00116 }
TAO_Export ostream& operator<< | ( | ostream & | , | |
const CORBA::WString_var & | ||||
) |
Definition at line 66 of file CORBA_String.cpp.
References ACE_OS::strlen().
00067 { 00068 CORBA::ULong const len = 00069 static_cast <CORBA::ULong> (ACE_OS::strlen (wsv.in ())); 00070 00071 for (CORBA::ULong i = 0; i < len; ++i) 00072 { 00073 os << wsv[i]; 00074 } 00075 00076 return os; 00077 }
TAO_Export ostream& operator<< | ( | ostream & | , | |
CORBA::String_out & | ||||
) |
TAO_Export ostream& operator<< | ( | ostream & | , | |
const CORBA::String_var & | ||||
) |
TAO_Export istream& operator>> | ( | istream & | , | |
CORBA::WString_out & | ||||
) |
Definition at line 119 of file CORBA_String.cpp.
References CORBA::wstring_alloc().
00120 { 00121 is.seekg (0, ios::end); 00122 // @@ is.tellg()/sizeof(CORBA::WChar) instead? 00123 const CORBA::ULong len = is.tellg (); 00124 wso = CORBA::wstring_alloc (len); 00125 is.seekg (0, ios::beg); 00126 00127 for (CORBA::ULong i = 0; i < len; ++i) 00128 { 00129 CORBA::WChar wc = 0; 00130 00131 // Unformatted input is used to work around overloaded 00132 // extraction operator (>>) ambiguities on some platforms. 00133 is.read (reinterpret_cast<char *> (&wc), sizeof (wc)); 00134 00135 wso.ptr ()[i] = wc; 00136 } 00137 00138 wso.ptr ()[len] = 0; // NULL terminate 00139 00140 return is; 00141 }
TAO_Export istream& operator>> | ( | istream & | , | |
CORBA::WString_var & | ||||
) |
Definition at line 80 of file CORBA_String.cpp.
References CORBA::wstring_alloc().
00081 { 00082 is.seekg (0, ios::end); 00083 // @@ is.tellg()/sizeof(CORBA::WChar) instead? 00084 CORBA::ULong const len = is.tellg (); 00085 wsv = CORBA::wstring_alloc (len); 00086 is.seekg (0, ios::beg); 00087 00088 for (CORBA::ULong i = 0; i < len; ++i) 00089 { 00090 CORBA::WChar wc = 0; 00091 00092 // Unformatted input is used to work around overloaded 00093 // extraction operator (>>) ambiguities on some platforms. 00094 is.read (reinterpret_cast<char *> (&wc), sizeof (wc)); 00095 00096 wsv[i] = wc; 00097 } 00098 00099 wsv[len] = 0; // NULL terminate 00100 00101 return is; 00102 }
TAO_Export istream& operator>> | ( | istream & | , | |
CORBA::String_out & | ||||
) |
Definition at line 52 of file CORBA_String.cpp.
References CORBA::string_alloc().
00053 { 00054 is.seekg (0, ios::end); 00055 so = CORBA::string_alloc (is.tellg ()); 00056 is.seekg (0, ios::beg); 00057 is >> so.ptr (); 00058 return is; 00059 }
TAO_Export istream& operator>> | ( | istream & | , | |
CORBA::String_var & | ||||
) |
Definition at line 35 of file CORBA_String.cpp.
References CORBA::string_alloc().
00036 { 00037 is.seekg (0, ios::end); 00038 sv = CORBA::string_alloc (is.tellg ()); 00039 is.seekg (0, ios::beg); 00040 is >> sv.inout (); 00041 return is; 00042 }