Struct StreamTraits

Synopsis

#include <include/rapidjson/stream.h>

template<typename Stream>
struct StreamTraits

Description

Provides additional information for stream.

By using traits pattern, this type provides a default configuration for stream. For custom stream, this type can be specialized for other configuration. See TEST(Reader, CustomStringStream) in readertest.cpp for example.

Source

Lines 72-80 in include/rapidjson/stream.h.

template<typename Stream>
struct StreamTraits {
    //! Whether to make local copy of stream for optimization during parsing.
    /*!
        By default, for safety, streams do not use local copy optimization.
        Stream that can be copied fast should specialize this, like StreamTraits<StringStream>.
    */
    enum { copyOptimization = 0 };
};





Add Discussion as Guest

Log in