Construct, outputting to the provided stream ! @param stream The stream to output to. @param options The JSON specific options to use. See the Options struct for the values of default parameters */
| 158 | @param options The JSON specific options to use. See the Options struct |
| 159 | for the values of default parameters */ |
| 160 | JSONOutputArchive(std::ostream & stream, Options const & options = Options::Default() ) : |
| 161 | OutputArchive<JSONOutputArchive>(this), |
| 162 | itsWriteStream(stream), |
| 163 | itsWriter(itsWriteStream), |
| 164 | itsNextName(nullptr) |
| 165 | { |
| 166 | itsWriter.SetMaxDecimalPlaces( options.itsPrecision ); |
| 167 | itsWriter.SetIndent( options.itsIndentChar, options.itsIndentLength ); |
| 168 | itsNameCounter.push(0); |
| 169 | itsNodeStack.push(NodeType::StartObject); |
| 170 | } |
| 171 | |
| 172 | //! Destructor, flushes the JSON |
| 173 | ~JSONOutputArchive() CEREAL_NOEXCEPT |
nothing calls this directly
no test coverage detected