Sha256: 6c9df5b87624e75fc86f09bd7f67cd62567a38bb6b628d2c36d69bfa751af0ea

Contents?: true

Size: 1.16 KB

Versions: 34

Compression:

Stored size: 1.16 KB

Contents

// Copyright (c) 2017-2020 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/json/

#ifndef TAO_JSON_JAXN_EVENTS_FROM_STREAM_HPP
#define TAO_JSON_JAXN_EVENTS_FROM_STREAM_HPP

#include <istream>

#include "../../external/pegtl/internal/istream_reader.hpp"
#include "../../external/pegtl/parse.hpp"

#include "../internal/action.hpp"
#include "../internal/errors.hpp"
#include "../internal/grammar.hpp"

namespace tao::json::jaxn::events
{
   template< typename Consumer >
   void from_stream( Consumer& consumer, std::istream& stream, const char* source = nullptr, const std::size_t maximum_buffer_size = 4000 )
   {
      pegtl::istream_input in( stream, maximum_buffer_size, source ? source : "tao::json::events::jaxn::from_stream" );
      pegtl::parse< internal::grammar, internal::action, internal::errors >( in, consumer );
   }

   template< typename Consumer >
   void from_stream( Consumer& consumer, std::istream& stream, const std::string& source, const std::size_t maximum_buffer_size = 4000 )
   {
      from_stream( consumer, stream, source.c_str(), maximum_buffer_size );
   }

}  // namespace tao::json::jaxn::events

#endif

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
couchbase-3.2.0-universal-darwin-20 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.2.0 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.1.1 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.1.1-universal-darwin-20 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.1.0 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.3 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.3-universal-darwin-20 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.2 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.1-universal-darwin-19 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.1 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.0-universal-darwin-19 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.0 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.0.beta.1-universal-darwin-19 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.0.beta.1 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.0.alpha.5-x86_64-linux ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.0.alpha.5-universal-darwin-19 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.0.alpha.5-x86_64-darwin-19 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.0.alpha.5 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.0.alpha.4-x86_64-linux ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp
couchbase-3.0.0.alpha.4-x86_64-darwin-19 ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp