23 Eegeo_ASSERT(std::less_equal<const type *>()(m_pBegin, m_pEnd),
"The end pointer is less than the begin pointer");
28 m_pEnd(m_pBegin + std::strlen(str)),
36 if (m_pCurrent == m_pEnd)
37 return traits_type::eof();
39 return traits_type::to_int_type(*m_pCurrent);
44 if (m_pCurrent == m_pEnd)
45 return traits_type::eof();
47 return traits_type::to_int_type(*m_pCurrent++);
50 int_type pbackfail(int_type ch)
52 if (m_pCurrent == m_pBegin || (ch != traits_type::eof() && ch != m_pCurrent[-1]))
53 return traits_type::eof();
55 return traits_type::to_int_type(*--m_pCurrent);
58 std::streamsize showmanyc()
60 Eegeo_ASSERT(std::less_equal<const type *>()(m_pCurrent, m_pEnd),
"The end pointer is less than the begin pointer")
61 return m_pEnd - m_pCurrent;
64 pos_type seekoff(std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out)
66 if (way == std::ios_base::beg)
68 m_pCurrent = m_pBegin + off;
70 else if (way == std::ios_base::cur)
74 else if (way == std::ios_base::end)
76 m_pCurrent = m_pEnd + off;
79 if (m_pCurrent < m_pBegin || m_pCurrent > m_pEnd)
81 return static_cast<pos_type
>(-1);
84 return static_cast<pos_type
>(m_pCurrent - m_pBegin);
87 pos_type seekpos(pos_type sp, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out)
89 m_pCurrent = m_pBegin + sp;
91 if (m_pCurrent < m_pBegin || m_pCurrent > m_pEnd)
93 return static_cast<pos_type
>(-1);
96 return static_cast<pos_type
>(m_pCurrent - m_pBegin);
100 const type *
const m_pBegin;
101 const type *
const m_pEnd;
102 const type * m_pCurrent;