## ETableMemoryStore

ETableMemoryStore

## Synopsis

    struct              ETableMemoryStore;
    enum                ETableMemoryStoreColumnType;
                        ETableMemoryStoreCustomColumn;
                        ETableMemoryStoreColumnInfo;
    #define             E_TABLE_MEMORY_STORE_TERMINATOR
    #define             E_TABLE_MEMORY_STORE_INTEGER
    #define             E_TABLE_MEMORY_STORE_STRING
    ETableModel *       e_table_memory_store_new            (ETableMemoryStoreColumnInfo *columns);
    ETableModel *       e_table_memory_store_construct      (ETableMemoryStore *store,
                                                             ETableMemoryStoreColumnInfo *columns);
    void                e_table_memory_store_adopt_value_at (ETableMemoryStore *etms,
                                                             gint col,
                                                             gint row,
                                                             gpointer value);
    void                e_table_memory_store_insert_array   (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer *store,
                                                             gpointer data);
    void                e_table_memory_store_insert         (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer data,
                                                             ...);
    void                e_table_memory_store_insert_adopt   (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer data,
                                                             ...);
    void                e_table_memory_store_insert_adopt_array
                                                            (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer *store,
                                                             gpointer data);
    void                e_table_memory_store_change_array   (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer *store,
                                                             gpointer data);
    void                e_table_memory_store_change         (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer data,
                                                             ...);
    void                e_table_memory_store_change_adopt   (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer data,
                                                             ...);
    void                e_table_memory_store_change_adopt_array
                                                            (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer *store,
                                                             gpointer data);
    void                e_table_memory_store_remove         (ETableMemoryStore *etms,
                                                             gint row);
    void                e_table_memory_store_clear          (ETableMemoryStore *etms);

## Object Hierarchy

      GObject
       +----ETableModel
             +----ETableMemory
                   +----ETableMemoryStore

## Description

## Details

### struct ETableMemoryStore

    struct ETableMemoryStore;

### enum ETableMemoryStoreColumnType

    typedef enum {
    	E_TABLE_MEMORY_STORE_COLUMN_TYPE_TERMINATOR,
    	E_TABLE_MEMORY_STORE_COLUMN_TYPE_INTEGER,
    	E_TABLE_MEMORY_STORE_COLUMN_TYPE_STRING,
    	E_TABLE_MEMORY_STORE_COLUMN_TYPE_PIXBUF,
    	E_TABLE_MEMORY_STORE_COLUMN_TYPE_OBJECT,
    	E_TABLE_MEMORY_STORE_COLUMN_TYPE_CUSTOM
    } ETableMemoryStoreColumnType;

### ETableMemoryStoreCustomColumn

    typedef struct {
    	ETableMemoryCallbacksDuplicateValueFn duplicate_value;
    	ETableMemoryCallbacksFreeValueFn free_value;
    	ETableMemoryCallbacksInitializeValueFn initialize_value;
    	ETableMemoryCallbacksValueIsEmptyFn value_is_empty;
    	ETableMemoryCallbacksValueToStringFn value_to_string;
    } ETableMemoryStoreCustomColumn;

### ETableMemoryStoreColumnInfo

    typedef struct {
    	ETableMemoryStoreColumnType type;
    	ETableMemoryStoreCustomColumn custom;
    	guint editable : 1;
    } ETableMemoryStoreColumnInfo;

### E_TABLE_MEMORY_STORE_TERMINATOR

    #define             E_TABLE_MEMORY_STORE_TERMINATOR

### E_TABLE_MEMORY_STORE_INTEGER

    #define             E_TABLE_MEMORY_STORE_INTEGER

### E_TABLE_MEMORY_STORE_STRING

    #define             E_TABLE_MEMORY_STORE_STRING

### e_table_memory_store_new ()

    ETableModel *       e_table_memory_store_new            (ETableMemoryStoreColumnInfo *columns);

This initializes a new ETableMemoryStoreModel object. ETableMemoryStoreModel is an implementaiton of the abstract class ETableModel. The ETableMemoryStoreModel is designed to allow people to easily create ETableModels without having to create a new GType derived from ETableModel every time they need one.

Instead, ETableMemoryStoreModel uses a setup based in callback functions, every callback function signature mimics the signature of each ETableModel method and passes the extra `data` pointer to each one of the method to provide them with any context they might want to use.

Returns : | An ETableMemoryStoreModel object (which is also an ETableModel object).

### e_table_memory_store_construct ()

    ETableModel *       e_table_memory_store_construct      (ETableMemoryStore *store,
                                                             ETableMemoryStoreColumnInfo *columns);

### e_table_memory_store_adopt_value_at ()

    void                e_table_memory_store_adopt_value_at (ETableMemoryStore *etms,
                                                             gint col,
                                                             gint row,
                                                             gpointer value);

### e_table_memory_store_insert_array ()

    void                e_table_memory_store_insert_array   (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer *store,
                                                             gpointer data);

### e_table_memory_store_insert ()

    void                e_table_memory_store_insert         (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer data,
                                                             ...);

### e_table_memory_store_insert_adopt ()

    void                e_table_memory_store_insert_adopt   (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer data,
                                                             ...);

### e_table_memory_store_insert_adopt_array ()

    void                e_table_memory_store_insert_adopt_array
                                                            (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer *store,
                                                             gpointer data);

### e_table_memory_store_change_array ()

    void                e_table_memory_store_change_array   (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer *store,
                                                             gpointer data);

frees existing values associated with a row and replaces them with duplicates of the values in store.

`etms` : | the ETabelMemoryStore.
`row` : | the row we're changing.
`store` : | an array of new values to fill the row
`data` : | the new closure to associate with this row.

### e_table_memory_store_change ()

    void                e_table_memory_store_change         (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer data,
                                                             ...);

a varargs version of e_table_memory_store_change_array. you must pass in etms->col_count args.

`etms` : | the ETabelMemoryStore.
`row` : | the row we're changing.
`data` : | the new closure to associate with this row.

### e_table_memory_store_change_adopt ()

    void                e_table_memory_store_change_adopt   (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer data,
                                                             ...);

a varargs version of e_table_memory_store_change_adopt_array. you must pass in etms->col_count args.

`etms` : | the ETabelMemoryStore.
`row` : | the row we're changing.
`data` : | the new closure to associate with this row.

### e_table_memory_store_change_adopt_array ()

    void                e_table_memory_store_change_adopt_array
                                                            (ETableMemoryStore *etms,
                                                             gint row,
                                                             gpointer *store,
                                                             gpointer data);

frees existing values for the row and stores the values from store into it. This function differs from e_table_memory_storage_change_adopt_array in that it does not duplicate the data.

`etms` : | the ETableMemoryStore
`row` : | the row we're changing.
`store` : | an array of new values to fill the row
`data` : | the new closure to associate with this row.

### e_table_memory_store_remove ()

    void                e_table_memory_store_remove         (ETableMemoryStore *etms,
                                                             gint row);

### e_table_memory_store_clear ()

    void                e_table_memory_store_clear          (ETableMemoryStore *etms);