/usr/include/bobcat/ofoldstream is in libbobcat-dev 4.08.02-2build1.
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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | #ifndef INCLUDED_BOBCAT_OFOLDSTREAM_
#define INCLUDED_BOBCAT_OFOLDSTREAM_
#include <ostream>
#include <fstream>
#include <bobcat/ofoldstreambuf>
namespace FBB
{
// 'virtual public OFoldStreambufBlanks is used to avoid 'base class not
// accessible' warnings since OFoldStreambuf also inherits from
// OFoldStreambufBlanks and only one struct definition is needed in the
// final OFoldStream class.
class OFoldStream: virtual public OFoldStreambufEnums,
private OFoldStreambuf, public std::ostream
{
public:
OFoldStream() = default;
explicit OFoldStream(char const *fname, // 1.f
size_t leftIndent = 0, size_t rightMargin = 80,
TabsOrBlanks tob = BLANKS,
TrailingBlanks tb = IGNORE_TRAILING_BLANKS);
explicit OFoldStream(std::ostream &dest, // 2.f
size_t leftIndent = 0, size_t rightMargin = 80,
TabsOrBlanks tob = BLANKS,
TrailingBlanks tb = IGNORE_TRAILING_BLANKS);
void open(char const *fname,
size_t leftIndent = 0, size_t rightMargin = 80,
TrailingBlanks tb = IGNORE_TRAILING_BLANKS);
void open(std::ostream &out,
size_t leftIndent = 0, size_t rightMargin = 80,
TrailingBlanks tb = IGNORE_TRAILING_BLANKS);
void close(); // .f
void setMargins(size_t leftMargin, size_t rightMargin); // .f
void setTrailingBlanks(TrailingBlanks tb); // .f
void useBlanks(); // .f
void useTabs(size_t tabWidth = 8); // .f
static size_t leftMargin(std::ostream const &os); // .f
static size_t rightMargin(std::ostream const &os); // .f
};
inline OFoldStream::OFoldStream(char const *fname,
size_t leftIndent, size_t rightMargin,
TabsOrBlanks tob, TrailingBlanks tb)
:
OFoldStreambuf(fname, leftIndent, rightMargin, tob, tb),
std::ostream(this)
{}
inline OFoldStream::OFoldStream(std::ostream &out,
size_t leftIndent, size_t rightMargin,
TabsOrBlanks tob, TrailingBlanks tb)
:
OFoldStreambuf(out, leftIndent, rightMargin, tob, tb),
std::ostream(this)
{}
inline void OFoldStream::close()
{
OFoldStreambuf::close();
}
inline size_t OFoldStream::leftMargin(std::ostream const &os)
{
return OFoldStreambuf::leftMargin(os.rdbuf());
}
inline size_t OFoldStream::rightMargin(std::ostream const &os)
{
return OFoldStreambuf::rightMargin(os.rdbuf());
}
inline void OFoldStream::setMargins(size_t lm, size_t rm)
{
OFoldStreambuf::setMargins(lm, rm);
}
inline void OFoldStream::setTrailingBlanks(TrailingBlanks tb)
{
OFoldStreambuf::setTrailingBlanks(tb);
}
inline void OFoldStream::useBlanks()
{
OFoldStreambuf::useBlanks();
}
inline void OFoldStream::useTabs(size_t tabWidth)
{
OFoldStreambuf::useTabs(tabWidth);
}
} // FBB
#endif
|