29#ifndef Pt_StreamBuffer_h
30#define Pt_StreamBuffer_h
37#if defined(_MSC_VER) && defined(_WIN32_WCE)
39 template class PT_API std::basic_streambuf<char>;
43 template class PT_API std::basic_streambuf<Pt::Char>;
73template <
typename CharT,
typename TraitsT = std::
char_traits<CharT> >
77 typedef CharT char_type;
78 typedef TraitsT traits_type;
79 typedef typename TraitsT::int_type int_type;
80 typedef typename TraitsT::pos_type pos_type;
81 typedef typename TraitsT::off_type off_type;
95 std::streamsize
speekn(CharT* buffer, std::streamsize size)
101 if( ! this->gptr() || this->gptr() == this->egptr() )
103 next = this->underflow();
105 if( traits_type::eof() == next)
109 std::size_t avail = this->gptr() ? this->egptr() - this->gptr() : 0;
114 *buffer = traits_type::to_char_type(next);
118 std::size_t n =
static_cast<std::size_t
>(size);
122 traits_type::copy(buffer, this->gptr(), n);
131 return this->pptr() - this->pbase();
149 template class PT_API BasicStreamBuffer<char>;
150 template class PT_API BasicStreamBuffer<Char>;
std::streamsize out_avail()
Returns the number of characters buffered for output.
Definition StreamBuffer.h:128
std::streamsize speekn(CharT *buffer, std::streamsize size)
Peeks characters in the stream buffer.
Definition StreamBuffer.h:95
virtual std::streamsize showfull()
Definition StreamBuffer.h:144
BasicStreamBuffer()
Default Constructor.
Definition StreamBuffer.h:139
~BasicStreamBuffer()
Destructor.
Definition StreamBuffer.h:86
Core module.
Definition Allocator.h:33