Class
VipsSbuf
Description [src]
class Vips.Sbuf : Vips.Object {
parent_object: VipsObject
}
A VipsSbuf provides a buffered reading interface for a VipsSource.
You can fetch lines of text, skip whitespace, and so on.
It is useful for implementing things like CSV readers, for example.
Constructors
vips_sbuf_new_from_source
Create a VipsSbuf wrapping a source.
Instance methods
vips_sbuf_get_line
Fetch the next line of text from sbuf and return it. The end of
line character (or characters, for DOS files) are removed, and the string
is terminated with a null (\0 character).
vips_sbuf_get_line_copy
Fetch the next line of text from sbuf and return it. The end of
line character (or characters, for DOS files) are removed, and the string
is terminated with a null (\0 character).
vips_sbuf_get_non_whitespace
Fetch the next chunk of non-whitespace text from the source, and null-terminate it.
vips_sbuf_getc
Fetch the next character from the source.
vips_sbuf_require
Make sure there are at least require bytes of readahead available.
vips_sbuf_skip_whitespace
After this, the next getc will be the first char of the next block of non-whitespace (or EOF).
vips_sbuf_unbuffer
Discard the input buffer and reset the read point. You must call this
before using read or seek on the underlying VipsSource class.
vips_sbuf_ungetc
The opposite of vips_sbuf_getc(): undo the previous getc.
Methods inherited from VipsObject (27)
Methods inherited from GObject (42)
Signals
Signals inherited from VipsObject (4)
Vips.Object::close
The ::close signal is emitted once during object close. The object is dying and may not work.
Vips.Object::postbuild
The ::postbuild signal is emitted once just after successful object construction. Return non-zero to cause object construction to fail.
Vips.Object::postclose
The ::postclose signal is emitted once after object close. The object pointer is still valid, but nothing else.
Vips.Object::preclose
The ::preclose signal is emitted once just before object close starts. The object is still alive.
Signals inherited from GObject (1)
GObject.Object::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.