18 IFileStream() : std::istream(&_buf) {
25 IFileStream(
const char *filename, std::ios::openmode mode) : std::istream(&_buf) {
40 INLINE
void IFileStream::
41 open(
const char *filename, std::ios::openmode mode) {
42 clear((ios_iostate)0);
43 _buf.open(filename, mode);
44 if (!_buf.is_open()) {
45 clear(std::ios::failbit);
58 attach(
const char *filename, HANDLE handle, std::ios::openmode mode) {
59 clear((ios_iostate)0);
60 _buf.attach(filename, handle, mode);
61 if (!_buf.is_open()) {
62 clear(std::ios::failbit);
76 attach(
const char *filename,
int fd, std::ios::openmode mode) {
77 clear((ios_iostate)0);
78 _buf.attach(filename, fd, mode);
79 if (!_buf.is_open()) {
80 clear(std::ios::failbit);
88 INLINE
void IFileStream::
97 OFileStream() : std::ostream(&_buf) {
104 OFileStream(
const char *filename, std::ios::openmode mode) : std::ostream(&_buf) {
105 open(filename, mode);
119 INLINE
void OFileStream::
120 open(
const char *filename, std::ios::openmode mode) {
121 clear((ios_iostate)0);
122 _buf.open(filename, mode);
123 if (!_buf.is_open()) {
124 clear(std::ios::failbit);
137 attach(
const char *filename, HANDLE handle, std::ios::openmode mode) {
138 clear((ios_iostate)0);
139 _buf.attach(filename, handle, mode);
140 if (!_buf.is_open()) {
141 clear(std::ios::failbit);
155 attach(
const char *filename,
int fd, std::ios::openmode mode) {
156 clear((ios_iostate)0);
157 _buf.attach(filename, fd, mode);
158 if (!_buf.is_open()) {
159 clear(std::ios::failbit);
167 INLINE
void OFileStream::
176 FileStream() : std::iostream(&_buf) {
183 FileStream(
const char *filename, std::ios::openmode mode) : std::iostream(&_buf) {
184 open(filename, mode);
198 INLINE
void FileStream::
199 open(
const char *filename, std::ios::openmode mode) {
200 clear((ios_iostate)0);
201 _buf.open(filename, mode);
202 if (!_buf.is_open()) {
203 clear(std::ios::failbit);
216 attach(
const char *filename, HANDLE handle, std::ios::openmode mode) {
217 clear((ios_iostate)0);
218 _buf.attach(filename, handle, mode);
219 if (!_buf.is_open()) {
220 clear(std::ios::failbit);
234 attach(
const char *filename,
int fd, std::ios::openmode mode) {
235 clear((ios_iostate)0);
236 _buf.attach(filename, fd, mode);
237 if (!_buf.is_open()) {
238 clear(std::ios::failbit);
246 INLINE
void FileStream::