Dee.ModelReader¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
destroy |
r/w |
Called when the reader is destroyed |
|
reader_func |
r/w |
The |
|
userdata |
r/w |
user data to pass to reader_func |
Methods¶
class |
|
class |
|
class |
|
class |
|
|
Details¶
- class Dee.ModelReader¶
Structure encapsulating the information needed to read strings from a model. Used for example by
Dee.Index
.- classmethod new(reader_func, *userdata)¶
- Parameters:
reader_func (
Dee.ModelReaderFunc
) – TheDee.ModelReaderFunc
to use for the readeruserdata (
object
orNone
) – The user data to pass to reader_func
- Returns:
A pointer to an uninitialized
Dee.ModelReader
struct- Return type:
out_reader:
Dee.ModelReader
Create a new
Dee.ModelReader
with the given parameters. This call will zero the out_reader struct.
- classmethod new_for_int32_column(column)¶
- Parameters:
column (
int
) – The column index to read a %gint32 from- Returns:
A pointer to a
Dee.ModelReader
instance which will have all fields initialized appropriately- Return type:
out_reader:
Dee.ModelReader
A
Dee.ModelReader
reading a %gint32 from aDee.Model
at a given column
- classmethod new_for_string_column(column)¶
- Parameters:
column (
int
) – The column index to read a string from- Returns:
A pointer to a
Dee.ModelReader
instance which will have all fields initialized appropriately- Return type:
out_reader:
Dee.ModelReader
A
Dee.ModelReader
reading a string from aDee.Model
at a given column
- classmethod new_for_uint32_column(column)¶
- Parameters:
column (
int
) – The column index to read a %guint32 from- Returns:
A pointer to a
Dee.ModelReader
instance which will have all fields initialized appropriately- Return type:
out_reader:
Dee.ModelReader
A
Dee.ModelReader
reading a %guint32 from aDee.Model
at a given column
- read(model, iter)¶
- Parameters:
iter (
Dee.ModelIter
) – The row to read a string from
- Returns:
A newly allocated string. Free with
GLib.free
().- Return type:
Read data from a row in a
Dee.Model
and extract a string representation from it.Note that generally a
Dee.ModelReader
need not be confined to reading from one specific column, although in practice most are.