IOSS 2.0

Classes | Public Member Functions | Protected Attributes | List of all members
Json::StreamWriter Class Referenceabstract

`#include <json.h>`

## Classes
class | Factory
| A simple abstract factory. More...

## Public Member Functions
| StreamWriter ()
virtual | ~StreamWriter ()
virtual int | write (Value const &root, std::ostream *sout)=0

## Protected Attributes
std::ostream * | sout_

## Detailed Description

Usage:

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

## Constructor & Destructor Documentation

## ◆ StreamWriter()

Json::StreamWriter::StreamWriter | ( |  | ) |

## ◆ ~StreamWriter()

virtual Json::StreamWriter::~StreamWriter | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ write()

virtual int Json::StreamWriter::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.

Precondition
  sout != NULL

Returns
  zero on success (For now, we always return zero, so check the stream instead.)

Exceptions

  std::exception | possibly, depending on configuration

## Member Data Documentation

## ◆ sout_

std::ostream* Json::StreamWriter::sout_
| protected

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

- src/visualization/ParaViewCatalystIossAdapter/parser/jsoncpp-master/dist/json/json.h