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);
606 void attach_fd(
int fd_,
bool manage_ =
true);
690 template <
class charT ,
class Traits = std::
char_traits<
charT> >
780 void attach(
int fd,
bool manage =
true) {buf.attach_fd(fd, manage); this->clear();}
797 void close() {
if (!buf.close_fd()) this->setstate(std::ios_base::failbit);}
872 template <
class charT ,
class Traits = std::
char_traits<
charT> >
887 static const int putback_size = 4;
888 static const int buf_size = 1024;
889 char_type buffer[buf_size + putback_size];
907 #ifndef FDSTREAM_USE_STD_N_READ_WRITE
957 std::ios_base::seekdir way,
958 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
991 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
1042 void attach_fd(
int fd_,
bool manage_ =
true);
1124 template <
class charT ,
class Traits = std::
char_traits<
charT> >
1197 void attach(
int fd,
bool manage =
true) {buf.attach_fd(fd, manage); this->clear();}
1214 void close() {
if (!buf.close_fd()) this->setstate(std::ios_base::failbit);}
1401 #include <c++-gtk-utils/fdstream.tpp>