~ubuntu-branches/ubuntu/vivid/vala/vivid

« back to all changes in this revision

Viewing changes to gee/list.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-07-28 07:58:01 UTC
  • mfrom: (1.5.5 upstream) (7.3.14 experimental)
  • Revision ID: james.westby@ubuntu.com-20100728075801-18u9cg5hv5oety6m
Tags: 0.9.4-1
New upstream development release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
 
121
121
 
122
122
 
 
123
/**
 
124
 * Returns the item at the specified index in this list.
 
125
 *
 
126
 * @param index zero-based index of the item to be returned
 
127
 *
 
128
 * @return      the item at the specified index in the list
 
129
 */
123
130
gpointer vala_list_get (ValaList* self, gint index) {
124
131
        return VALA_LIST_GET_INTERFACE (self)->get (self, index);
125
132
}
126
133
 
127
134
 
 
135
/**
 
136
 * Sets the item at the specified index in this list.
 
137
 *
 
138
 * @param index zero-based index of the item to be set
 
139
 */
128
140
void vala_list_set (ValaList* self, gint index, gconstpointer item) {
129
141
        VALA_LIST_GET_INTERFACE (self)->set (self, index, item);
130
142
}
131
143
 
132
144
 
 
145
/**
 
146
 * Returns the index of the first occurence of the specified item in
 
147
 * this list.
 
148
 *
 
149
 * @return the index of the first occurence of the specified item, or
 
150
 *         -1 if the item could not be found
 
151
 */
133
152
gint vala_list_index_of (ValaList* self, gconstpointer item) {
134
153
        return VALA_LIST_GET_INTERFACE (self)->index_of (self, item);
135
154
}
136
155
 
137
156
 
 
157
/**
 
158
 * Inserts an item into this list at the specified position.
 
159
 *
 
160
 * @param index zero-based index at which item is inserted
 
161
 * @param item  item to insert into the list
 
162
 */
138
163
void vala_list_insert (ValaList* self, gint index, gconstpointer item) {
139
164
        VALA_LIST_GET_INTERFACE (self)->insert (self, index, item);
140
165
}
141
166
 
142
167
 
 
168
/**
 
169
 * Removes the item at the specified index of this list.
 
170
 *
 
171
 * @param index zero-based index of the item to be removed
 
172
 */
143
173
void vala_list_remove_at (ValaList* self, gint index) {
144
174
        VALA_LIST_GET_INTERFACE (self)->remove_at (self, index);
145
175
}
153
183
}
154
184
 
155
185
 
 
186
/**
 
187
 * Represents a collection of items in a well-defined order.
 
188
 */
156
189
GType vala_list_get_type (void) {
157
190
        static volatile gsize vala_list_type_id__volatile = 0;
158
191
        if (g_once_init_enter (&vala_list_type_id__volatile)) {