CppCMS
|
A special proxy object for writing any object to a std::ostream. More...
#include <cppcms/filters.h>
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. | |
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
|
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
|
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