ucommon::stringbuf< S > Class Template Reference

A string class that has a predefined string buffer. More...

#include <string.h>

Inheritance diagram for ucommon::stringbuf< S >:

Inheritance graph
[legend]
Collaboration diagram for ucommon::stringbuf< S >:

Collaboration graph
[legend]

Public Member Functions

void operator= (String &object)
 Assign a string buffer from another string object.
void operator= (char *text)
 Assign a string buffer from a null terminated string.
 stringbuf (char *text)
 Create a string buffer from a null terminated string.
 stringbuf ()
 Create an empty instance of a string buffer.

Detailed Description

template<strsize_t S>
class ucommon::stringbuf< S >

A string class that has a predefined string buffer.

The string class and buffer are allocated together as one object. This allows one to use string objects entirely resident on the local stack as well as on the heap. Using a string class on the local stack may be more convenient than a char array since one can use all the features of the class including assignment and concatenation which a char buffer cannot as easily do.

Author:
David Sugar <dyfet@gnutelephony.org>

Definition at line 1590 of file string.h.


Constructor & Destructor Documentation

template<strsize_t S>
ucommon::stringbuf< S >::stringbuf ( char *  text  )  [inline]

Create a string buffer from a null terminated string.

Parameters:
text to place in object.

Definition at line 1605 of file string.h.


Member Function Documentation

template<strsize_t S>
void ucommon::stringbuf< S >::operator= ( String object  )  [inline]

Assign a string buffer from another string object.

Parameters:
object to assign from.

Reimplemented from ucommon::memstring.

Definition at line 1618 of file string.h.

References ucommon::String::c_str().

Here is the call graph for this function:

template<strsize_t S>
void ucommon::stringbuf< S >::operator= ( char *  text  )  [inline]

Assign a string buffer from a null terminated string.

Parameters:
text to assign to object.

Reimplemented from ucommon::memstring.

Definition at line 1611 of file string.h.


The documentation for this class was generated from the following file:
Generated on 14 Aug 2013 for UCommon by  doxygen 1.4.7