31 int ch = source.
get();
48 : source(sourceStream)
98 : destination(destinationStream)
211 if (!std::isprint(ch))
219static bool getLong(Glib::ustring &str,
long *val)
221 const char *begin = str.raw().c_str();
223 long ival = strtol(begin, &
end, 10);
230static bool getULong(Glib::ustring &str,
unsigned long *val)
232 const char *begin = str.raw().c_str();
234 unsigned long ival = strtoul(begin, &
end, 10);
243 const char *begin = str.raw().c_str();
245 double ival = strtod(begin, &
end);
278 val = (
unsigned short) ival;
296 val = (
unsigned int) ival;
344 : inputStream(inputStreamSource)
479 gchar *
buf = g_strdup_vprintf(
fmt, args);
511 for (
char it : str) {
552 gchar *
buf = g_strdup_printf(
"%d", val);
567 gchar *
buf = g_strdup_printf(
"%u", val);
580 gchar *
buf = g_strdup_printf(
"%d", val);
593 gchar *
buf = g_strdup_printf(
"%u", val);
606 gchar *
buf = g_strdup_printf(
"%ld", val);
619 gchar *
buf = g_strdup_printf(
"%lu", val);
633 gchar *
buf = g_strdup_printf(
"%8.3f", val);
639 std::string tmp = ftos(val,
'g', 8, 3, 0);
651 gchar *
buf = g_strdup_printf(
"%8.3f", val);
657 std::string tmp = ftos(val,
'g', 8, 3, 0);
711 : outputStream(outputStreamDest)
BasicOutputStream(OutputStream &destinationStream)
OutputStream & destination
void flush() override
Flushes this output stream and forces any buffered output bytes to be written out.
void close() override
Closes this output stream and releases any system resources associated with this stream.
int put(char ch) override
Writes the specified byte to this output stream.
const Reader & readBool(bool &val) override
const Reader & readShort(short &val) override
int available() override
Returns the number of bytes that can be read (or skipped over) from this reader without blocking by t...
const Reader & readLong(long &val) override
const Reader & readUnsignedInt(unsigned int &val) override
const Reader & readFloat(float &val) override
const Reader & readInt(int &val) override
const Reader & readUnsignedLong(unsigned long &val) override
const Reader & readUnsignedShort(unsigned short &val) override
const Reader & readDouble(double &val) override
void close() override
Closes this reader and releases any system resources associated with the reader.
char get() override
Reads the next byte of data from the reader.
Glib::ustring readLine() override
Reads a line of data from the reader.
Glib::ustring readWord() override
Reads a line of data from the reader.
Writer & writeUnsignedShort(unsigned short val) override
Writer & writeBool(bool val) override
Writer & writeFloat(float val) override
Writer & printf(char const *fmt,...) override G_GNUC_PRINTF(2
Provide printf()-like formatting.
void flush() override
Flushes this output stream and forces any buffered output bytes to be written out.
Writer & writeLong(long val) override
void close() override
Closes this writer and releases any system resources associated with this writer.
Writer & writeString(const char *str) override
Writes the specified character string to this output writer.
void put(char ch) override
Writes the specified byte to this output writer.
Writer & writeUnsignedInt(unsigned int val) override
Writer & writeDouble(double val) override
Writer & writeUnsignedLong(unsigned long val) override
Writer Writer & writeChar(char val) override
Writes the specified character to this output writer.
Writer & writeShort(short val) override
Writer & writeUString(const Glib::ustring &val) override
Writes the specified unicode string to this output writer.
Writer & writeStdString(const std::string &val) override
Writes the specified standard string to this output writer.
Writer & writeInt(int val) override
OutputStreamWriter(OutputStream &outputStreamDest)
void put(char ch) override
Overloaded to redirect the output chars from the next Writer in the chain to an OutputStream instead.
void close() override
Close the underlying OutputStream.
OutputStream & outputStream
void flush() override
Flush the underlying OutputStream.
This interface is the base of all input stream classes.
virtual int put(char ch)=0
Send one byte to the destination stream.
virtual void close()=0
This call should.
virtual void flush()=0
This call should push any pending data it might have to the destination stream.
This interface and its descendants are for unicode character-oriented input.
virtual int available()=0
Convenience class for writing to standard output.
int available() override
Flush the underlying OutputStream.
char get() override
Overloaded to receive its bytes from an InputStream rather than a Reader.
void close() override
Close the underlying OutputStream.
InputStream * inputStream
void put(char ch) override
Overloaded to redirect the output chars from the next Writer in the chain to an OutputStream instead.
void close() override
Close the underlying OutputStream.
OutputStream * outputStream
void flush() override
Flush the underlying OutputStream.
This interface and its descendants are for unicode character-oriented output.
virtual Writer & writeDouble(double val)=0
virtual Writer & writeInt(int val)=0
virtual Writer & writeBool(bool val)=0
virtual Writer & writeUnsignedLong(unsigned long val)=0
virtual Writer & writeLong(long val)=0
virtual Writer & writeShort(short val)=0
virtual Writer & writeString(const char *str)=0
virtual Writer & writeUnsignedShort(unsigned short val)=0
virtual Writer & writeStdString(const std::string &val)=0
virtual Writer virtual Writer & writeChar(char val)=0
virtual Writer & writeUString(const Glib::ustring &val)=0
virtual Writer & writeFloat(float val)=0
virtual void put(char ch)=0
virtual Writer & writeUnsignedInt(unsigned int val)=0
static bool getULong(Glib::ustring &str, unsigned long *val)
static bool getLong(Glib::ustring &str, long *val)
static bool getDouble(Glib::ustring &str, double *val)
void pipeStream(InputStream &source, OutputStream &dest)
Helper class to stream background task notifications as a series of messages.
int const char va_start(args, fmt)