2
* Copyright 2010 Inalogic Inc.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3, as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranties of
10
* MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11
* PURPOSE. See the applicable version of the GNU Lesser General Public
12
* License for more details.
14
* You should have received a copy of both the GNU Lesser General Public
15
* License version 3 along with this program. If not, see
16
* <http://www.gnu.org/licenses/>
18
* Authored by: Jay Taoko <jaytaoko@inalogic.com>
24
#include "StreamBuffer.h"
32
NStreamBuffer::NStreamBuffer (const BYTE *begin, const BYTE *end) :
37
assert (std::less_equal<const BYTE *>() (begin_, end_) );
40
NStreamBuffer::NStreamBuffer (const BYTE *str, int size) :
47
NStreamBuffer::~NStreamBuffer()
52
NStreamBuffer::int_type NStreamBuffer::underflow()
55
return traits_type::eof();
60
NStreamBuffer::int_type NStreamBuffer::uflow()
63
return traits_type::eof();
68
NStreamBuffer::int_type NStreamBuffer::pbackfail (int_type ch)
70
if (current_ == begin_ || (ch != traits_type::eof() && ch != current_[-1]) )
71
return traits_type::eof();
76
std::streamsize NStreamBuffer::showmanyc()
78
assert (std::less_equal<const BYTE *>() (current_, end_) );
79
return end_ - current_;
b'\\ No newline at end of file'