
#ifndef _StrTab_h_INCLUDED
#define _StrTab_h_INCLUDED


#include "String.h"


class StrTabNode {
  public:
    String *str;
    void *value;
    StrTabNode *next;
};


class StrTab {

  public:

    StrTab(void);
    void Insert (String *str, void *value); /* Replaces on duplicate */
    int Lookup (String *str, void **value); /* Returns true if found */
    void PrintStats (void);

  private:

    int numBuckets;
    int numEntries;
    StrTabNode **buckets;
    long Hash (String *str);
};


#endif
