ICalArray

ICalArray

Synopsis

#define             I_CAL_ARRAY_TYPE
                    ICalArray;
struct              ICalArrayClass;
gint                i_cal_array_size                    (ICalArray *array);
ICalArray *         i_cal_array_new                     (gint element_size,
                                                         gint increment_size);
ICalArray *         i_cal_array_copy                    (ICalArray *array);
void                i_cal_array_free                    (ICalArray *array);
void                i_cal_array_append                  (ICalArray *array,
                                                         GObject *element);
void                i_cal_array_remove_element_at       (ICalArray *array,
                                                         gint position);
GObject *           i_cal_array_element_at              (ICalArray *array,
                                                         gint position);
void                i_cal_array_sort                    (ICalArray *array,
                                                         gint (*compare) (const void *, const void *));

Description

Details

I_CAL_ARRAY_TYPE

#define             I_CAL_ARRAY_TYPE

ICalArray

typedef struct {
} ICalArray;

This is the ICalArray instance.


struct ICalArrayClass

struct ICalArrayClass {
};

This is the ICalArray class.


i_cal_array_size ()

gint                i_cal_array_size                    (ICalArray *array);

Get the size of the array.

array :

The ICalArray

Returns :

The size of current array.

Since 1.0


i_cal_array_new ()

ICalArray *         i_cal_array_new                     (gint element_size,
                                                         gint increment_size);

Create a ICalArray with the element size to be element_size and increment size to be increment_size

element_size :

The size of the element of the array

increment_size :

The incremental size when the array is full

Returns :

The newly create ICalArray with the properties set by element_size and increment_size. [transfer full]

Since 1.0


i_cal_array_copy ()

ICalArray *         i_cal_array_copy                    (ICalArray *array);

Create a deep copy of ICalArray with the same properties as the array

array :

The ICalArray to be cloned. [in]

Returns :

The newly cloned ICalArray with the same value as the array. [transfer full]

Since 1.0


i_cal_array_free ()

void                i_cal_array_free                    (ICalArray *array);

Free the ICalArray

array :

The ICalArray to be freed.

Since 1.0


i_cal_array_append ()

void                i_cal_array_append                  (ICalArray *array,
                                                         GObject *element);

Append element to the end of the array

array :

The ICalArray to be appended.

element :

The element to be appended to the ICalArray. The reason why to use GOjbect * instead of gpointer is that the variable of type gpointer can only be assigned with none, integer or capsule type. The support for other types would be added in the future.

Since 1.0


i_cal_array_remove_element_at ()

void                i_cal_array_remove_element_at       (ICalArray *array,
                                                         gint position);

Remove the element at the position from the array

array :

The ICalArray to be modified.

position :

The position in which the element will be removed from the array

Since 1.0


i_cal_array_element_at ()

GObject *           i_cal_array_element_at              (ICalArray *array,
                                                         gint position);

Get the element located in the position in the array. NULL if position if out of bound

array :

The ICalArray to be queried.

position :

The position the target element is located

Returns :

The element located at the position in the array. [transfer none][allow-none]

Since 1.0


i_cal_array_sort ()

void                i_cal_array_sort                    (ICalArray *array,
                                                         gint (*compare) (const void *, const void *));

Does not work right now. Sort the array using the sort function compare

array :

The ICalArray to be sorted.

compare :

The comapre function. [scope call]

Since 1.0