/usr/include/bobcat/readlinestream is in libbobcat-dev 4.04.00-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | #ifndef INCLUDED_BOBCAT_READLINESTREAM_
#define INCLUDED_BOBCAT_READLINESTREAM_
#include <istream>
#include <bobcat/readlinebuf>
namespace FBB
{
class ReadLineStream: public HistoryExpansion,
public std::istream
{
ReadLineBuf &d_readLineBuf;
public:
explicit ReadLineStream(std::string const &prompt, // 1.f
Type type = DONT_EXPAND_HISTORY);
explicit ReadLineStream(std::string const &prompt, // 2.f
size_t historySize,
Type type = DONT_EXPAND_HISTORY);
void setPrompt(std::string const &prompt = ""); // .f
bool setExpansion(Type type); // .f
Expansion expansion() const; // .f
std::string const &expansionError() const; // .f
bool useTimestamps(std::string (*timestamp)());
};
inline ReadLineStream::ReadLineStream(std::string const &prompt, Type type)
:
std::istream(&ReadLineBuf::initialize(prompt, type)),
d_readLineBuf(ReadLineBuf::instance())
{}
inline ReadLineStream::ReadLineStream(std::string const &prompt,
size_t historySize, Type type)
:
std::istream(&ReadLineBuf::initialize(prompt, historySize, type)),
d_readLineBuf(ReadLineBuf::instance())
{}
inline void ReadLineStream::setPrompt(std::string const &prompt)
{
d_readLineBuf.setPrompt(prompt);
}
inline bool ReadLineStream::setExpansion(Type type)
{
return d_readLineBuf.setExpansion(type);
}
inline ReadLineStream::Expansion ReadLineStream::expansion() const
{
return d_readLineBuf.expansion();
}
inline std::string const &ReadLineStream::expansionError() const
{
return d_readLineBuf.expansionError();
}
inline bool ReadLineStream::useTimestamps(std::string (*timestamp)())
{
return d_readLineBuf.useTimestamps(timestamp);
}
} // FBB
#endif
|