The C++ framework for developing highly scalable, high performance servers on Windows platforms.

StreamWriter Class Reference

Inheritance diagram for StreamWriter:
Collaboration diagram for StreamWriter:

List of all members.

Detailed Description


  using namespace Json;
  void writeToStdout(StreamWriter::Factory const& factory, Value const& value) {
    std::unique_ptr<StreamWriter> const writer(
    writer->write(value, &std::cout);
    std::cout << std::endl;  // add lf and flush

Public Member Functions

 StreamWriter ()
virtual ~StreamWriter ()
virtual int write (Value const &root, std::ostream *sout)=0
 Write Value into document as configured in sub-class.

Protected Attributes

std::ostream * sout_


class  Factory

Constructor & Destructor Documentation

StreamWriter (  ) 

~StreamWriter (  )  [virtual]

Member Function Documentation

virtual int write ( Value const &  root,
std::ostream *  sout 
) [pure virtual]

Write Value into document as configured in sub-class.

Do not take ownership of sout, but maintain a reference during function.

sout != NULL
zero on success
std::exception possibly, depending on configuration

Member Data Documentation

std::ostream* sout_ [protected]

Generated on Sun Sep 12 19:08:09 2021 for The Server Framework - v7.4 by doxygen 1.5.3