356 #ifndef CGU_FDSTREAM_H
357 #define CGU_FDSTREAM_H
363 #include <sys/types.h>
408 template <
class charT ,
class Traits = std::
char_traits<
charT> >
422 static const int buf_size = 1024;
423 #if defined(CGU_USE_GLIB_MEMORY_SLICES_COMPAT) || defined(CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT)
453 #ifndef FDSTREAM_USE_STD_N_READ_WRITE
505 std::ios_base::seekdir way,
506 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
539 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
604 void attach_fd(
int fd_,
bool manage_ =
true);
688 template <
class charT ,
class Traits = std::
char_traits<
charT> >
777 void attach(
int fd,
bool manage =
true) {buf.attach_fd(fd, manage); this->clear();}
794 void close() {
if (!buf.close_fd()) this->setstate(std::ios_base::failbit);}
869 template <
class charT ,
class Traits = std::
char_traits<
charT> >
884 static const int putback_size = 4;
885 static const int buf_size = 1024;
886 char_type buffer[buf_size + putback_size];
904 #ifndef FDSTREAM_USE_STD_N_READ_WRITE
954 std::ios_base::seekdir way,
955 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
988 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
1037 void attach_fd(
int fd_,
bool manage_ =
true);
1119 template <
class charT ,
class Traits = std::
char_traits<
charT> >
1191 void attach(
int fd,
bool manage =
true) {buf.attach_fd(fd, manage); this->clear();}
1208 void close() {
if (!buf.close_fd()) this->setstate(std::ios_base::failbit);}
1395 #include <c++-gtk-utils/fdstream.tpp>