//
// THIS FILE IS COPYRIGHT 1994, 1995 BY TELENOR RESEARCH, NORWAY
//
//                        ALL RIGHTS RESERVED.
//
// For rights granted to the public see the COPYRIGHT file
//
//
// Dictionary.cc      Holds a set of words in a dictionary structure.
//
// Author:  Ken Ronny Schouten

#ifndef _DICTIONARY_H
#define _DICTIONARY_H

#include "Disk.h"

struct _element {
    unsigned char  letter;
    URLPTRSplaySet *_url;
    struct _array  *nextletter;
};

struct _array {
    unsigned char    length;
    unsigned char    num;
    struct _element *cells;
};

class Dictionary {
  private:
    struct _element _elements[256];

  public:
    Dictionary();           // Constructor
    add(unsigned char *word, Url *url);
    travers(Disk* disk);
    travers(Disk* disk, struct _array *array, unsigned char *word, int num);
};

#endif /* _DICTIONARY_H */
