/* $Id: dict.h,v 1.1.1.1 1996/10/02 10:35:49 roitzsch Exp $ */

#ifndef DICT_H
#define DICT_H


#include <iostream.h>
#include <math.h>

#include "stack.h"

const int DefaultDictSize = 25;


class Dict
{
  public:

    Stack<char*> key;
    Stack<char*> val;

    Dict();
    Dict(int h1);
    ~Dict();

    void push(const char* const name, const char* const value);
    int  inDict(const char* const akey);
    void changeValue(const char* const s, const char* const value);

    int getVal(const char* const akey, char* value);
    int getVal(const char* const akey, int*  value);
    int getVal(const char* const akey, double* value);
    int getVal(const char* const akey, float*  value);
 
    int getKeyIndex(const char* const akey, int* index);

    void ambiguityCheck();
    friend ostream& operator<< (ostream& s, Dict& dict);
};
//-------------------------------------------------------------------------


#endif
