cstring_maker Struct Template Reference
[String Library]

#include <stlsoft/string/cstring_maker.hpp>

List of all members.


Detailed Description

template<typename C, typename A = typename allocator_selector<C>::allocator_type, typename T = stlsoft_char_traits<C>>
struct stlsoft::cstring_maker< C, A, T >

Utility class that creates/destroys fixed-size C-strings for other classes.

Public Types

typedef C char_type
typedef A allocator_type
typedef T traits_type
typedef size_t size_type
typedef cstring_maker< C, A, T > class_type

Static Public Member Functions

static char_type * alloc (size_type cch)
 Allocates uninitialised storage for writing into a string.
static char_type * dup (char_type const *s)
 Allocates a new copy of the given string.
static char_type * dup_null (char_type const *s)
 Allocates a new copy of the given string, or returns NULL if given null string.
static void free (char_type *s)
 Releases the storage associated with the string.

Classes

struct  block

Member Function Documentation

static char_type* alloc ( size_type  cch  )  [inline, static]

Allocates uninitialised storage for writing into a string.

Note:
Includes space for a nul-terminator character
Parameters:
cch The number of characters to allocate

References ss_template_qual_k, and ss_typename_type_k.

Referenced by cstring_maker::dup().

static char_type* dup ( char_type const *  s  )  [inline, static]

Allocates a new copy of the given string.

Note:
Includes nul-terminator character
Parameters:
s The string to copy. Cannot be null pointer

References cstring_maker::alloc(), and STLSOFT_ASSERT.

Referenced by cstring_maker::dup_null().

static char_type* dup_null ( char_type const *  s  )  [inline, static]

Allocates a new copy of the given string, or returns NULL if given null string.

Note:
Includes nul-terminator character
Parameters:
s The string to copy. Can be null pointer, in which case NULL is returned

References cstring_maker::dup().

static void free ( char_type *  s  )  [inline, static]

Releases the storage associated with the string.

Parameters:
s The string to free

References ss_template_qual_k, ss_typename_type_k, and STLSOFT_ASSERT.


The documentation for this struct was generated from the following file:

Generated on Thu Jun 10 08:58:58 2010 for STLSoft by  doxygen 1.5.6