#ifndef INCLUDED_BOBCAT_IRANDSTREAM_H_
#define INCLUDED_BOBCAT_IRANDSTREAM_H_

#include <istream>
#include <bobcat/randbuf>

namespace FBB
{

class IRandStream: private RandBuf, public std::istream
{
    public:
        explicit IRandStream(int max);
        IRandStream(int min, int max);
        IRandStream(int min, int max, size_t seed);
};

inline IRandStream::IRandStream(int max)
:
    RandBuf(1, max, 1),
    std::istream(this)
{}
inline IRandStream::IRandStream(int min, int max)
:
    RandBuf(min, max, 1),
    std::istream(this)
{}
inline IRandStream::IRandStream(int min, int max, size_t seed)
:
    RandBuf(min, max, seed),
    std::istream(this)
{}

} // FBB

#endif
