ACE  6.3.3
Public Types | Public Member Functions | Public Attributes | Protected Attributes | Static Protected Attributes | Friends | List of all members
ACE_String_Base< ACE_CHAR_T > Class Template Reference

This class provides a wrapper facade for C strings. More...

#include <String_Base.h>

Inheritance diagram for ACE_String_Base< ACE_CHAR_T >:
Inheritance graph
[legend]
Collaboration diagram for ACE_String_Base< ACE_CHAR_T >:
Collaboration graph
[legend]

Public Types

typedef ACE_String_Base_Iterator< ACE_CHAR_T > ITERATOR
 
typedef ACE_String_Base_Const_Iterator< ACE_CHAR_T > CONST_ITERATOR
 
typedef ACE_String_Base_Iterator< ACE_CHAR_T > iterator
 
typedef ACE_String_Base_Const_Iterator< ACE_CHAR_T > const_iterator
 
typedef ACE_Allocator::size_type size_type
 
- Public Types inherited from ACE_String_Base_Const
typedef ACE_Allocator::size_type size_type
 

Public Member Functions

 ACE_String_Base (ACE_Allocator *the_allocator=0)
 
 ACE_String_Base (const ACE_CHAR_T *s, ACE_Allocator *the_allocator=0, bool release=true)
 
 ACE_String_Base (const ACE_CHAR_T *s, size_type len, ACE_Allocator *the_allocator=0, bool release=true)
 
 ACE_String_Base (const ACE_String_Base< ACE_CHAR_T > &s)
 
 ACE_String_Base (ACE_CHAR_T c, ACE_Allocator *the_allocator=0)
 
 ACE_String_Base (size_type len, ACE_CHAR_T c=0, ACE_Allocator *the_allocator=0)
 
 ~ACE_String_Base (void)
 
const ACE_CHAR_T & operator[] (size_type slot) const
 
ACE_CHAR_T & operator[] (size_type slot)
 
ACE_String_Base< ACE_CHAR_T > & operator= (const ACE_CHAR_T *s)
 
ACE_String_Base< ACE_CHAR_T > & operator= (const ACE_String_Base< ACE_CHAR_T > &s)
 
ACE_String_Base< ACE_CHAR_T > & assign_nocopy (const ACE_String_Base< ACE_CHAR_T > &s)
 
void set (const ACE_CHAR_T *s, bool release=true)
 
void set (const ACE_CHAR_T *s, size_type len, bool release)
 
void clear (bool release=false)
 
void fast_clear (void)
 
ACE_String_Base< ACE_CHAR_T > substring (size_type offset, size_type length=npos) const
 
ACE_String_Base< ACE_CHAR_T > substr (size_type offset, size_type length=npos) const
 
ACE_String_Base< ACE_CHAR_T > & operator+= (const ACE_String_Base< ACE_CHAR_T > &s)
 
ACE_String_Base< ACE_CHAR_T > & operator+= (const ACE_CHAR_T *s)
 
ACE_String_Base< ACE_CHAR_T > & operator+= (const ACE_CHAR_T c)
 
ACE_String_Base< ACE_CHAR_T > & append (const ACE_CHAR_T *s, size_type slen)
 
u_long hash (void) const
 
size_type length (void) const
 
size_t capacity (void) const
 
bool is_empty (void) const
 
bool empty (void) const
 
ACE_CHAR_T * rep (void) const
 
const ACE_CHAR_T * fast_rep (void) const
 
const ACE_CHAR_T * c_str (void) const
 
size_type strstr (const ACE_String_Base< ACE_CHAR_T > &s) const
 
size_type find (const ACE_String_Base< ACE_CHAR_T > &str, size_type pos=0) const
 
size_type find (const ACE_CHAR_T *s, size_type pos=0) const
 
size_type find (ACE_CHAR_T c, size_type pos=0) const
 
size_type rfind (ACE_CHAR_T c, size_type pos=npos) const
 
bool operator== (const ACE_String_Base< ACE_CHAR_T > &s) const
 
bool operator== (const ACE_CHAR_T *s) const
 
bool operator< (const ACE_String_Base< ACE_CHAR_T > &s) const
 
bool operator> (const ACE_String_Base< ACE_CHAR_T > &s) const
 
bool operator!= (const ACE_String_Base< ACE_CHAR_T > &s) const
 
bool operator!= (const ACE_CHAR_T *s) const
 
int compare (const ACE_String_Base< ACE_CHAR_T > &s) const
 
void dump (void) const
 
void resize (size_type len, ACE_CHAR_T c=0)
 
void fast_resize (size_t len)
 
void swap (ACE_String_Base< ACE_CHAR_T > &str)
 Swap the contents of this ACE_String_Base with str. More...
 
iterator begin (void)
 
const_iterator begin (void) const
 
iterator end (void)
 
const_iterator end (void) const
 

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 

Protected Attributes

ACE_Allocatorallocator_
 
size_type len_
 
size_type buf_len_
 
ACE_CHAR_T * rep_
 
bool release_
 

Static Protected Attributes

static ACE_CHAR_T NULL_String_ = 0
 

Friends

class ACE_String_Base_Iterator< ACE_CHAR_T >
 
class ACE_String_Base_Const_Iterator< ACE_CHAR_T >
 

Additional Inherited Members

- Static Public Attributes inherited from ACE_String_Base_Const
static size_type const npos
 

Detailed Description

template<class ACE_CHAR_T>
class ACE_String_Base< ACE_CHAR_T >

This class provides a wrapper facade for C strings.

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. This class is optimized for efficiency, so it doesn't provide any internal locking.

Note
If an instance of this class is constructed from or assigned an empty string (with first element of '\0'), then it is not allocated new space. Instead, its internal representation is set equal to a global empty string. CAUTION: in cases when ACE_String_Base is constructed from a provided buffer with the release parameter set to false, ACE_String_Base is not guaranteed to be '\0' terminated.

Member Typedef Documentation

template<class ACE_CHAR_T>
typedef ACE_String_Base_Const_Iterator<ACE_CHAR_T> ACE_String_Base< ACE_CHAR_T >::CONST_ITERATOR
template<class ACE_CHAR_T>
typedef ACE_String_Base_Const_Iterator<ACE_CHAR_T> ACE_String_Base< ACE_CHAR_T >::const_iterator
template<class ACE_CHAR_T>
typedef ACE_String_Base_Iterator<ACE_CHAR_T> ACE_String_Base< ACE_CHAR_T >::ITERATOR
template<class ACE_CHAR_T>
typedef ACE_String_Base_Iterator<ACE_CHAR_T> ACE_String_Base< ACE_CHAR_T >::iterator
template<class ACE_CHAR_T>
typedef ACE_Allocator::size_type ACE_String_Base_Const::size_type

Constructor & Destructor Documentation

template<class ACE_CHAR_T >
ACE_String_Base< ACE_CHAR_T >::ACE_String_Base ( ACE_Allocator the_allocator = 0)

Default constructor.

Parameters
the_allocatorACE_Allocator associated with string
Returns
Default ACE_String_Base string.
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T >::ACE_String_Base ( const ACE_CHAR_T *  s,
ACE_Allocator the_allocator = 0,
bool  release = true 
)

Constructor that copies s into dynamically allocated memory.

if release == true then a new buffer is allocated internally, and s is copied to the internal buffer. if release == false then the s buffer is used directly. If s == 0 then it will not be used, and instead the internal buffer is set to NULL_String_.

Parameters
sZero terminated input string
the_allocatorACE_Allocator associated with string
releaseAllocator responsible(true)/not responsible(false) for freeing memory.
Returns
ACE_String_Base containing const ACE_CHAR_T *s
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T >::ACE_String_Base ( const ACE_CHAR_T *  s,
size_type  len,
ACE_Allocator the_allocator = 0,
bool  release = true 
)

Constructor that copies len CHARs of s into dynamically allocated memory (will zero terminate the result).

if release == true then a new buffer is allocated internally. s is copied to the internal buffer. if release == false then the s buffer is used directly. If s == 0 then it will not be used, and instead the internal buffer is set to NULL_String_.

Parameters
sNon-zero terminated input string
lenLength of non-zero terminated input string
the_allocatorACE_Allocator associated with string
releaseAllocator responsible(true)/not responsible(false) for freeing memory.
Returns
ACE_String_Base containing const ACE_CHAR_T *s
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T >::ACE_String_Base ( const ACE_String_Base< ACE_CHAR_T > &  s)

Copy constructor.

Parameters
sInput ACE_String_Base string to copy
Returns
Copy of input string s
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T >::ACE_String_Base ( ACE_CHAR_T  c,
ACE_Allocator the_allocator = 0 
)

Constructor that copies c into dynamically allocated memory.

Parameters
cSingle input character.
the_allocatorACE_Allocator associated with string
Returns
ACE_String_Base containing ACE_CHAR_T 'c'
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T >::ACE_String_Base ( size_type  len,
ACE_CHAR_T  c = 0,
ACE_Allocator the_allocator = 0 
)

Constructor that allocates a len long string.

Warning : This constructor was incorrectly documented in the past. It simply calls resize(len, c). It is probably not advisable to use the second parameter. See resize() for more information.

Parameters
lenAmount of space to reserve for the string.
cThe array is filled with c's
the_allocatorACE_Allocator associated with string
Returns
Empty ACE_String_Base with room for len CHARs
template<class ACE_CHAR_T >
ACE_String_Base< ACE_CHAR_T >::~ACE_String_Base ( void  )

Deletes the memory...

Member Function Documentation

template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T > & ACE_String_Base< ACE_CHAR_T >::append ( const ACE_CHAR_T *  s,
size_type  slen 
)

Append function (copies memory).

Parameters
sInput ACE_CHAR_T array to concatenate to this string.
slenThe length of the array.
Returns
The combined string (input append to the end of the old). New string is zero terminated.
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T > & ACE_String_Base< ACE_CHAR_T >::assign_nocopy ( const ACE_String_Base< ACE_CHAR_T > &  s)
inline

Assignment alternative method (does not copy memory).

Parameters
sInput ACE_String_Base string to assign to this object.
Returns
Return this string.
template<class ACE_CHAR_T >
ACE_String_Base< ACE_CHAR_T >::iterator ACE_String_Base< ACE_CHAR_T >::begin ( void  )
inline
template<class ACE_CHAR_T >
ACE_String_Base< ACE_CHAR_T >::const_iterator ACE_String_Base< ACE_CHAR_T >::begin ( void  ) const
inline
template<class ACE_CHAR_T >
const ACE_CHAR_T * ACE_String_Base< ACE_CHAR_T >::c_str ( void  ) const
inline

Same as STL String's c_str() and fast_rep().

template<class ACE_CHAR_T >
size_t ACE_String_Base< ACE_CHAR_T >::capacity ( void  ) const
inline

Return the number of allocated CHARs in the string object. This may be greater than the current length of the string.

Returns
Maximum number of ACE_CHAR_T units that can be stored, including any terminating nul that may be needed.
template<class ACE_CHAR_T >
void ACE_String_Base< ACE_CHAR_T >::clear ( bool  release = false)

Clear this string. Memory is not freed if release is false.

Warning: This method was incorrectly documented in the past, but the current implementation has been changed to match the documented behavior.

Warning: clear(false) behaves like fast_clear() below.

Parameters
releaseMemory is freed if true, and not freed if false.
template<class ACE_CHAR_T>
int ACE_String_Base< ACE_CHAR_T >::compare ( const ACE_String_Base< ACE_CHAR_T > &  s) const

Performs a strncmp comparison.

Parameters
sInput ACE_String_Base string to compare against stored string.
Returns
Integer value of result (less than 0, 0, greater than 0) depending on how input string s is to the stored string.
template<class ACE_CHAR_T >
void ACE_String_Base< ACE_CHAR_T >::dump ( void  ) const
inline

Dump the state of an object.

template<class ACE_CHAR_T >
bool ACE_String_Base< ACE_CHAR_T >::empty ( void  ) const
inline

Return true if the length of the string is zero, else false. We recommend using is_empty() instead since it's more consistent with the ACE container naming conventions.

template<class ACE_CHAR_T >
ACE_String_Base< ACE_CHAR_T >::iterator ACE_String_Base< ACE_CHAR_T >::end ( void  )
inline
template<class ACE_CHAR_T >
ACE_String_Base< ACE_CHAR_T >::const_iterator ACE_String_Base< ACE_CHAR_T >::end ( void  ) const
inline
template<class ACE_CHAR_T >
void ACE_String_Base< ACE_CHAR_T >::fast_clear ( void  )

A more specialized version of clear(): "fast clear". fast_clear() resets the string to 0 length. If the string owns the buffer (

  • release_== true):
    • the string buffer is not freed
    • the first character of the buffer is set to 0.

If

  • release_ is false (this object does not own the buffer):
    • the buffer pointer is reset to the NULL_String_ and does not maintain a pointer to the caller-supplied buffer on return
    • the maximum string length is reset to 0.

Warning : Calling clear(false) or fast_clear() can have unintended side-effects if the string was constructed (or set()) with an external buffer. The string will be disassociated with the buffer and the next append() or +=() will cause a new buffer to be allocated internally.

template<class ACE_CHAR_T >
const ACE_CHAR_T * ACE_String_Base< ACE_CHAR_T >::fast_rep ( void  ) const
inline

Get at the underlying representation directly! Don't even think about casting the result to (char *) and modifying it, if it has length 0!

Returns
Pointer reference to the stored string data. No guarantee is that the string is zero terminated.
template<class ACE_CHAR_T >
void ACE_String_Base< ACE_CHAR_T >::fast_resize ( size_t  len)
template<class ACE_CHAR_T>
size_type ACE_String_Base< ACE_CHAR_T >::find ( const ACE_String_Base< ACE_CHAR_T > &  str,
size_type  pos = 0 
) const

Find str starting at pos. Returns the slot of the first location that matches (will be >= pos), else npos.

Parameters
strInput ACE_String_Base string to search for in stored string.
posStarting index position to start searching for string str.
Returns
Index value of the first location of string str else npos.
template<class ACE_CHAR_T>
size_type ACE_String_Base< ACE_CHAR_T >::find ( const ACE_CHAR_T *  s,
size_type  pos = 0 
) const

Find s starting at pos. Returns the slot of the first location that matches (will be >= pos), else npos.

Parameters
snon-zero input string to search for in stored string.
posStarting index position to start searching for string str.
Returns
Index value of the first location of string str else npos.
template<class ACE_CHAR_T>
size_type ACE_String_Base< ACE_CHAR_T >::find ( ACE_CHAR_T  c,
size_type  pos = 0 
) const

Find c starting at pos. Returns the slot of the first location that matches (will be >= pos), else npos.

Parameters
cInput character to search for in stored string.
posStarting index position to start searching for string str.
Returns
Index value of the first location of string str else npos.
template<class ACE_CHAR_T >
u_long ACE_String_Base< ACE_CHAR_T >::hash ( void  ) const

Returns a hash value for this string.

Returns
Hash value of string
template<class ACE_CHAR_T >
bool ACE_String_Base< ACE_CHAR_T >::is_empty ( void  ) const
inline

Return true if the length of the string is zero, else false.

template<class ACE_CHAR_T >
ACE_String_Base< ACE_CHAR_T >::size_type ACE_String_Base< ACE_CHAR_T >::length ( void  ) const
inline

Return the length of the string.

Returns
Length of stored string
template<class ACE_CHAR_T>
bool ACE_String_Base< ACE_CHAR_T >::operator!= ( const ACE_String_Base< ACE_CHAR_T > &  s) const
inline

Inequality comparison operator.

Parameters
sString to compare against stored string.
Returns
true if not equal, false otherwise.
template<class ACE_CHAR_T>
bool ACE_String_Base< ACE_CHAR_T >::operator!= ( const ACE_CHAR_T *  s) const
inline

Inequality comparison operator.

Parameters
sNull terminated string to compare against stored string.
Returns
true if not equal, false otherwise.
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T > & ACE_String_Base< ACE_CHAR_T >::operator+= ( const ACE_String_Base< ACE_CHAR_T > &  s)

Concat operator (copies memory).

Parameters
sInput ACE_String_Base string to concatenate to this string.
Returns
The combined string (input append to the end of the old). New string is zero terminated.
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T > & ACE_String_Base< ACE_CHAR_T >::operator+= ( const ACE_CHAR_T *  s)

Concat operator (copies memory).

Parameters
sInput C string to concatenate to this string.
Returns
The combined string (input append to the end of the old). New string is zero terminated.
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T > & ACE_String_Base< ACE_CHAR_T >::operator+= ( const ACE_CHAR_T  c)

Concat operator (copies memory).

Parameters
cInput ACE_CHAR_T to concatenate to this string.
Returns
The combined string (input append to the end of the old). New string is zero terminated.
template<class ACE_CHAR_T>
bool ACE_String_Base< ACE_CHAR_T >::operator< ( const ACE_String_Base< ACE_CHAR_T > &  s) const
inline

Less than comparison operator.

Parameters
sInput ACE_String_Base string to compare against stored string.
Returns
true if less than, false otherwise.
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T > & ACE_String_Base< ACE_CHAR_T >::operator= ( const ACE_CHAR_T *  s)

Assignment operator (does copy memory).

Parameters
sInput null-terminated ACE_CHAR_T string to assign to this object.
Returns
Return a copy of the this string.
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T > & ACE_String_Base< ACE_CHAR_T >::operator= ( const ACE_String_Base< ACE_CHAR_T > &  s)

Assignment operator (does copy memory).

Parameters
sInput ACE_String_Base string to assign to this object.
Returns
Return a copy of the this string.
template<class ACE_CHAR_T>
bool ACE_String_Base< ACE_CHAR_T >::operator== ( const ACE_String_Base< ACE_CHAR_T > &  s) const

Equality comparison operator (must match entire string).

Parameters
sInput ACE_String_Base string to compare against stored string.
Returns
true if equal, false otherwise.
template<class ACE_CHAR_T>
bool ACE_String_Base< ACE_CHAR_T >::operator== ( const ACE_CHAR_T *  s) const

Equality comparison operator (must match entire string).

Parameters
sNull terminated string to compare against stored string.
Returns
true if equal, false otherwise.
template<class ACE_CHAR_T>
bool ACE_String_Base< ACE_CHAR_T >::operator> ( const ACE_String_Base< ACE_CHAR_T > &  s) const
inline

Greater than comparison operator.

Parameters
sInput ACE_String_Base string to compare against stored string.
Returns
true if greater than, false otherwise.
template<class ACE_CHAR_T>
const ACE_CHAR_T& ACE_String_Base< ACE_CHAR_T >::operator[] ( size_type  slot) const

Return the <slot'th> character in the string (doesn't perform bounds checking).

Parameters
slotIndex of the desired character
Returns
The character at index slot
template<class ACE_CHAR_T>
ACE_CHAR_T& ACE_String_Base< ACE_CHAR_T >::operator[] ( size_type  slot)

Return the <slot'th> character by reference in the string (doesn't perform bounds checking).

Parameters
slotIndex of the desired character
Returns
The character at index slot
template<class ACE_CHAR_T >
ACE_CHAR_T * ACE_String_Base< ACE_CHAR_T >::rep ( void  ) const

Get a copy of the underlying representation.

This method allocates memory for a copy of the string and returns a pointer to the new area. The caller is responsible for freeing the memory when finished; use delete []

Returns
Pointer reference to the string data. Returned string is zero terminated.
template<class ACE_CHAR_T>
void ACE_String_Base< ACE_CHAR_T >::resize ( size_type  len,
ACE_CHAR_T  c = 0 
)

This method is designed for high-performance. Please use with care ;-)

Warning : This method was documented incorrectly in the past. The original intention was to change the length of the string to len, and to fill the whole thing with c CHARs. However, what was actually done was to set the length of the string to zero, and fill the buffer with c's. The buffer was also not null-terminated unless c happened to be zero. Rather than fix the method to work as documented, the code is left as is, but the second parameter should probably not be used.

fast_resize just adjusts the buffer if needed and sets the length, it doesn't fill the buffer, so is much faster.

Parameters
lenThe number of CHARs to reserve
cThe ACE_CHAR_T to use when filling the string.
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T >::size_type ACE_String_Base< ACE_CHAR_T >::rfind ( ACE_CHAR_T  c,
size_type  pos = npos 
) const

Find c starting at pos (counting from the end). Returns the slot of the first location that matches, else npos.

Parameters
cInput character to search for in stored string.
posStarting index position to start searching for string str.
Returns
Index value of the first location of string str else npos.
template<class ACE_CHAR_T>
void ACE_String_Base< ACE_CHAR_T >::set ( const ACE_CHAR_T *  s,
bool  release = true 
)

Copy s into this ACE_String_Base.

If release == true then a new buffer is allocated internally if the existing one is not big enough to hold s. If the existing buffer is big enough, then it will be used. This means that set(*, 1) can be illegal when the string is constructed with a const char*. (e.g. ACE_String_Base("test", 0, false)).

if release == false then the s buffer is used directly, and any existing buffer is destroyed. If s == 0 then it will not be used, and instead the internal buffer is set to NULL_String_.

Parameters
sNull terminated input string
releaseAllocator responsible(true)/not responsible(false) for freeing memory.
template<class ACE_CHAR_T>
void ACE_String_Base< ACE_CHAR_T >::set ( const ACE_CHAR_T *  s,
size_type  len,
bool  release 
)

Copy len bytes of s (will zero terminate the result).

If release == true then a new buffer is allocated internally if the existing one is not big enough to hold s. If the existing buffer is big enough, then it will be used. This means that set(*, *, 1) is illegal when the string is constructed with a non-owned const char*. (e.g. ACE_String_Base("test", 0, 0))

If release == false then the s buffer is used directly, and any existing buffer is destroyed. If s == 0 then it will not be used, and instead the internal buffer is set to NULL_String_.

Parameters
sNon-zero terminated input string
lenLength of input string 's'
releaseAllocator responsible(true)/not responsible(false) for freeing memory.
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T >::size_type ACE_String_Base< ACE_CHAR_T >::strstr ( const ACE_String_Base< ACE_CHAR_T > &  s) const
inline

Comparison operator that will match substrings. Returns the slot of the first location that matches, else npos.

Parameters
sInput ACE_String_Base string
Returns
Integer index value of the first location of string s or npos (not found).
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T > ACE_String_Base< ACE_CHAR_T >::substr ( size_type  offset,
size_type  length = npos 
) const
inline

Same as <substring>.

Parameters
offsetIndex of first desired character of the substring.
lengthHow many characters to return starting at the offset.
Returns
The string containing the desired substring
template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T > ACE_String_Base< ACE_CHAR_T >::substring ( size_type  offset,
size_type  length = npos 
) const

Return a substring given an offset and length. If length == npos use rest of str. Return empty substring if offset or offset/length are invalid.

Parameters
offsetIndex of first desired character of the substring.
lengthHow many characters to return starting at the offset.
Returns
The string containing the desired substring
template<class ACE_CHAR_T>
void ACE_String_Base< ACE_CHAR_T >::swap ( ACE_String_Base< ACE_CHAR_T > &  str)

Swap the contents of this ACE_String_Base with str.

Note
This is non-throwing operation.

Friends And Related Function Documentation

template<class ACE_CHAR_T>
friend class ACE_String_Base_Const_Iterator< ACE_CHAR_T >
friend
template<class ACE_CHAR_T>
friend class ACE_String_Base_Iterator< ACE_CHAR_T >
friend

Member Data Documentation

template<class ACE_CHAR_T>
ACE_String_Base< ACE_CHAR_T >::ACE_ALLOC_HOOK_DECLARE

Declare the dynamic allocation hooks.

template<class ACE_CHAR_T>
ACE_Allocator* ACE_String_Base< ACE_CHAR_T >::allocator_
protected

Pointer to a memory allocator.

template<class ACE_CHAR_T>
size_type ACE_String_Base< ACE_CHAR_T >::buf_len_
protected

Length of the ACE_String_Base data buffer. Keeping track of the length allows to avoid unnecessary dynamic allocations.

template<class ACE_CHAR_T>
size_type ACE_String_Base< ACE_CHAR_T >::len_
protected

Length of the ACE_String_Base data (not counting the trailing '\0').

template<class ACE_CHAR_T>
ACE_CHAR_T ACE_String_Base< ACE_CHAR_T >::NULL_String_ = 0
staticprotected

Represents the "NULL" string to simplify the internal logic.

template<class ACE_CHAR_T>
bool ACE_String_Base< ACE_CHAR_T >::release_
protected

Flag that indicates if we own the memory

template<class ACE_CHAR_T>
ACE_CHAR_T* ACE_String_Base< ACE_CHAR_T >::rep_
protected

Pointer to data.


The documentation for this class was generated from the following files: