Synesis Software STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ...

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
 Member Types.
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 ()
 Construction.
 shim_string_sink (size_type n)
 Constructs an empty instance with the given capacity.
void reserve (size_type n)
 Operations.
class_typeappend (ff_char_t const *s, size_type n)
 Appends part of a C-style string.
class_typeappend (ff_char_t const *s)
 appends a C-style string
void truncate (size_type n)
 truncates the string
size_type size () const
 Accessors.
 operator size_type () const
 The string size.

Member Typedef Documentation

Member Types.

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]

Construction.

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]

Operations.

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.

Referenced by shim_string_sink::append().

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

appends a C-style string

References shim_string_sink::append(), and fastformat::sinks::c_str_len().

void truncate ( size_type  n  )  [inline]

truncates the string

size_type size (  )  const [inline]

Accessors.

The string size

Referenced by fastformat::sinks::c_str_len(), and shim_string_sink::operator size_type().

operator size_type (  )  const [inline]

The string size.

References shim_string_sink::size().


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

FastFormat Library documentation © Matthew Wilson, 2006-2009 SourceForge.net Logo