CppCMS
Public Member Functions
cppcms::filters::streamable Class Reference

A special proxy object for writing any object to a std::ostream. More...

#include <cppcms/filters.h>

List of all members.

Public Member Functions

 streamable (streamable const &other)
streamable const & operator= (streamable const &other)
template<typename S >
 streamable (S const &ptr)
template<typename T >
T const & get () const
 streamable (char const *ptr)
void operator() (std::ostream &output) const
std::string get (std::ios &ios) const
template<>
CPPCMS_API streamable (std::string const &str)
 we can specialize for string because std::string get(ios &) const may be much more efficient.

Detailed Description

A special proxy object for writing any object to a std::ostream.

This is special object that is used to store a reference to any other object that can be written to std::ostream, giving as easy way to write a filter for any object that can be written to stream


Constructor & Destructor Documentation

template<typename S >
cppcms::filters::streamable::streamable ( S const &  ptr) [inline]

Create a streamable object from arbitrary object that can be written to stream

cppcms::filters::streamable::streamable ( char const *  ptr)

Create a streamable object from C string


Member Function Documentation

template<typename T >
T const& cppcms::filters::streamable::get ( ) const [inline]

Get the reference to "streamed object", throws std::bad_cast if the type is wrong

std::string cppcms::filters::streamable::get ( std::ios &  ios) const

Convert the object to string using settings and locale in ios class

void cppcms::filters::streamable::operator() ( std::ostream &  output) const

Write the object to output stream


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