- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages
- Examples

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# shim_string_sink Class Reference

`#include <fastformat/sinks/shim_string.hpp>`

List of all members.

## Detailed Description

This class acts as a sink for string shims, to be used with STLSoft 1.9.

For example

      // in namespace mystuff
      class Thing
      {};

      // in namespace stlsoft
      inline shim_string_sink c_str_ptr_a(mystuff::Thing const& thing)
      {
        shim_string_sink  result;

        return result;
      }

Note:
  This class is only necessary for STLSoft 1.9. If you're using STLSoft 1.10 (or the STLSoft 1.10 alpha in combination with STLSoft 1.9), then you can (and should!) just go ahead and use `stlsoft::basic_shim_string`.

Examples:

  examples/example.overload.2.custom_type.string_access_shims/example.overload.2.custom_type.string_access_shims.cpp.

## Public Types
typedef shim_string_sink | class_type
| This type.
typedef stlsoft::basic_shim_string < ff_char_t > | parent_class_type
| The parent type.
typedef parent_class_type::size_type | size_type
| The size type.
## Public Member Functions
| shim_string_sink ()
| Constructs an empty instance.
| shim_string_sink (size_type n)
| Constructs an empty instance with the given capacity.
void | reserve (size_type n)
| Reserves the given capacity.
class_type & | append (ff_char_t const *s, size_type n)
| Appends part of a C-style string.
class_type & | append (ff_char_t const *s)
| appends a C-style string
void | truncate (size_type n)
| truncates the string
size_type | size () const
| The string size.
| operator size_type () const
| The string size.

## Member Typedef Documentation

typedef shim_string_sink class_type

This type.

typedef stlsoft::basic_shim_string<ff_char_t> parent_class_type

The parent type.

typedef parent_class_type::size_type size_type

The size type.

## Constructor & Destructor Documentation

shim_string_sink | ( |  | ) | `[inline]`

Constructs an empty instance.

shim_string_sink | ( | size_type | n | ) | `[inline, explicit]`

Constructs an empty instance with the given capacity.

Parameters:

  | n | The required capacity

## Member Function Documentation

void reserve | ( | size_type | n | ) | `[inline]`

Reserves the given capacity.

Parameters:

  | n | The required capacity

class_type& append | ( | ff_char_t const * | s,
|  | size_type | n |
| ) |  |  | `[inline]`

Appends part of a C-style string.

class_type& append | ( | ff_char_t const * | s | ) | `[inline]`

appends a C-style string

void truncate | ( | size_type | n | ) | `[inline]`

truncates the string

size_type size | ( |  | ) | const`[inline]`

The string size.

operator size_type | ( |  | ) | const`[inline]`

The string size.

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

- fastformat/sinks/shim_string.hpp

FastFormat Library documentation © Matthew Wilson, 2006-2009 |