nakedmudv3.6/
nakedmudv3.6/lib/
nakedmudv3.6/lib/help/A/
nakedmudv3.6/lib/help/B/
nakedmudv3.6/lib/help/C/
nakedmudv3.6/lib/help/D/
nakedmudv3.6/lib/help/G/
nakedmudv3.6/lib/help/H/
nakedmudv3.6/lib/help/J/
nakedmudv3.6/lib/help/L/
nakedmudv3.6/lib/help/M/
nakedmudv3.6/lib/help/O/
nakedmudv3.6/lib/help/P/
nakedmudv3.6/lib/help/R/
nakedmudv3.6/lib/help/S/
nakedmudv3.6/lib/help/W/
nakedmudv3.6/lib/logs/
nakedmudv3.6/lib/misc/
nakedmudv3.6/lib/players/
nakedmudv3.6/lib/txt/
nakedmudv3.6/lib/world/
nakedmudv3.6/lib/world/examples/
nakedmudv3.6/lib/world/examples/mproto/
nakedmudv3.6/lib/world/examples/oproto/
nakedmudv3.6/lib/world/examples/reset/
nakedmudv3.6/lib/world/examples/rproto/
nakedmudv3.6/lib/world/examples/trigger/
nakedmudv3.6/lib/world/limbo/
nakedmudv3.6/lib/world/limbo/room/
nakedmudv3.6/lib/world/limbo/rproto/
nakedmudv3.6/src/alias/
nakedmudv3.6/src/dyn_vars/
nakedmudv3.6/src/editor/
nakedmudv3.6/src/example_module/
nakedmudv3.6/src/help2/
nakedmudv3.6/src/set_val/
nakedmudv3.6/src/socials/
nakedmudv3.6/src/time/
#ifndef SET_H
#define SET_H
//*****************************************************************************
//
// set.h
//
// a non-ordered container that has constant lookup time.
//
//*****************************************************************************

typedef struct set_data                   SET;
typedef struct set_iterator               SET_ITERATOR;

SET  *newSet         (void);
void  deleteSet      (SET *set);
void  setPut         (SET *set, void *elem);
void  setRemove      (SET *set, void *elem);
int   setIn          (SET *set, const void *elem);
int   setSize        (SET *set);
LIST *setCollect     (SET *set);
SET  *setCopy        (SET *set);
SET  *setUnion       (SET *set1, SET *set2);
SET  *setIntersection(SET *set1, SET *set2);
void setChangeHashing(SET *set, void *cmp_func, void *hash_func);



//*****************************************************************************
//
// set iterator
//
// we may sometimes want to iterate across all of the elements in a set.
// this lets us do so.
//
//*****************************************************************************

// iterate across all the elements in a set
#define ITERATE_SET(elem, it) \
  for(elem = setIteratorCurrent(it); \
      elem != NULL; \
      setIteratorNext(it), elem = setIteratorCurrent(it))


SET_ITERATOR *newSetIterator    (SET *S);
void          deleteSetIterator (SET_ITERATOR *I);
void          setIteratorReset  (SET_ITERATOR *I);
void         *setIteratorNext   (SET_ITERATOR *I);
void         *setIteratorCurrent(SET_ITERATOR *I);

#endif // SET_H