Go to the documentation of this file.
359 #ifndef CGU_FDSTREAM_H
360 #define CGU_FDSTREAM_H
366 #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)
451 #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);
541 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
597 void attach_fd(
int fd_,
bool manage_ =
true);
685 template <
class charT ,
class Traits = std::
char_traits<
charT> >
861 template <
class charT ,
class Traits = std::
char_traits<
charT> >
876 static const int putback_size = 4;
877 static const int buf_size = 1024;
878 char_type buffer[buf_size + putback_size];
899 #ifndef FDSTREAM_USE_STD_N_READ_WRITE
951 std::ios_base::seekdir way,
952 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
987 std::ios_base::openmode m = std::ios_base::in | std::ios_base::out);
1027 void attach_fd(
int fd_,
bool manage_ =
true);
1113 template <
class charT ,
class Traits = std::
char_traits<
charT> >
1324 #include <c++-gtk-utils/fdstream.tpp>
void set_buffered(bool buffered)
Definition: fdstream.h:824
basic_fdostream< char > fdostream
Output stream for file descriptors for char type.
Definition: fdstream.h:1290
Definition: application.h:45
virtual pos_type seekpos(pos_type p, std::ios_base::openmode m=std::ios_base::in|std::ios_base::out)
void set_byteswap(bool swap)
virtual pos_type seekoff(off_type off, std::ios_base::seekdir way, std::ios_base::openmode m=std::ios_base::in|std::ios_base::out)
traits_type::int_type int_type
Definition: fdstream.h:867
basic_fdistream< wchar_t > wfdistream
Input stream for file descriptors for wchar_t type.
Definition: fdstream.h:1312
int get_fd() const
Definition: fdstream.h:1053
Output stream for unix file descriptors.
Definition: fdstream.h:686
charT char_type
Definition: fdstream.h:407
virtual pos_type seekoff(off_type off, std::ios_base::seekdir way, std::ios_base::openmode m=std::ios_base::in|std::ios_base::out)
void attach(int fd, bool manage=true)
Definition: fdstream.h:1176
basic_fdostream< wchar_t > wfdostream
Output stream for file descriptors for wchar_t type.
Definition: fdstream.h:1320
virtual pos_type seekpos(pos_type p, std::ios_base::openmode m=std::ios_base::in|std::ios_base::out)
basic_fdoutbuf< char > fdoutbuf
Output stream buffer for file descriptors for char type.
Definition: fdstream.h:1274
Traits traits_type
Definition: fdstream.h:408
basic_fdistream(int fd, bool manage=true)
Definition: fdstream.h:1135
traits_type::pos_type pos_type
Definition: fdstream.h:868
void swap(Cgu::AsyncQueue< T, Container > &q1, Cgu::AsyncQueue< T, Container > &q2)
Definition: async_queue.h:784
A deleter functor for use as the second (Dealloc) template parameter of the SharedHandle,...
Definition: shared_handle.h:380
void attach_fd(int fd_, bool manage_=true)
int filedesc() const
Definition: fdstream.h:1205
Input stream for unix file descriptors.
Definition: fdstream.h:1114
bool can_seek() const
Definition: fdstream.h:1252
basic_fdistream< char > fdistream
Input stream for file descriptors for char type.
Definition: fdstream.h:1282
virtual ~basic_fdoutbuf()
traits_type::off_type off_type
Definition: fdstream.h:869
#define CGU_GLIB_MEMORY_SLICES_FUNCS
Definition: cgu_config.h:84
virtual std::streamsize xsputn(const char_type *, std::streamsize)
Input stream buffer for unix file descriptors.
Definition: fdstream.h:862
void close()
Definition: fdstream.h:1193
Traits traits_type
Definition: fdstream.h:866
traits_type::pos_type pos_type
Definition: fdstream.h:410
traits_type::int_type int_type
Definition: fdstream.h:409
void attach(int fd, bool manage=true)
Definition: fdstream.h:765
bool can_seek() const
Definition: fdstream.h:843
virtual int_type overflow(int_type)
void set_byteswap(bool swap)
Definition: fdstream.h:1233
This is a generic scoped class for managing the lifetime of objects allocated on freestore.
Definition: shared_handle.h:411
basic_fdinbuf< wchar_t > wfdinbuf
Input stream buffer for file descriptors for wchar_t type.
Definition: fdstream.h:1297
basic_fdinbuf< char > fdinbuf
Input stream buffer for file descriptors for char type.
Definition: fdstream.h:1267
void close()
Definition: fdstream.h:782
basic_fdistream()
Definition: fdstream.h:1148
int filedesc() const
Definition: fdstream.h:794
basic_fdostream()
Definition: fdstream.h:729
int get_fd() const
Definition: fdstream.h:623
void attach_fd(int fd_, bool manage_=true)
virtual int_type underflow()
traits_type::off_type off_type
Definition: fdstream.h:411
charT char_type
Definition: fdstream.h:865
basic_fdostream(int fd, bool manage=true)
Definition: fdstream.h:716
Output stream buffer for unix file descriptors.
Definition: fdstream.h:404
basic_fdoutbuf< wchar_t > wfdoutbuf
Output stream buffer for file descriptors for wchar_t type.
Definition: fdstream.h:1304
virtual std::streamsize xsgetn(char_type *, std::streamsize)
void set_buffered(bool buffered)