STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - Template Software for the Active Template Library COMSTL - The Standard Template Library meets the Component Object Model .netSTL - Standard Template Library meets the Microsoft.NET Common Language Runtime InetSTL - The Standard Template Library meets WinInet MFCSTL - Template Software for the Microsoft Foundation Classes UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

cstring_maker Struct Template Reference

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

#include <stlsoft_cstring_maker.h>

List of all members.

Static Public Methods

char_type * alloc (size_type cch)
 Allocates uninitialised storage for writing into a string.

char_type * dup (char_type const *s)
 Allocates a new copy of the given string.

char_type * dup_null (char_type const *s)
 Allocates a new copy of the given string, or returns NULL if given null string.

void free (char_type *s)
 Releases the storage associated with the string.


Detailed Description

template<typename C, typename A = malloc_allocator<C>, typename T = char_traits<C>>
struct stlsoft::cstring_maker< C, A, T >

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


Member Function Documentation

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

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

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

void free char_type *    s [inline, static]
 

Releases the storage associated with the string.

Parameters:
s  The string to free


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

STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004