361 #ifndef CGU_FDSTREAM_H
362 #define CGU_FDSTREAM_H
368 #include <sys/types.h>
413 template <
class charT ,
class Traits = std::
char_traits<
charT> >
427 static const int buf_size = 1024;
428 #if defined(CGU_USE_GLIB_MEMORY_SLICES_COMPAT) || defined(CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT)
458 #ifndef FDSTREAM_USE_STD_N_READ_WRITE
510 std::ios_base::seekdir way,
511 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
544 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
611 void attach_fd(
int fd_,
bool manage_ =
true);
695 template <
class charT ,
class Traits = std::
char_traits<
charT> >
785 void attach(
int fd,
bool manage =
true) {buf.attach_fd(fd, manage); this->clear();}
802 void close() {
if (!buf.close_fd()) this->setstate(std::ios_base::failbit);}
877 template <
class charT ,
class Traits = std::
char_traits<
charT> >
892 static const int putback_size = 4;
893 static const int buf_size = 1024;
894 char_type buffer[buf_size + putback_size];
912 #ifndef FDSTREAM_USE_STD_N_READ_WRITE
962 std::ios_base::seekdir way,
963 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
996 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
1047 void attach_fd(
int fd_,
bool manage_ =
true);
1129 template <
class charT ,
class Traits = std::
char_traits<
charT> >
1202 void attach(
int fd,
bool manage =
true) {buf.attach_fd(fd, manage); this->clear();}
1219 void close() {
if (!buf.close_fd()) this->setstate(std::ios_base::failbit);}
1406 #include <c++-gtk-utils/fdstream.tpp>