nakedmud-mod/
nakedmud-mod/html/tutorials/
nakedmud-mod/html/tutorials/building_extras/
nakedmud-mod/html/tutorials/c/
nakedmud-mod/html/tutorials/reference/
nakedmud-mod/html/tutorials/scripting/
nakedmud-mod/html/tutorials/scripting_extras/
nakedmud-mod/lib/
nakedmud-mod/lib/help/A/
nakedmud-mod/lib/help/B/
nakedmud-mod/lib/help/C/
nakedmud-mod/lib/help/D/
nakedmud-mod/lib/help/G/
nakedmud-mod/lib/help/H/
nakedmud-mod/lib/help/J/
nakedmud-mod/lib/help/L/
nakedmud-mod/lib/help/M/
nakedmud-mod/lib/help/O/
nakedmud-mod/lib/help/P/
nakedmud-mod/lib/help/R/
nakedmud-mod/lib/help/S/
nakedmud-mod/lib/help/W/
nakedmud-mod/lib/logs/
nakedmud-mod/lib/misc/
nakedmud-mod/lib/players/
nakedmud-mod/lib/pymodules/polc/
nakedmud-mod/lib/txt/
nakedmud-mod/lib/world/
nakedmud-mod/lib/world/zones/examples/
nakedmud-mod/lib/world/zones/examples/mproto/
nakedmud-mod/lib/world/zones/examples/oproto/
nakedmud-mod/lib/world/zones/examples/reset/
nakedmud-mod/lib/world/zones/examples/rproto/
nakedmud-mod/lib/world/zones/examples/trigger/
nakedmud-mod/lib/world/zones/limbo/
nakedmud-mod/lib/world/zones/limbo/room/
nakedmud-mod/lib/world/zones/limbo/rproto/
nakedmud-mod/src/alias/
nakedmud-mod/src/dyn_vars/
nakedmud-mod/src/editor/
nakedmud-mod/src/example_module/
nakedmud-mod/src/help2/
nakedmud-mod/src/set_val/
nakedmud-mod/src/socials/
nakedmud-mod/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