#include <SString.h>
Inheritance diagram for ACE_NS_WString:


Public Member Functions | |
| ACE_NS_WString (ACE_Allocator *alloc=0) | |
| Default constructor. | |
| ACE_NS_WString (const char *s, ACE_Allocator *alloc=0) | |
| Constructor that copies s into dynamically allocated memory. | |
| ACE_NS_WString (const ACE_WSTRING_TYPE *s, ACE_Allocator *alloc=0) | |
| Constructor that copies s into dynamically allocated memory. | |
| ACE_NS_WString (const ACE_USHORT16 *s, size_type len, ACE_Allocator *alloc=0) | |
| ACE_NS_WString (const ACE_WSTRING_TYPE *s, size_type len, ACE_Allocator *alloc=0) | |
| ACE_NS_WString (size_type len, ACE_Allocator *alloc=0) | |
| ACE_NS_WString (const ACE_NS_WString &s) | |
| Copy constructor. | |
| ACE_NS_WString (ACE_WSTRING_TYPE c, ACE_Allocator *alloc=0) | |
| Constructor that copies c into dynamically allocated memory. | |
| char * | char_rep (void) const |
| ACE_USHORT16 * | ushort_rep (void) const |
Definition at line 52 of file SString.h.
|
|
Default constructor.
Definition at line 17 of file SString.inl. References ACE_WString.
00018 : ACE_WString (alloc) 00019 { 00020 } |
|
||||||||||||
|
Constructor that copies s into dynamically allocated memory.
Definition at line 114 of file SString.cpp. References ACE_ALLOCATOR, ACE_WString, ACE_WSTRING_TYPE, and ACE_OS::strlen().
00116 : ACE_WString (alloc) 00117 { 00118 if (s == 0) 00119 return; 00120 00121 this->len_ = this->buf_len_ = ACE_OS::strlen (s); 00122 00123 if (this->buf_len_ == 0) 00124 return; 00125 00126 ACE_ALLOCATOR (this->rep_, 00127 (ACE_WSTRING_TYPE *) 00128 this->allocator_->malloc ((this->buf_len_ + 1) * 00129 sizeof (ACE_WSTRING_TYPE))); 00130 this->release_ = 1; 00131 for (size_type i = 0; i <= this->buf_len_; ++i) 00132 this->rep_[i] = s[i]; 00133 } |
|
||||||||||||
|
Constructor that copies s into dynamically allocated memory.
Definition at line 31 of file SString.inl. References ACE_WString, and ACE_WSTRING_TYPE.
00033 : ACE_WString (s, alloc) 00034 { 00035 } |
|
||||||||||||||||
|
Constructor that takes in a ushort16 string (mainly used by the ACE Name_Space classes) Definition at line 136 of file SString.cpp. References ACE_ALLOCATOR, ACE_USHORT16, ACE_WString, and ACE_WSTRING_TYPE.
00139 : ACE_WString (alloc) 00140 { 00141 if (s == 0) 00142 return; 00143 00144 this->buf_len_ = len; 00145 00146 if (this->buf_len_ == 0) 00147 return; 00148 00149 ACE_ALLOCATOR (this->rep_, 00150 (ACE_WSTRING_TYPE *) 00151 this->allocator_->malloc ((this->buf_len_) * 00152 sizeof (ACE_WSTRING_TYPE))); 00153 this->release_ = 1; 00154 for (size_type i = 0; i < this->buf_len_; ++i) 00155 this->rep_[i] = s[i]; 00156 } |
|
||||||||||||||||
|
Constructor that copies len ACE_WSTRING_TYPE's of s into dynamically allocated memory (will NUL terminate the result). Definition at line 23 of file SString.inl. References ACE_WString, and ACE_WSTRING_TYPE.
00026 : ACE_WString (s, len, alloc) 00027 { 00028 } |
|
||||||||||||
|
Constructor that dynamically allocates memory for len + 1 ACE_WSTRING_TYPE characters. The newly created memory is set memset to 0. Definition at line 38 of file SString.inl. References ACE_WString.
00039 : ACE_WString (len, 0, alloc) 00040 { 00041 } |
|
|
Copy constructor.
Definition at line 44 of file SString.inl. References ACE_WString.
00045 : ACE_WString (s) 00046 { 00047 } |
|
||||||||||||
|
Constructor that copies c into dynamically allocated memory.
Definition at line 50 of file SString.inl. References ACE_WString, and ACE_WSTRING_TYPE.
00051 : ACE_WString (c, alloc) 00052 { 00053 } |
|
|
Transform into a copy of the ASCII character representation. (caller must delete) Definition at line 67 of file SString.cpp. References ACE_NEW_RETURN, and ACE_TRACE. Referenced by ACE_NS_String::char_rep(), ACE_Local_Name_Space<, ACE_LOCK >::list_type_entries_i(), ACE_Local_Name_Space<, ACE_LOCK >::list_types_i(), and ACE_Naming_Context::resolve().
00068 {
00069 ACE_TRACE ("ACE_NS_WString::char_rep");
00070 if (this->len_ == 0)
00071 return 0;
00072 else
00073 {
00074 char *t = 0;
00075
00076 ACE_NEW_RETURN (t,
00077 char[this->len_ + 1],
00078 0);
00079
00080 for (size_type i = 0; i < this->len_; ++i)
00081 // Note that this cast may lose data if wide chars are
00082 // actually used!
00083 t[i] = char (this->rep_[i]);
00084
00085 t[this->len_] = '\0';
00086 return t;
00087 }
00088 }
|
|
|
Transform into a copy of a USHORT16 representation (caller must delete). Note, behavior is undefined when sizeof (wchar_t) != 2. Definition at line 91 of file SString.cpp. References ACE_NEW_RETURN, ACE_TRACE, and ACE_USHORT16.
00092 {
00093 ACE_TRACE ("ACE_NS_WString::ushort_rep");
00094 if (this->len_ <= 0)
00095 return 0;
00096 else
00097 {
00098 ACE_USHORT16 *t = 0;
00099
00100 ACE_NEW_RETURN (t,
00101 ACE_USHORT16[this->len_ + 1],
00102 0);
00103
00104 for (size_type i = 0; i < this->len_; ++i)
00105 // Note that this cast may lose data if wide chars are
00106 // actually used!
00107 t[i] = (ACE_USHORT16)this->rep_[i];
00108
00109 t[this->len_] = 0;
00110 return t;
00111 }
00112 }
|
1.3.6