351 #ifndef CGU_FDSTREAM_H
352 #define CGU_FDSTREAM_H
358 #include <sys/types.h>
403 template <
class charT ,
class Traits = std::
char_traits<
charT> >
417 static const int buf_size = 1024;
418 #if defined(CGU_USE_GLIB_MEMORY_SLICES_COMPAT) || defined(CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT)
448 #ifndef FDSTREAM_USE_STD_N_READ_WRITE
500 std::ios_base::seekdir way,
501 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
534 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
599 void attach_fd(
int fd_,
bool manage_ =
true);
683 template <
class charT ,
class Traits = std::
char_traits<
charT> >
772 void attach(
int fd,
bool manage =
true) {buf.attach_fd(fd, manage); this->clear();}
789 void close() {
if (!buf.close_fd()) this->setstate(std::ios_base::failbit);}
864 template <
class charT ,
class Traits = std::
char_traits<
charT> >
879 static const int putback_size = 4;
880 static const int buf_size = 1024;
881 char_type buffer[buf_size + putback_size];
899 #ifndef FDSTREAM_USE_STD_N_READ_WRITE
949 std::ios_base::seekdir way,
950 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
983 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
1032 void attach_fd(
int fd_,
bool manage_ =
true);
1114 template <
class charT ,
class Traits = std::
char_traits<
charT> >
1186 void attach(
int fd,
bool manage =
true) {buf.attach_fd(fd, manage); this->clear();}
1203 void close() {
if (!buf.close_fd()) this->setstate(std::ios_base::failbit);}
1390 #include <c++-gtk-utils/fdstream.tpp>