|
Public Member Functions |
| | ACE_SString (ACE_Allocator *alloc=0) |
| | Default constructor.
|
| | ACE_SString (const char *s, ACE_Allocator *alloc=0) |
| | Constructor that copies s into dynamically allocated memory.
|
| | ACE_SString (const char *s, size_t len, ACE_Allocator *alloc=0) |
| | ACE_SString (const ACE_SString &) |
| | Copy constructor.
|
| | ACE_SString (char c, ACE_Allocator *alloc=0) |
| | Constructor that copies c into dynamically allocated memory.
|
| | ~ACE_SString (void) |
| | Default destructor.
|
| char | operator[] (size_t slot) const |
| char & | operator[] (size_t slot) |
| ACE_SString & | operator= (const ACE_SString &) |
| | Assignment operator (does copy memory).
|
| ACE_SString | substring (size_t offset, ssize_t length=-1) const |
| ACE_SString | substr (size_t offset, ssize_t length=-1) const |
| | Same as substring.
|
| u_long | hash (void) const |
| | Returns a hash value for this string.
|
| size_t | length (void) const |
| | Return the length of the string.
|
| void | rep (char *s) |
| const char * | rep (void) const |
| | Get the underlying pointer.
|
| const char * | fast_rep (void) const |
| | Get the underlying pointer.
|
| const char * | c_str (void) const |
| | Same as STL String's <c_str> and <fast_rep>.
|
| int | strstr (const ACE_SString &s) const |
| int | find (const ACE_SString &str, int pos=0) const |
| int | find (const char *s, int pos=0) const |
| int | find (char c, int pos=0) const |
| int | rfind (char c, int pos=npos) const |
| bool | operator== (const ACE_SString &s) const |
| | Equality comparison operator (must match entire string).
|
| bool | operator< (const ACE_SString &s) const |
| | Less than comparison operator.
|
| bool | operator> (const ACE_SString &s) const |
| | Greater than comparison operator.
|
| bool | operator!= (const ACE_SString &s) const |
| | Inequality comparison operator.
|
| int | compare (const ACE_SString &s) const |
| | Performs a <strcmp>-style comparison.
|
| void | dump (void) const |
| | Dump the state of an object.
|
Public Attributes |
| | ACE_ALLOC_HOOK_DECLARE |
| | Declare the dynamic allocation hooks.
|
Static Public Attributes |
| static const int | npos = -1 |
| | No position constant.
|
Private Attributes |
| ACE_Allocator * | allocator_ |
| | Pointer to a memory allocator.
|
| size_t | len_ |
| | Length of the ACE_SString (not counting the trailing '').
|
| char * | rep_ |
| | Pointer to data.
|
This class is optimized for efficiency, so it doesn't provide any internal locking. CAUTION: This class is only intended for use with applications that understand how it works. In particular, its destructor does not deallocate its memory when it is destroyed... We need this class since the ACE_Map_Manager requires an object that supports the operator == and operator !=. This class uses an ACE_Allocator to allocate memory. The user can make this a persistant class by providing an ACE_Allocator with a persistable memory pool.