Sha256: 00f30a11931901c9c79efc470c9e1b8cb2c40a4b96dd96825d34bc654e7e7338

Contents?: true

Size: 1.48 KB

Versions: 24

Compression:

Stored size: 1.48 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_CBOR_EVENTS_FROM_STRING_HPP
#define TAO_JSON_CBOR_EVENTS_FROM_STRING_HPP

#include <string>
#include <string_view>

#include "../../external/pegtl/memory_input.hpp"

#include "from_input.hpp"

namespace tao::json::cbor::events
{
   template< typename Consumer >
   void from_string( Consumer& consumer, const char* data, const std::size_t size, const char* source = nullptr, const std::size_t byte = 0, const std::size_t line = 1, const std::size_t byte_in_line = 0 )
   {
      pegtl::memory_input< pegtl::tracking_mode::lazy, pegtl::eol::lf_crlf, const char* > in( data, data + size, source ? source : "tao::json::cbor::events::from_string", byte, line, byte_in_line );
      cbor::events::from_input( consumer, std::move( in ) );
   }

   template< typename Consumer >
   void from_string( Consumer& consumer, const char* data, const std::size_t size, const std::string& source, const std::size_t byte = 0, const std::size_t line = 1, const std::size_t column = 0 )
   {
      cbor::events::from_string( consumer, data, size, source.c_str(), byte, line, column );
   }

   template< typename Consumer, typename... Ts >
   void from_string( Consumer& consumer, const std::string_view data, Ts&&... ts )
   {
      cbor::events::from_string( consumer, data.data(), data.size(), std::forward< Ts >( ts )... );
   }

}  // namespace tao::json::cbor::events

#endif

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
couchbase-3.0.0-universal-darwin-19 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.beta.1-universal-darwin-19 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.beta.1 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.5-x86_64-linux ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.5-universal-darwin-19 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.5-x86_64-darwin-19 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.5 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.4-x86_64-linux ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.4-x86_64-darwin-19 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.4-universal-darwin-19 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.4 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.3-x86_64-linux ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.3-x86_64-darwin-19 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.3-universal-darwin-19 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.3 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.2-x86_64-linux ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.2-x86_64-darwin-19 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.2-universal-darwin-19 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp
couchbase-3.0.0.alpha.2 ext/third_party/json/include/tao/json/cbor/events/from_string.hpp