326 #ifndef CGU_FDSTREAM_H
327 #define CGU_FDSTREAM_H
333 #include <sys/types.h>
378 template <
class charT ,
class Traits = std::
char_traits<
charT> >
392 static const int buf_size = 1024;
393 #if defined(CGU_USE_GLIB_MEMORY_SLICES_COMPAT) || defined(CGU_USE_GLIB_MEMORY_SLICES_NO_COMPAT)
423 #ifndef FDSTREAM_USE_STD_N_READ_WRITE
475 std::ios_base::seekdir way,
476 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
509 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
574 void attach_fd(
int fd_,
bool manage_ =
true);
658 template <
class charT ,
class Traits = std::
char_traits<
charT> >
747 void attach(
int fd,
bool manage =
true) {buf.attach_fd(fd, manage); this->clear();}
764 void close() {
if (!buf.close_fd()) this->setstate(std::ios_base::failbit);}
839 template <
class charT ,
class Traits = std::
char_traits<
charT> >
854 static const int putback_size = 4;
855 static const int buf_size = 1024;
856 char_type buffer[buf_size + putback_size];
874 #ifndef FDSTREAM_USE_STD_N_READ_WRITE
924 std::ios_base::seekdir way,
925 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
958 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
1007 void attach_fd(
int fd_,
bool manage_ =
true);
1089 template <
class charT ,
class Traits = std::
char_traits<
charT> >
1161 void attach(
int fd,
bool manage =
true) {buf.attach_fd(fd, manage); this->clear();}
1178 void close() {
if (!buf.close_fd()) this->setstate(std::ios_base::failbit);}
1365 #include <c++-gtk-utils/fdstream.tpp>