Plan 9 from Bell Labs’s /usr/web/sources/contrib/de0u/root/sys/src/cmd/divergefs/set.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.



typedef struct Set Set;
#pragma incomplete Set /* See 9fans "new compiler" 2005-01-07 */

/** constructor */
Set *set_new(collectionisequal isequal, collectionhash hash);

void set_free(Set *self);

void set_free_with(Set *self, functionunary free_each);

uint set_size(Set *self);

void set_add(Set *self, void *object);

bool set_find(Set *self, void **p);

bool set_includes(Set *self, void *object);

void *set_at(Set *self, void *object);

void set_do(Set *self, collectioneach each, void *arg);

void set_unary_do(Set *self, functionunary each);

/** 
 * @return true if object was removed, false if set doesn't includ the object
 */
bool set_remove(Set *self, void *object);



Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].