OODuck
0.5
C Oriented Object framework with duck-typing support
|
Collection of item. More...
Public Member Functions | |
void | add (void *self, const void *object) |
Add object to collection if not already in it. More... | |
void | del (void *self, const void *object) |
Remove item from collection. More... | |
Public Member Functions inherited from Iterable | |
bool | contains (const void *self, const void *object) |
Check if object is in the collection. More... | |
void | clear (void *self) |
Remove all items from iterable. More... | |
void * | next (const void *self, const void *iterator) |
Public Member Functions inherited from Object | |
void * | ref (void *self) |
Increment object's reference counter. More... | |
void | unref (void *self) |
Decrement object's reference counter, if equals 0, delete the object. More... | |
bool | equal (const void *self, const void *other) |
Check objects equality. More... | |
Collection of item.
void add | ( | void * | self, |
const void * | object | ||
) |
Add object to collection if not already in it.
self | Collection object. |
object | Object instance (will be referenced). |
The object will be encapsulated in Item
object. Calls Collection::contains()
.
void del | ( | void * | self, |
const void * | object | ||
) |
Remove item from collection.
self | Collection object. |
object | Object instance (will be unreferenced). |
Does nothing if object
is not in the collection.