senf::detail::StreamableString Class Reference

String supporting automatic type conversion. More...
Inheritance diagram for senf::detail::StreamableString:
Inheritance graph
[legend]

List of all members.


Detailed Description

String supporting automatic type conversion.

The StreamableString class is used to simplify creating a text representation of arbitrary values. StreamableString is an ordinary string with an additional constructor which allows constructing the string from any arbitrary, streamable type.

Note:
It is generally not advisable to derive from the standard library container classes. However, in this concrete case, the derivation is safe since only the additional functionality is added. It is absolutely safe to convert the derived class back to the base type.

Definition at line 56 of file SocketHandle.ih.


Public Member Functions

template<class T >
StreamableString operator<< (T const &other)
  Value assignment.
StreamableString operator<< (bool v)
  Bool assignment.

Member Function Documentation

senf::detail::StreamableString & senf::detail::StreamableString::
operator<< ( bool  v )

Bool assignment.

The bool assignment is defined explicitly to use a specialized representation (the strings 'true' and 'false').

Definition at line 69 of file SocketHandle.cci.

template<class T >
senf::detail::StreamableString & senf::detail::StreamableString::
operator<< ( T const &  other )

Value assignment.

This operator will assign the string from any arbitrary type. It will use boost::lexical_cast to convert the argument to its string representation.

If the string is non-empty, an additional separating comma is added to the string.

Definition at line 41 of file SocketHandle.ct.


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