|
Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
|
#include <MutableArray.h>
Mutable arrays.
Definition at line 40 of file MutableArray.h.
Properties | |
| Array | array |
| The superclass. More... | |
Properties inherited from Array | |
| size_t | count |
| The count of elements. More... | |
| Object | object |
| The superclass. More... | |
Properties inherited from Object | |
| Class * | clazz |
| Every instance of Object begins with a pointer to its Class. More... | |
Methods | |
| Class * | _MutableArray (void) |
| The MutableArray archetype. More... | |
| void | addObject (MutableArray *self, const ident obj) |
| Adds the specified Object to this MutableArray. More... | |
| void | addObjects (MutableArray *self, const ident obj,...) |
| Adds the specified objects to this Array. More... | |
| void | addObjectsFromArray (MutableArray *self, const Array *array) |
Adds the Objects contained in array to this MutableArray. More... | |
| MutableArray * | array (void) |
| Returns a new MutableArray. More... | |
| MutableArray * | arrayWithCapacity (size_t capacity) |
Returns a new MutableArray with the given capacity. More... | |
| void | filter (MutableArray *self, Predicate predicate, ident data) |
Filters this MutableArray in place using predicate. More... | |
| MutableArray * | init (MutableArray *self) |
| Initializes this MutableArray. More... | |
| MutableArray * | initWithCapacity (MutableArray *self, size_t capacity) |
| Initializes this MutableArray with the specified capacity. More... | |
| void | insertObjectAtIndex (MutableArray *self, ident obj, size_t index) |
| Inserts the Object at the specified index. More... | |
| void | removeAllObjects (MutableArray *self) |
| Removes all Objects from this MutableArray. More... | |
| void | removeAllObjectsWithEnumerator (MutableArray *self, ArrayEnumerator enumerator, ident data) |
Removes all Objects from this MutableArray, invoking enumerator for each Object. More... | |
| void | removeAllObjectsWithEnumerator (MutableDictionary *self, DictionaryEnumerator enumerator, ident data) |
Removes all Objects from this MutableDictionary, invoking enumerator for each Object and key pair. More... | |
| void | removeLastObject (MutableArray *self) |
| Removes the last Object from this MutableArray. More... | |
| void | removeObject (MutableArray *self, const ident obj) |
| Removes the specified Object from this MutableArray. More... | |
| void | removeObjectAtIndex (MutableArray *self, size_t index) |
| Removes the Object at the specified index. More... | |
| void | setObjectAtIndex (MutableArray *self, const ident obj, size_t index) |
| Replaces the Object at the specified index. More... | |
| void | sort (MutableArray *self, Comparator comparator) |
Sorts this MutableArray in place using comparator. More... | |
Methods inherited from Array | |
| Class * | _Array (void) |
| The Array archetype. More... | |
| Array * | arrayWithArray (const Array *array) |
Returns a new Array containing the contents of array. More... | |
| Array * | arrayWithObjects (ident obj,...) |
| Returns a new Array containing the given Objects. More... | |
| Array * | arrayWithVaList (va_list args) |
Returns a new Array containing the Objects in the given va_list. More... | |
| String * | componentsJoinedByCharacters (const Array *self, const char *chars) |
Returns the components of this Array joined by chars. More... | |
| String * | componentsJoinedByString (const Array *self, const String *string) |
| Returns the components of this Array joined by the specified String. More... | |
| _Bool | containsObject (const Array *self, const ident obj) |
| void | enumerateObjects (const Array *self, ArrayEnumerator enumerator, ident data) |
| Enumerate the elements of this Array with the given function. More... | |
| Array * | filteredArray (const Array *self, Predicate predicate, ident data) |
Creates a new Array with elements that pass predicate. More... | |
| ident | findObject (const Array *self, Predicate predicate, ident data) |
| ident | firstObject (const Array *self) |
| ssize_t | indexOfObject (const Array *self, const ident obj) |
| Array * | initWithArray (Array *self, const Array *array) |
Initializes this Array to contain the Objects in array. More... | |
| Array * | initWithObjects (Array *self,...) |
Initializes this Array to contain the Objects in the NULL-terminated arguments list. More... | |
| Array * | initWithVaList (Array *self, va_list args) |
Initializes this Array to contain the Objects in the NULL-terminated va_list. More... | |
| ident | lastObject (const Array *self) |
| Array * | mappedArray (const Array *self, Functor functor, ident data) |
Transforms the elements in this Array by functor. More... | |
| MutableArray * | mutableCopy (const Array *self) |
| ident | objectAtIndex (const Array *self, int index) |
| ident | reduce (const Array *self, Reducer reducer, ident accumulator, ident data) |
| Array * | sortedArray (const Array *self, Comparator comparator) |
Methods inherited from Object | |
| Class * | _Object (void) |
| The Object archetype. More... | |
| Object * | copy (const Object *self) |
| Creates a shallow copy of this Object. More... | |
| void | dealloc (Object *self) |
| Frees all resources held by this Object. More... | |
| String * | description (const Object *self) |
| int | hash (const Object *self) |
| Object * | init (Object *self) |
| Initializes this Object. More... | |
| _Bool | isEqual (const Object *self, const Object *other) |
| Tests equality of the other Object. More... | |
| _Bool | isKindOfClass (const Object *self, const Class *clazz) |
| Tests for Class hierarchy membership. More... | |
Protected Attributes | |
| MutableArrayInterface * | interface |
| The interface. More... | |
Protected Attributes inherited from Array | |
| ArrayInterface * | interface |
| The interface. More... | |
Protected Attributes inherited from Object | |
| ObjectInterface * | interface |
| The interface. More... | |
| MutableArray * array | ( | void | ) |
The superclass.
Definition at line 45 of file MutableArray.h.
|
protected |
The interface.
Definition at line 51 of file MutableArray.h.
| Class * _MutableArray | ( | void | ) |
The MutableArray archetype.
Definition at line 349 of file MutableArray.c.
| void addObject | ( | MutableArray * | self, |
| const ident | obj | ||
| ) |
Adds the specified Object to this MutableArray.
| self | The MutableArray. |
| obj | The Object to add. |
Definition at line 99 of file MutableArray.c.
| void addObjects | ( | MutableArray * | self, |
| const ident | obj, | ||
| ... | |||
| ) |
Adds the specified objects to this Array.
| self | The MutableArray. |
| obj | The NULL-terminated list of objects. |
Definition at line 122 of file MutableArray.c.
| void addObjectsFromArray | ( | MutableArray * | self, |
| const Array * | array | ||
| ) |
Adds the Objects contained in array to this MutableArray.
| self | The MutableArray. |
| array | An Array. |
Definition at line 140 of file MutableArray.c.
| MutableArray * array | ( | void | ) |
Returns a new MutableArray.
NULL on error. Definition at line 153 of file MutableArray.c.
| MutableArray * arrayWithCapacity | ( | size_t | capacity | ) |
Returns a new MutableArray with the given capacity.
| capacity | The desired initial capacity. |
NULL on error. Definition at line 162 of file MutableArray.c.
| void filter | ( | MutableArray * | self, |
| Predicate | predicate, | ||
| ident | data | ||
| ) |
Filters this MutableArray in place using predicate.
| self | The MutableArray. |
| predicate | A Predicate. |
| data | User data. |
Definition at line 171 of file MutableArray.c.
| MutableArray * init | ( | MutableArray * | self | ) |
Initializes this MutableArray.
| self | The MutableArray. |
NULL on error. Definition at line 186 of file MutableArray.c.
| MutableArray * initWithCapacity | ( | MutableArray * | self, |
| size_t | capacity | ||
| ) |
Initializes this MutableArray with the specified capacity.
| self | The MutableArray. |
| capacity | The desired initial capacity. |
NULL on error. Definition at line 195 of file MutableArray.c.
| void insertObjectAtIndex | ( | MutableArray * | self, |
| ident | obj, | ||
| size_t | index | ||
| ) |
Inserts the Object at the specified index.
| self | The MutableArray. |
| obj | The Object to insert. |
| index | The index at which to insert. |
Definition at line 215 of file MutableArray.c.
| void removeAllObjects | ( | MutableArray * | self | ) |
Removes all Objects from this MutableArray.
| self | The MutableArray. |
Definition at line 232 of file MutableArray.c.
| void removeAllObjectsWithEnumerator | ( | MutableArray * | self, |
| ArrayEnumerator | enumerator, | ||
| ident | data | ||
| ) |
Removes all Objects from this MutableArray, invoking enumerator for each Object.
| self | The MutableArray. |
| enumerator | The enumerator. |
| data | The data. |
Definition at line 243 of file MutableArray.c.
| void removeAllObjectsWithEnumerator | ( | MutableDictionary * | self, |
| DictionaryEnumerator | enumerator, | ||
| ident | data | ||
| ) |
Removes all Objects from this MutableDictionary, invoking enumerator for each Object and key pair.
| self | The MutableDictionary. |
| enumerator | The enumerator. |
| data | The data. |
Definition at line 143 of file MutableDictionary.c.
| void removeLastObject | ( | MutableArray * | self | ) |
Removes the last Object from this MutableArray.
| self | The MutableArray |
Definition at line 259 of file MutableArray.c.
| void removeObject | ( | MutableArray * | self, |
| const ident | obj | ||
| ) |
Removes the specified Object from this MutableArray.
| self | The MutableArray. |
| obj | The Object to remove. |
Definition at line 270 of file MutableArray.c.
| void removeObjectAtIndex | ( | MutableArray * | self, |
| size_t | index | ||
| ) |
Removes the Object at the specified index.
| self | The MutableArray. |
| index | The index of the Object to remove. |
Definition at line 282 of file MutableArray.c.
| void setObjectAtIndex | ( | MutableArray * | self, |
| const ident | obj, | ||
| size_t | index | ||
| ) |
Replaces the Object at the specified index.
| self | The MutableArray. |
| obj | The Object with which to replace. |
| index | The index of the Object to replace. |
Definition at line 299 of file MutableArray.c.
| void sort | ( | MutableArray * | self, |
| Comparator | comparator | ||
| ) |
Sorts this MutableArray in place using comparator.
| self | The MutableArray. |
| comparator | A Comparator. |
Definition at line 314 of file MutableArray.c.