Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
|
#include <MutableSet.h>
Mutable sets.
Definition at line 40 of file MutableSet.h.
Properties | |
Set | set |
The superclass. More... | |
![]() | |
size_t | count |
The count of elements. More... | |
Object | object |
The superclass. More... | |
![]() | |
Class * | clazz |
Every instance of Object begins with a pointer to its Class. More... | |
Methods | |
Class * | _MutableSet (void) |
The MutableSet archetype. More... | |
void | addObject (MutableSet *self, const ident obj) |
Adds the specified Object to this Set. More... | |
void | addObjectsFromArray (MutableSet *self, const Array *array) |
Adds the Objects contained in array to this Set. More... | |
void | addObjectsFromSet (MutableSet *self, const Set *set) |
Adds the Objects contained in set to this Set. More... | |
void | filter (MutableSet *self, Predicate predicate, ident data) |
Filters this MutableSet in place using predicate . More... | |
MutableSet * | init (MutableSet *self) |
Initializes this MutableSet. More... | |
MutableSet * | initWithCapacity (MutableSet *self, size_t capacity) |
MutableSet * | initWithCapacity (MutableSet *self, size_t capacity) |
Initializes this Set with the specified capacity. More... | |
void | removeAllObjects (MutableSet *self) |
Removes all Objects from this Set. More... | |
void | removeObject (MutableSet *self, const ident obj) |
Removes the specified Object from this Set. More... | |
MutableSet * | set (void) |
Returns a new MutableSet. More... | |
MutableSet * | setWithCapacity (size_t capacity) |
Returns a new MutableSet with the given capacity . More... | |
![]() | |
Class * | _Set (void) |
The Set archetype. More... | |
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. More... | |
Set * | filteredSet (const Set *self, Predicate predicate, ident data) |
Creates a new Set with elements that pass predicate . More... | |
Set * | initWithArray (Set *self, const Array *array) |
Initializes this Set to contain the Objects in array . More... | |
Set * | initWithObjects (Set *self,...) |
Initializes this Set with the specified objects. More... | |
Set * | initWithSet (Set *self, const Set *set) |
Initializes this Set to contain the Objects in set . More... | |
Set * | mappedSet (const Set *self, Functor functor, ident data) |
Transforms the elements in this Set by functor . More... | |
MutableSet * | mutableCopy (const Set *self) |
ident | reduce (const Set *self, Reducer reducer, ident accumulator, ident data) |
Set * | setWithArray (const Array *array) |
Returns a new Set with the contents of array . More... | |
Set * | setWithObjects (ident obj,...) |
Returns a new Set containing the specified Objects. More... | |
Set * | setWithSet (const Set *set) |
Returns a new Set with the contents of set . More... | |
![]() | |
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 | |
MutableSetInterface * | interface |
The interface. More... | |
![]() | |
SetInterface * | interface |
The interface. More... | |
![]() | |
ObjectInterface * | interface |
The interface. More... | |
|
protected |
The interface.
Definition at line 51 of file MutableSet.h.
MutableSet * set | ( | void | ) |
The superclass.
Definition at line 45 of file MutableSet.h.
Class * _MutableSet | ( | void | ) |
The MutableSet archetype.
Definition at line 298 of file MutableSet.c.
void addObject | ( | MutableSet * | self, |
const ident | obj | ||
) |
Adds the specified Object to this Set.
self | The MutableSet. |
obj | An Object. |
Definition at line 96 of file MutableSet.c.
void addObjectsFromArray | ( | MutableSet * | self, |
const Array * | array | ||
) |
Adds the Objects contained in array
to this Set.
self | The MutableSet. |
array | An Array. |
Definition at line 126 of file MutableSet.c.
void addObjectsFromSet | ( | MutableSet * | self, |
const Set * | set | ||
) |
Adds the Objects contained in set
to this Set.
self | The MutableSet. |
set | A Set. |
Definition at line 144 of file MutableSet.c.
void filter | ( | MutableSet * | self, |
Predicate | predicate, | ||
ident | data | ||
) |
Filters this MutableSet in place using predicate
.
self | The MutableSet. |
predicate | A Predicate. |
data | User data. |
Definition at line 155 of file MutableSet.c.
MutableSet * init | ( | MutableSet * | self | ) |
Initializes this MutableSet.
self | The MutableSet. |
NULL
on error. Definition at line 182 of file MutableSet.c.
MutableSet * initWithCapacity | ( | MutableSet * | self, |
size_t | capacity | ||
) |
Definition at line 191 of file MutableSet.c.
MutableSet * initWithCapacity | ( | MutableSet * | self, |
size_t | capacity | ||
) |
Initializes this Set with the specified capacity.
self | The MutableSet. |
capacity | The desired initial capacity. |
NULL
on error. Definition at line 191 of file MutableSet.c.
void removeAllObjects | ( | MutableSet * | self | ) |
Removes all Objects from this Set.
self | The MutableSet. |
Definition at line 211 of file MutableSet.c.
void removeObject | ( | MutableSet * | self, |
const ident | obj | ||
) |
Removes the specified Object from this Set.
self | The MutableSet. |
obj | The Object to remove. |
Definition at line 229 of file MutableSet.c.
MutableSet * set | ( | void | ) |
Returns a new MutableSet.
NULL
on error. Definition at line 259 of file MutableSet.c.
MutableSet * setWithCapacity | ( | size_t | capacity | ) |
Returns a new MutableSet with the given capacity
.
capacity | The desired initial capacity. |
NULL
on error. Definition at line 268 of file MutableSet.c.