1 #ifndef PhysicsTools_MVAComputer_memstream_h
2 #define PhysicsTools_MVAComputer_memstream_h
21 template<
typename Item_t,
typename Traits_t = std::
char_traits<Item_t>,
22 typename Allocator_t = std::allocator<Item_t> >
24 public std::basic_ostream<Item_t, Traits_t> {
31 std::basic_ostream<Item_t, Traits_t>(this),
33 { this->exceptions(std::ios_base::badbit); }
50 if (!traits_type::eq_int_type(c, traits_type::eof())) {
53 return traits_type::eof();
64 template<
typename Item_t,
typename Traits_t = std::
char_traits<Item_t>,
65 typename Allocator_t = std::allocator<Item_t> >
67 public std::basic_istream<Item_t, Traits_t> {
74 std::basic_istream<Item_t, Traits_t>(this)
76 this->exceptions(std::ios_base::badbit);
77 this->setg(const_cast<char_type*>(buf),
78 const_cast<char_type*>(buf),
79 const_cast<char_type*>(buf + size));
85 if (this->gptr() && this->gptr() < this->egptr())
86 return traits_type::to_int_type(*this->gptr());
88 return traits_type::eof();
99 #endif // PhysicsTools_MVAComputer_memstream_h
Traits_t::char_type char_type
basic_imemstream(const char_type *buf, size_t size)
int_type overflow(int_type c)
Traits_t::char_type char_type
basic_imemstream< wchar_t > wimemstream
Traits_t::int_type int_type
basic_omemstream< char > omemstream
basic_omemstream< wchar_t > womemstream
basic_omemstream(char_type *buf, size_t size)
basic_imemstream< char > imemstream
Traits_t::int_type int_type
std::streamsize xsputn(char_type const *data, std::streamsize size)
char_type * begin() const
tuple size
Write out results.