33 #include <Pt/StreamBuffer.h>
37 #if defined(_MSC_VER) && defined(_WIN32_WCE)
39 template class PT_EXPORT std::basic_ios<char>;
40 template class PT_EXPORT std::basic_istream<char>;
41 template class PT_EXPORT std::basic_ostream<char>;
42 template class PT_EXPORT std::basic_iostream<char>;
46 template class PT_EXPORT std::basic_ios<Pt::Char>;
47 template class PT_EXPORT std::basic_istream<Pt::Char>;
48 template class PT_EXPORT std::basic_ostream<Pt::Char>;
49 template class PT_EXPORT std::basic_iostream<Pt::Char>;
56 template <
typename CharT,
typename TraitsT = std::
char_traits<CharT> >
60 typedef CharT char_type;
61 typedef TraitsT traits_type;
62 typedef typename TraitsT::int_type int_type;
63 typedef typename TraitsT::pos_type pos_type;
64 typedef typename TraitsT::off_type off_type;
80 std::streamsize peeksome(CharT* buffer, std::streamsize n);
100 template <
typename CharT,
typename TraitsT = std::
char_traits<CharT> >
104 typedef CharT char_type;
105 typedef TraitsT traits_type;
106 typedef typename TraitsT::int_type int_type;
107 typedef typename TraitsT::pos_type pos_type;
108 typedef typename TraitsT::off_type off_type;
120 std::streamsize writesome(CharT* buffer, std::streamsize n);
140 template <
typename CharT,
typename TraitsT = std::
char_traits<CharT> >
144 typedef CharT char_type;
145 typedef TraitsT traits_type;
146 typedef typename TraitsT::int_type int_type;
147 typedef typename TraitsT::pos_type pos_type;
148 typedef typename TraitsT::off_type off_type;
164 std::streamsize peeksome(CharT* buffer, std::streamsize n);
168 std::streamsize writesome(CharT* buffer, std::streamsize n);
186 template <
typename CharT,
typename TraitsT>
188 : std::basic_istream<CharT>(sb)
194 template <
typename CharT,
typename TraitsT>
197 if(_buffer && this->rdbuf() == _buffer)
198 return _buffer->speekn(buffer, n);
202 buffer[0] = this->peek();
210 template <
typename CharT,
typename TraitsT>
212 : std::basic_ostream<CharT>(sb)
218 template <
typename CharT,
typename TraitsT>
221 if( ! _buffer || this->rdbuf() != _buffer )
224 std::streamsize avail = _buffer->out_avail();
230 n = std::min(avail, n);
231 return _buffer->sputn(buffer, n);
235 template <
typename CharT,
typename TraitsT>
237 : std::basic_iostream<CharT>(sb)
243 template <
typename CharT,
typename TraitsT>
246 if(_buffer && this->rdbuf() == _buffer)
247 return _buffer->speekn(buffer, n);
251 buffer[0] = this->peek();
259 template <
typename CharT,
typename TraitsT>
262 if( ! _buffer || this->rdbuf() != _buffer )
265 std::streamsize avail = _buffer->out_avail();
271 n = std::min(avail, n);
272 return _buffer->sputn(buffer, n);
~BasicOStream()
Destructor.
Definition: IOStream.h:115
void setBuffer(BasicStreamBuffer< CharT > *sb)
Sets the buffer.
Definition: IOStream.h:127
void setBuffer(BasicStreamBuffer< CharT > *sb)
Sets the buffer.
Definition: IOStream.h:175
BasicIOStream(BasicStreamBuffer< CharT > *sb=0)
Constructor.
Definition: IOStream.h:236
std::streamsize writesome(CharT *buffer, std::streamsize n)
Write as much data as fits in buffer.
Definition: IOStream.h:219
~BasicIStream()
Destructor.
Definition: IOStream.h:71
std::streamsize peeksome(CharT *buffer, std::streamsize n)
Peeks bytes in the stream buffer.
Definition: IOStream.h:195
Input stream.
Definition: IOStream.h:57
Input/Output stream.
Definition: IOStream.h:141
BasicOStream(BasicStreamBuffer< CharT > *sb=0)
Constructor.
Definition: IOStream.h:211
Output stream.
Definition: IOStream.h:101
BasicStreamBuffer< CharT > * buffer()
Returns the buffer.
Definition: IOStream.h:123
std::streamsize writesome(CharT *buffer, std::streamsize n)
Write as much data as fits in buffer.
Definition: IOStream.h:260
BasicStreamBuffer< CharT > * buffer()
Returns the buffer.
Definition: IOStream.h:83
BasicStreamBuffer< CharT > * buffer()
Returns the buffer.
Definition: IOStream.h:171
~BasicIOStream()
Destructor.
Definition: IOStream.h:155
void setBuffer(BasicStreamBuffer< CharT > *sb)
Sets the buffer.
Definition: IOStream.h:87
std::streamsize peeksome(CharT *buffer, std::streamsize n)
Peeks bytes in the stream buffer.
Definition: IOStream.h:244