~hikiko/nux/arb-srgba-shader

« back to all changes in this revision

Viewing changes to NuxCore/NStreamBuffer.h

  • Committer: Neil Jagdish Patel
  • Date: 2010-09-01 19:25:37 UTC
  • Revision ID: neil.patel@canonical.com-20100901192537-mfz7rm6q262pewg6
Import and build NuxCore

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef NSTREAMBUFFER_H
 
2
#define NSTREAMBUFFER_H
 
3
 
 
4
#include <streambuf>
 
5
 
 
6
NAMESPACE_BEGIN
 
7
class NStreamBuffer : public std::streambuf
 
8
{
 
9
public:
 
10
    NStreamBuffer(const BYTE *begin, const BYTE *end);
 
11
    explicit NStreamBuffer(const BYTE *str, int size);
 
12
 
 
13
    ~NStreamBuffer();
 
14
 
 
15
private:
 
16
    int_type uflow();
 
17
    int_type underflow();
 
18
    int_type pbackfail(int_type ch);
 
19
    std::streamsize showmanyc();
 
20
 
 
21
    // copy ctor and assignment not implemented;
 
22
    // copying not allowed
 
23
    NStreamBuffer(const NStreamBuffer &);
 
24
    NStreamBuffer &operator= (const NStreamBuffer &);
 
25
 
 
26
private:
 
27
    const BYTE * const begin_;
 
28
    const BYTE * const end_;
 
29
    const BYTE * current_;
 
30
};
 
31
 
 
32
NAMESPACE_END
 
33
 
 
34
#endif // NSTREAMBUFFER_H
 
 
b'\\ No newline at end of file'