|
Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
|
#include <Array.h>
Properties | |
| 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 * | _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 | |
| ArrayInterface * | interface |
| The interface. More... | |
Protected Attributes inherited from Object | |
| ObjectInterface * | interface |
| The interface. More... | |
| Class * _Array | ( | void | ) |
The Array archetype.
Definition at line 470 of file Array.c.
Returns a new Array containing the contents of array.
| array | An Array. |
NULL on error. Definition at line 133 of file Array.c.
Returns a new Array containing the given Objects.
| obj | The first in a NULL-terminated list of Objects. |
NULL on error. Definition at line 142 of file Array.c.
| Array * arrayWithVaList | ( | va_list | args | ) |
Returns a new Array containing the Objects in the given va_list.
| args | The NULL-terminated va_list of Objects. |
NULL on error. Definition at line 167 of file Array.c.
Returns the components of this Array joined by chars.
| self | The Array. |
| chars | The joining characters. |
Definition at line 176 of file Array.c.
Returns the components of this Array joined by the specified String.
Definition at line 200 of file Array.c.
| void enumerateObjects | ( | const Array * | self, |
| ArrayEnumerator | enumerator, | ||
| ident | data | ||
| ) |
Creates a new Array with elements that pass predicate.
| self | The Array. |
| predicate | The predicate function. |
| data | User data. |
Definition at line 230 of file Array.c.
-1 if not found. Definition at line 271 of file Array.c.
Initializes this Array to contain the Objects in the NULL-terminated arguments list.
| self | The Array. |
NULL on error. Definition at line 312 of file Array.c.
Initializes this Array to contain the Objects in the NULL-terminated va_list.
| self | The Array. |
| args | The NULL-terminated va_list of Objects. |
NULL on error. Definition at line 327 of file Array.c.
Transforms the elements in this Array by functor.
| self | The Array. |
| functor | The Functor. |
| data | User data. |
Definition at line 358 of file Array.c.
| MutableArray * mutableCopy | ( | const Array * | self | ) |
| self | The Array. |
Definition at line 381 of file Array.c.
| self | The Array. |
| reducer | The Reducer. |
| accumulator | The initial accumulator value. |
| data | User data. |
| Array * sortedArray | ( | const Array * | self, |
| Comparator | comparator | ||
| ) |