23 #ifndef NDN_BLOB_STREAM_HPP
24 #define NDN_BLOB_STREAM_HPP
27 #include <ndnboost/iostreams/detail/ios.hpp>
28 #include <ndnboost/iostreams/categories.hpp>
29 #include <ndnboost/iostreams/stream.hpp>
30 #include <ndn-cpp/common.hpp>
36 typedef char char_type;
37 typedef ndnboost::iostreams::sink_tag category;
40 : container_(container)
45 write(
const char_type* s, std::streamsize n)
47 std::copy(s, s+n, std::back_inserter(container_));
52 std::vector<uint8_t>& container_;
59 struct blob_stream :
public ndnboost::iostreams::stream<blob_append_device>
62 : buffer_(
new std::vector<uint8_t>())
68 ptr_lib::shared_ptr<std::vector<uint8_t> >
76 ptr_lib::shared_ptr<std::vector<uint8_t> > buffer_;
Copyright (C) 2013-2015 Regents of the University of California.
Definition: common.hpp:35
Definition: blob-stream.hpp:34
This is called "blob_stream" but it doesn't use an ndn::Blob which is immutable.
Definition: blob-stream.hpp:59