basic_shim_string Class Template Reference
[String Library]

#include <stlsoft/string/shim_string.hpp>

List of all members.


Detailed Description

template<typename C, size_t N = 64, bool U = false, typename A = typename allocator_selector<C>::allocator_type, typename T = stlsoft_char_traits<C>>
class stlsoft::basic_shim_string< C, N, U, A, T >

An implementation class, which provides efficient intermediate string objects for conversion shims.

Parameters:
C The character type
N The number of characters in the internal auto_buffer
U The nUll indicator. If true, the implicit conversion operator returns NULL for an empty string, otherwise it returns the empty string
A The allocator
T The char traits type

Accessors

size_type size () const
char_typedata ()
char_type const * data () const
static size_type internal_size ()

Public Types

typedef C char_type
typedef size_t size_type
typedef basic_shim_string< C,
N, U > 
class_type
typedef stlsoft_char_traits< C > traits_type
Types
typedef C char_type
 The value type.
typedef A allocator_type
 The allocator type.
typedef T traits_type
 The traits type.
typedef basic_shim_string< C,
N, U, A, T > 
class_type
 The current parameterisation of the type.
typedef size_t size_type
 The size type.
typedef auto_buffer_old
< char_type, allocator_type, N+1 > 
buffer_type
 The buffer type.

Public Member Functions

 basic_shim_string (size_t n)
 basic_shim_string (char_type const *s, size_type n)
 basic_shim_string (char_type const *s)
 basic_shim_string (class_type &rhs)
void swap (class_type &rhs) throw ()
 Swaps the contents of this instance with another.
void write (char_type const *s)
void truncate (size_type n)
size_type size () const
char_typedata ()
char_type const * data () const
 operator char_type const * () const
Construction
 basic_shim_string (size_type n)
 Constructor.
 basic_shim_string (char_type const *s, size_type n)
 Constructor.
 basic_shim_string (char_type const *s)
 Constructor.
 basic_shim_string (class_type const &rhs)
 Copy constructor.
void swap (class_type &rhs) throw ()
 Swaps the contents of this instance with another.
Operations
void write (char_type const *s)
void truncate (size_t n)
 Truncates the string to the given length.
buffer_typeget_buffer ()
Implicit Conversions
 operator char_type const * () const
 operator size_t () const

Member Typedef Documentation

typedef C char_type

The value type.

typedef A allocator_type

The allocator type.

typedef T traits_type

The traits type.

typedef basic_shim_string<C, N, U, A, T> class_type

The current parameterisation of the type.

typedef size_t size_type

The size type.

typedef auto_buffer_old<char_type, allocator_type, N + 1> buffer_type

The buffer type.


Constructor & Destructor Documentation

basic_shim_string ( size_type  n  )  [inline, explicit]

Constructor.

basic_shim_string ( char_type const *  s,
size_type  n 
) [inline]

Constructor.

basic_shim_string ( char_type const *  s  )  [inline]

Constructor.

basic_shim_string ( class_type const &  rhs  )  [inline]

Copy constructor.

References basic_shim_string::m_buffer.


Member Function Documentation

void swap ( class_type rhs  )  throw () [inline]

Swaps the contents of this instance with another.

void truncate ( size_t  n  )  [inline]

Truncates the string to the given length.

Note:
The length specified must be less than or equal to the current length

References STLSOFT_MESSAGE_ASSERT.

void swap ( class_type rhs  )  throw () [inline]

Swaps the contents of this instance with another.

References stlsoft::std_swap().


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

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