Top | ![]() |
![]() |
![]() |
![]() |
Model ReadersModel Readers — Extracting strings from DeeModels |
gchar * | (*DeeModelReaderFunc) () |
gchar * | dee_model_reader_read () |
void | dee_model_reader_destroy () |
void | dee_model_reader_new () |
void | dee_model_reader_new_for_string_column () |
void | dee_model_reader_new_for_int32_column () |
void | dee_model_reader_new_for_uint32_column () |
The purpose of a DeeModelReader is to extract string from a DeeModel. These strings are usually passed through a DeeAnalyzer on into a DeeIndex.
Most readers will extract a value of a given type from a given column, but it must be noted that this is not a requirement. The strings may be built from several columns.
gchar * (*DeeModelReaderFunc) (DeeModel *model
,DeeModelIter *iter
,gpointer userdata
);
Extracts a string from a row in a model.
gchar * dee_model_reader_read (DeeModelReader *self
,DeeModel *model
,DeeModelIter *iter
);
Read data from a row in a DeeModel and extract a string representation from it.
Note that generally a DeeModelReader need not be confined to reading from one specific column, although in practice most are.
self |
The DeeModelReader used to read |
|
model |
The DeeModel to read a string from |
|
iter |
The row to read a string from |
void
dee_model_reader_destroy (DeeModelReader *reader
);
Release resources associated with reader
, but does not free the
DeeModelReader structure itself.
This will call the destroy()
function registered with the reader
if it is set.
void dee_model_reader_new (DeeModelReaderFunc reader_func
,gpointer userdata
,GDestroyNotify destroy
,DeeModelReader *out_reader
);
Create a new DeeModelReader with the given parameters. This call will zero
the out_reader
struct.
reader_func |
The DeeModelReaderFunc to use for the reader. |
[scope notified] |
userdata |
The user data to pass to |
[closure][allow-none] |
destroy |
The GDestroyNotify to call on
|
[allow-none] |
out_reader |
A pointer to an uninitialized DeeModelReader struct. |
[out] |
void dee_model_reader_new_for_string_column (guint column
,DeeModelReader *out_reader
);
A DeeModelReader reading a string from a DeeModel at a given column
column |
The column index to read a string from |
|
out_reader |
A pointer to a DeeModelReader instance which will have all fields initialized appropriately. |
[out] |
void dee_model_reader_new_for_int32_column (guint column
,DeeModelReader *out_reader
);
A DeeModelReader reading a gint32
from a DeeModel at a given column
column |
The column index to read a |
|
out_reader |
A pointer to a DeeModelReader instance which will have all fields initialized appropriately. |
[out] |
void dee_model_reader_new_for_uint32_column (guint column
,DeeModelReader *out_reader
);
A DeeModelReader reading a guint32
from a DeeModel at a given column
column |
The column index to read a |
|
out_reader |
A pointer to a DeeModelReader instance which will have all fields initialized appropriately. |
[out] |
typedef struct { DeeModelReaderFunc reader_func; gpointer userdata; GDestroyNotify destroy; } DeeModelReader;
Structure encapsulating the information needed to read strings from a model. Used for example by DeeIndex.
DeeModelReaderFunc |
The DeeModelReaderFunc used to extract string from a model. |
[scope notified] |
user data to pass to |
[closure] | |
Called when the reader is destroyed |