#include <SString.h>
Collaboration diagram for ACE_WString:
Public Methods | |
ACE_WString (ACE_Allocator *alloc = 0) | |
Default constructor. | |
ACE_WString (const char *s, ACE_Allocator *alloc = 0) | |
Constructor that copies <s> into dynamically allocated memory. | |
ACE_WString (const ACE_WSTRING_TYPE *s, ACE_Allocator *alloc = 0) | |
Constructor that copies <s> into dynamically allocated memory. | |
ACE_WString (const ACE_USHORT16 *s, size_t len, ACE_Allocator *alloc = 0) | |
Constructor that takes in a ushort16 string (mainly used by the ACE Name_Space classes). | |
ACE_WString (const ACE_WSTRING_TYPE *s, size_t len, ACE_Allocator *alloc = 0) | |
Constructor that copies <len> ACE_WSTRING_TYPE's of <s> into dynamically allocated memory (will NUL terminate the result). | |
ACE_WString (size_t len, ACE_Allocator *alloc = 0) | |
Constructor that dynamically allocates memory for <len> + 1 ACE_WSTRING_TYPE characters. The newly created memory is set memset to 0. | |
ACE_WString (const ACE_WString &s) | |
Copy constructor. | |
ACE_WString (ACE_WSTRING_TYPE c, ACE_Allocator *alloc = 0) | |
Constructor that copies <c> into dynamically allocated memory. | |
~ACE_WString (void) | |
Deletes the memory... | |
ACE_WSTRING_TYPE | operator[] (size_t slot) const |
Return the <slot'th> character in the string (doesn't perform bounds checking). | |
ACE_WSTRING_TYPE& | operator[] (size_t slot) |
Return the <slot'th> character by reference in the string (doesn't perform bounds checking). | |
ACE_WString& | operator= (const ACE_WString &) |
Assignment operator(does copy memory). | |
void | set (const ACE_WSTRING_TYPE *s) |
Copy <s>. | |
void | set (const ACE_WSTRING_TYPE *s, size_t len) |
Copy <len> bytes of <s> (will NUL terminate the result). | |
void | clear () |
Clear this string. | |
ACE_WString | substring (size_t offset, ssize_t length = -1) const |
ACE_WString | substr (size_t offset, ssize_t length = -1) const |
Same as substring. | |
ACE_WString& | operator+= (const ACE_WString &) |
Concat operator(does copy memory). | |
ACE_WString& | operator+= (const ACE_WSTRING_TYPE *) |
Concat operator(does copy memory). | |
u_long | hash (void) const |
Returns a hash value for this string. | |
size_t | length (void) const |
Return the length of the string. | |
size_t | buffer_size (void) const |
Return the size of the buffer. | |
ACE_WSTRING_TYPE* | rep (void) const |
Gets a copy of the underlying pointer. | |
char* | char_rep (void) const |
Transform into a copy of the ASCII character representation. (caller must delete). | |
ACE_USHORT16* | ushort_rep (void) const |
Transform into a copy of a USHORT16 representation (caller must delete). Note, behavior is undefined when sizeof (wchar_t) != 2. | |
const ACE_WSTRING_TYPE* | fast_rep (void) const |
Get at the underlying representation directly! | |
const ACE_WSTRING_TYPE* | c_str (void) const |
Same as STL String's <c_str> and <fast_rep>. | |
int | strstr (const ACE_WString &s) const |
Comparison operator that will match substrings. Returns the slot of the first location that matches, else -1. | |
int | find (const ACE_WString &str, int pos = 0) const |
Find <str> starting at pos. Returns the slot of the first location that matches (will be >= pos), else npos. | |
int | find (const ACE_WSTRING_TYPE *s, int pos = 0) const |
Find <s> starting at pos. Returns the slot of the first location that matches (will be >= pos), else npos. | |
int | find (ACE_WSTRING_TYPE c, int pos = 0) const |
Find <c> starting at pos. Returns the slot of the first location that matches (will be >= pos), else npos. | |
int | rfind (ACE_WSTRING_TYPE c, int pos = npos) const |
Find <c> starting at pos (counting from the end). Returns the slot of the first location that matches, else npos. | |
int | operator== (const ACE_WString &s) const |
Equality comparison operator(must match entire string). | |
int | operator< (const ACE_WString &s) const |
Less than comparison operator. | |
int | operator> (const ACE_WString &s) const |
Greater than comparison operator. | |
int | operator!= (const ACE_WString &s) const |
Inequality comparison operator. | |
int | compare (const ACE_WString &s) const |
Performs a <strcmp>-style comparison. | |
void | dump (void) const |
Dump the state of an object. | |
void | resize (size_t len) |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
Static Public Methods | |
size_t | strlen (const ACE_WSTRING_TYPE *) |
Computes the length of a "0" terminated ACE_WSTRING_TYPE *. | |
const ACE_WSTRING_TYPE* | strstr (const ACE_WSTRING_TYPE *s1, const ACE_WSTRING_TYPE *s2) |
Traditional style strstr. | |
Static Public Attributes | |
const int | npos |
No position constant. | |
Private Methods | |
void | check_allocate (size_t len) |
Private Attributes | |
ACE_Allocator* | allocator_ |
Pointer to a memory allocator. | |
size_t | buf_len_ |
Size of the buffer of the ACE_WString. | |
size_t | len_ |
Length of the ACE_WString. | |
ACE_WSTRING_TYPE* | rep_ |
Pointer to data. | |
Static Private Attributes | |
ACE_WSTRING_TYPE | NULL_WString_ |
Represents the "NULL" string to simplify the internal logic. |
This class uses an to allocate memory. The user can make this a persistant class by providing an with a persistable memory pool. This class is optimized for efficiency, so it doesn't provide any internal locking.
|
Default constructor.
|
|
Constructor that copies <s> into dynamically allocated memory.
|
|
Constructor that copies <s> into dynamically allocated memory.
|
|
Constructor that takes in a ushort16 string (mainly used by the ACE Name_Space classes).
|
|
Constructor that copies <len> ACE_WSTRING_TYPE's of <s> into dynamically allocated memory (will NUL terminate the result).
|
|
Constructor that dynamically allocates memory for <len> + 1 ACE_WSTRING_TYPE characters. The newly created memory is set memset to 0.
|
|
Copy constructor.
|
|
Constructor that copies <c> into dynamically allocated memory.
|
|
Deletes the memory...
|
|
Return the size of the buffer.
|
|
Same as STL String's <c_str> and <fast_rep>.
|
|
Transform into a copy of the ASCII character representation. (caller must delete).
|
|
This method checks the size of the buffer. If the size of the buffer is not large enough the buffer will be resized. All new allocated space is zero'd out after this operation. |
|
Clear this string.
|
|
Performs a <strcmp>-style comparison.
|
|
Dump the state of an object.
|
|
Get at the underlying representation directly!
|
|
Find <c> starting at pos. Returns the slot of the first location that matches (will be >= pos), else npos.
|
|
Find <s> starting at pos. Returns the slot of the first location that matches (will be >= pos), else npos.
|
|
Find <str> starting at pos. Returns the slot of the first location that matches (will be >= pos), else npos.
|
|
Returns a hash value for this string.
|
|
Return the length of the string.
|
|
Inequality comparison operator.
|
|
Concat operator(does copy memory).
|
|
Concat operator(does copy memory).
|
|
Less than comparison operator.
|
|
Assignment operator(does copy memory).
|
|
Equality comparison operator(must match entire string).
|
|
Greater than comparison operator.
|
|
Return the <slot'th> character by reference in the string (doesn't perform bounds checking).
|
|
Return the <slot'th> character in the string (doesn't perform bounds checking).
|
|
Gets a copy of the underlying pointer.
|
|
This method is designed for high-performance. Please use with care ;-) If the current size of the string is less than <len>, the string is resized to the new length. The data is zero'd out after this operation. |
|
Find <c> starting at pos (counting from the end). Returns the slot of the first location that matches, else npos.
|
|
Copy <len> bytes of <s> (will NUL terminate the result).
|
|
Copy <s>.
|
|
Computes the length of a "0" terminated ACE_WSTRING_TYPE *.
|
|
Traditional style strstr.
|
|
Comparison operator that will match substrings. Returns the slot of the first location that matches, else -1.
|
|
Same as substring.
|
|
Return a substring given an offset and length, if length == -1 use rest of str return empty substring if offset or offset/length are invalid. |
|
Transform into a copy of a USHORT16 representation (caller must delete). Note, behavior is undefined when sizeof (wchar_t) != 2.
|
|
Declare the dynamic allocation hooks.
|
|
Represents the "NULL" string to simplify the internal logic.
|
|
Pointer to a memory allocator.
|
|
Size of the buffer of the ACE_WString.
|
|
Length of the ACE_WString.
|
|
No position constant.
|
|
Pointer to data.
|