|
Objectively
Ultra-lightweight object oriented framework for GNU C.
|
#include <Set.h>
Properties | |
| size_t | count |
| The count of elements. | |
| Object | object |
| The superclass. | |
Properties inherited from Object | |
| Class * | clazz |
| Every instance of Object begins with a pointer to its Class. | |
| unsigned int | magic |
| A header to allow introspection of Object types. | |
Methods | |
| Class * | _Set (void) |
| The Set archetype. | |
| void | addObject (Set *self, const ident obj) |
| Adds the specified Object to this Set. | |
| void | addObjectsFromArray (Set *self, const Array *array) |
Adds the Objects contained in array to this Set. | |
| void | addObjectsFromSet (Set *self, const Set *set) |
Adds the Objects contained in set to this Set. | |
| Array * | allObjects (const Set *self) |
| bool | containsObject (const Set *self, const ident obj) |
| bool | containsObjectMatching (const Set *self, Predicate predicate, ident data) |
| void | enumerateObjects (const Set *self, SetEnumerator enumerator, ident data) |
| Enumerate the elements of this Set with the given function. | |
| void | filter (Set *self, Predicate predicate, ident data) |
Filters this Set in place using predicate. | |
| Set * | filteredSet (const Set *self, Predicate predicate, ident data) |
Creates a new Set with elements that pass predicate. | |
| Set * | init (Set *self) |
| Initializes this Set. | |
| Set * | initWithArray (Set *self, const Array *array) |
Initializes this Set to contain the Objects in array. | |
| Set * | initWithCapacity (Set *self, size_t capacity) |
| Initializes this Set with the specified capacity. | |
| Set * | initWithObjects (Set *self,...) |
| Initializes this Set with the specified objects. | |
| Set * | initWithSet (Set *self, const Set *set) |
Initializes this Set to contain the Objects in set. | |
| Set * | mappedSet (const Set *self, Functor functor, ident data) |
Transforms the elements in this Set by functor. | |
| ident | reduce (const Set *self, Reducer reducer, ident accumulator, ident data) |
| void | removeAllObjects (Set *self) |
| Removes all Objects from this Set. | |
| void | removeObject (Set *self, const ident obj) |
| Removes the specified Object from this Set. | |
| Set * | set (void) |
| Returns a new Set. | |
| Set * | setWithArray (const Array *array) |
Returns a new Set with the contents of array. | |
| Set * | setWithCapacity (size_t capacity) |
Returns a new Set with the given capacity. | |
| Set * | setWithObjects (ident obj,...) |
| Returns a new Set containing the specified Objects. | |
| Set * | setWithSet (const Set *set) |
Returns a new Set with the contents of set. | |
Methods inherited from Object | |
| Class * | _Object (void) |
| The Object archetype. | |
| Object * | copy (const Object *self) |
| Creates a shallow copy of this Object. | |
| void | dealloc (Object *self) |
| Frees all resources held by this Object. | |
| String * | description (const Object *self) |
| int | hash (const Object *self) |
| Object * | init (Object *self) |
| Initializes this Object. | |
| bool | isEqual (const Object *self, const Object *other) |
| Tests equality of the other Object. | |
| bool | isKindOfClass (const Object *self, const Class *clazz) |
| Tests for Class hierarchy membership. | |
Protected Attributes | |
| SetInterface * | interface |
| The interface. | |
Protected Attributes inherited from Object | |
| ObjectInterface * | interface |
| The interface. | |
| Class * _Set | ( | void | ) |
The Set archetype.
Definition at line 669 of file Set.c.
Adds the specified Object to this Set.
Definition at line 175 of file Set.c.
Adds the Objects contained in array to this Set.
Definition at line 203 of file Set.c.
Adds the Objects contained in set to this Set.
Definition at line 221 of file Set.c.
| self | The Set. |
Definition at line 239 of file Set.c.
| void enumerateObjects | ( | const Set * | self, |
| SetEnumerator | enumerator, | ||
| ident | data | ||
| ) |
Filters this Set in place using predicate.
| self | The Set. |
| predicate | A Predicate. |
| data | User data. |
Definition at line 314 of file Set.c.
Creates a new Set with elements that pass predicate.
| self | The Set. |
| predicate | The predicate function. |
| data | User data. |
Definition at line 341 of file Set.c.
Initializes this Set to contain the Objects in array.
NULL on error. Definition at line 385 of file Set.c.
Initializes this Set with the specified objects.
| self | The Set. |
NULL on error. Definition at line 421 of file Set.c.
Initializes this Set to contain the Objects in set.
NULL on error. Definition at line 456 of file Set.c.
| self | The Set. |
| reducer | The Reducer. |
| accumulator | The initial accumulator value. |
| data | User data. |
Definition at line 502 of file Set.c.
| Set * set | ( | void | ) |
| Set * setWithCapacity | ( | size_t | capacity | ) |