Sha256: b4dff8e6c599b2c451b2a577cbacb1f16f728d04360ccaea6275d6a1f584125b

Contents?: true

Size: 1.39 KB

Versions: 7

Compression:

Stored size: 1.39 KB

Contents

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

#ifndef TAO_JSON_UBJSON_EVENTS_FROM_INPUT_HPP
#define TAO_JSON_UBJSON_EVENTS_FROM_INPUT_HPP

#include <utility>

#include <tao/pegtl/parse.hpp>

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

namespace tao::json::ubjson::events
{
   // Events producers that parse UBJSON from a PEGTL input (or something compatible).

   template< typename Consumer, typename Input >
   void from_input( Consumer& consumer, Input&& in )
   {
      pegtl::parse< ubjson::internal::grammar >( std::forward< Input >( in ), consumer );
   }

   template< typename Consumer, typename Input >
   void from_input_embedded( Consumer& consumer, Input&& in )
   {
      pegtl::parse< ubjson::internal::embedded >( std::forward< Input >( in ), consumer );
   }

   template< typename Consumer, typename Outer, typename Input >
   void from_input_nested( Consumer& consumer, const Outer& oi, Input&& in )
   {
      pegtl::parse_nested< ubjson::internal::grammar >( oi, std::forward< Input >( in ), consumer );
   }

   template< typename Consumer, typename Outer, typename Input >
   void from_input_embedded_nested( Consumer& consumer, const Outer& oi, Input&& in )
   {
      pegtl::parse_nested< ubjson::internal::embedded >( oi, std::forward< Input >( in ), consumer );
   }

}  // namespace tao::json::ubjson::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/ubjson/events/from_input.hpp
couchbase-3.4.4 ext/couchbase/third_party/json/include/tao/json/ubjson/events/from_input.hpp
couchbase-3.4.3 ext/couchbase/third_party/json/include/tao/json/ubjson/events/from_input.hpp
couchbase-3.4.2 ext/couchbase/third_party/json/include/tao/json/ubjson/events/from_input.hpp
couchbase-3.4.1 ext/couchbase/third_party/json/include/tao/json/ubjson/events/from_input.hpp
couchbase-3.4.0 ext/couchbase/third_party/json/include/tao/json/ubjson/events/from_input.hpp
couchbase-3.3.0 ext/couchbase/third_party/json/include/tao/json/ubjson/events/from_input.hpp