## ianjuta-iterable

ianjuta-iterable —

##

# Synopsis

    #define     IANJUTA_ITERABLE_ERROR
    struct      IAnjutaIterable;
    struct      IAnjutaIterableIface;
    GQuark      ianjuta_iterable_error_quark    (void);
    gboolean    ianjuta_iterable_first          (IAnjutaIterable *obj,
                                                 GError **err);
    void        ianjuta_iterable_foreach        (IAnjutaIterable *obj,
                                                 GFunc callback,
                                                 gpointer user_data,
                                                 GError **err);
    gpointer    ianjuta_iterable_get            (IAnjutaIterable *obj,
                                                 GType data_type,
                                                 GError **err);
    gint        ianjuta_iterable_get_length     (IAnjutaIterable *obj,
                                                 GError **err);
    gpointer    ianjuta_iterable_get_nth        (IAnjutaIterable *obj,
                                                 GType data_type,
                                                 gint position,
                                                 GError **err);
    gint        ianjuta_iterable_get_position   (IAnjutaIterable *obj,
                                                 GError **err);
    gboolean    ianjuta_iterable_get_settable   (IAnjutaIterable *obj,
                                                 GError **err);
    gboolean    ianjuta_iterable_last           (IAnjutaIterable *obj,
                                                 GError **err);
    gboolean    ianjuta_iterable_next           (IAnjutaIterable *obj,
                                                 GError **err);
    gboolean    ianjuta_iterable_previous       (IAnjutaIterable *obj,
                                                 GError **err);
    void        ianjuta_iterable_set            (IAnjutaIterable *obj,
                                                 GType data_type,
                                                 gpointer data,
                                                 GError **err);
    void        ianjuta_iterable_set_nth        (IAnjutaIterable *obj,
                                                 GType data_type,
                                                 gpointer data,
                                                 gint position,
                                                 GError **err);

## Object Hierarchy

      GInterface
       +----IAnjutaIterable

## Prerequisites

IAnjutaIterable requires GObject.

## Known Derived Interfaces

IAnjutaIterable is required by IAnjutaIterableTree.

## Description

## Details

### IANJUTA_ITERABLE_ERROR

    #define IANJUTA_ITERABLE_ERROR ianjuta_iterable_error_quark()

### struct IAnjutaIterable

    struct IAnjutaIterable;

### struct IAnjutaIterableIface

    struct IAnjutaIterableIface {

    	GTypeInterface g_iface;

    	gboolean (*first) (IAnjutaIterable *obj, GError **err);
    	void (*foreach) (IAnjutaIterable *obj, GFunc callback, gpointer user_data, GError **err);
    	gpointer (*get) (IAnjutaIterable *obj, GType data_type, GError **err);
    	gint (*get_length) (IAnjutaIterable *obj, GError **err);
    	gpointer (*get_nth) (IAnjutaIterable *obj, GType data_type, gint position, GError **err);
    	gint (*get_position) (IAnjutaIterable *obj, GError **err);
    	gboolean (*get_settable) (IAnjutaIterable *obj, GError **err);
    	gboolean (*last) (IAnjutaIterable *obj, GError **err);
    	gboolean (*next) (IAnjutaIterable *obj, GError **err);
    	gboolean (*previous) (IAnjutaIterable *obj, GError **err);
    	void (*set) (IAnjutaIterable *obj, GType data_type, gpointer data, GError **err);
    	void (*set_nth) (IAnjutaIterable *obj, GType data_type, gpointer data, gint position, GError **err);

    };

### ianjuta_iterable_error_quark ()

    GQuark      ianjuta_iterable_error_quark    (void);

Returns : |

### ianjuta_iterable_first ()

    gboolean    ianjuta_iterable_first          (IAnjutaIterable *obj,
                                                 GError **err);

Set iter to first element position. Returns FALSE if there is no element in the iterable (hence does not have last).

`obj` : | Self
`err` : | Error propagation and reporting
Returns : | TRUE if sucessful, other FALSE.

### ianjuta_iterable_foreach ()

    void        ianjuta_iterable_foreach        (IAnjutaIterable *obj,
                                                 GFunc callback,
                                                 gpointer user_data,
                                                 GError **err);

Call callback for each element.

`obj` : | Self
`callback` : | Callback to call for each element.
`user_data` : | user data that is passed back to the callback.
`err` : | Error propagation and reporting

### ianjuta_iterable_get ()

    gpointer    ianjuta_iterable_get            (IAnjutaIterable *obj,
                                                 GType data_type,
                                                 GError **err);

Gets the value at current iter position. Interpretation of 'data' really depends on implementation and is of type 'data_type'. `get_nth()` gets the element at given position without altering the position of current iter.

`obj` : | Self
`data_type` : | Data type of the value being retrieved.
`err` : | Error propagation and reporting
Returns : | The data at current iter position.

### ianjuta_iterable_get_length ()

    gint        ianjuta_iterable_get_length     (IAnjutaIterable *obj,
                                                 GError **err);

Length of the iterable

`obj` : | Self
`err` : | Error propagation and reporting
Returns : | total lenght of the list.

### ianjuta_iterable_get_nth ()

    gpointer    ianjuta_iterable_get_nth        (IAnjutaIterable *obj,
                                                 GType data_type,
                                                 gint position,
                                                 GError **err);

Returns the nth element in the list.

`obj` : | Self
`data_type` : | Data type of the value being retrieved.
`position` : | Index of the iter.
`err` : | Error propagation and reporting
Returns : | The data at nth position.

### ianjuta_iterable_get_position ()

    gint        ianjuta_iterable_get_position   (IAnjutaIterable *obj,
                                                 GError **err);

Index of the current iter in the iterable

`obj` : | Self
`err` : | Error propagation and reporting
Returns : | integer index.

### ianjuta_iterable_get_settable ()

    gboolean    ianjuta_iterable_get_settable   (IAnjutaIterable *obj,
                                                 GError **err);

If the iterable is settable.

`obj` : | Self
`err` : | Error propagation and reporting
Returns : | TRUE if data can be set in this implementation.

### ianjuta_iterable_last ()

    gboolean    ianjuta_iterable_last           (IAnjutaIterable *obj,
                                                 GError **err);

Set iter position to last element position. Returns FALSE if there is no element in the iterable (hence does not have last).

`obj` : | Self
`err` : | Error propagation and reporting
Returns : | TRUE if sucessful, other FALSE.

### ianjuta_iterable_next ()

    gboolean    ianjuta_iterable_next           (IAnjutaIterable *obj,
                                                 GError **err);

Set the iter position to next element position. Returns FALSE if there is no next element.

`obj` : | Self
`err` : | Error propagation and reporting
Returns : | TRUE if sucessful, other FALSE..

### ianjuta_iterable_previous ()

    gboolean    ianjuta_iterable_previous       (IAnjutaIterable *obj,
                                                 GError **err);

Set the iter position to previous element position. Returns FALSE if there is no previous element.

`obj` : | Self
`err` : | Error propagation and reporting
Returns : | TRUE if sucessful, other FALSE.

### ianjuta_iterable_set ()

    void        ianjuta_iterable_set            (IAnjutaIterable *obj,
                                                 GType data_type,
                                                 gpointer data,
                                                 GError **err);

Sets the value at current iter position. The iterable be be settable. Interpretation of 'data' really depends on implementation. The data must be of type 'data_type'.

`obj` : | Self
`data_type` : | Data type of the value being set.
`data` : | The data being set.
`err` : | Error propagation and reporting

### ianjuta_iterable_set_nth ()

    void        ianjuta_iterable_set_nth        (IAnjutaIterable *obj,
                                                 GType data_type,
                                                 gpointer data,
                                                 gint position,
                                                 GError **err);

Sets the `data` at given `position`. Current iter position is not altered.

`obj` : | Self
`data_type` : | Data type of the value being set.
`data` : | The data being set.
`position` : | element position where data is set.
`err` : | Error propagation and reporting