Sha256: 8a601ce79b8e9d0e61c24bca92270f53512c834fa87b6bcacac5c04870575fbb

Contents?: true

Size: 1.11 KB

Versions: 7

Compression:

Stored size: 1.11 KB

Contents

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

#ifndef TAO_JSON_EVENTS_FROM_STREAM_HPP
#define TAO_JSON_EVENTS_FROM_STREAM_HPP

#include <istream>

#include <tao/pegtl/istream_input.hpp>
#include <tao/pegtl/parse.hpp>

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

namespace tao::json::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::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 )
   {
      events::from_stream( consumer, stream, source.c_str(), maximum_buffer_size );
   }

}  // namespace tao::json::events

#endif

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
couchbase-3.4.5 ext/couchbase/third_party/json/include/tao/json/events/from_stream.hpp
couchbase-3.4.4 ext/couchbase/third_party/json/include/tao/json/events/from_stream.hpp
couchbase-3.4.3 ext/couchbase/third_party/json/include/tao/json/events/from_stream.hpp
couchbase-3.4.2 ext/couchbase/third_party/json/include/tao/json/events/from_stream.hpp
couchbase-3.4.1 ext/couchbase/third_party/json/include/tao/json/events/from_stream.hpp
couchbase-3.4.0 ext/couchbase/third_party/json/include/tao/json/events/from_stream.hpp
couchbase-3.3.0 ext/couchbase/third_party/json/include/tao/json/events/from_stream.hpp