#pragma interface

#ifndef _incl_parameters
#define _incl_parameters

#include <iostream>
#include <fstream>

//#include <stdio>
#include <map>

using namespace std;

class parameters;

struct ltstr{
  bool operator()(const char* s1, const char* s2) const{
    return strcmp(s1,s2)<0;
  }
};

class parameters  {
 public:

  map<const char *, const char *, ltstr> params;

  ofstream *load(char * name);

  int intp(char *name);
  const char *stringp(char *name);
  double doublep(char *name);
  bool boolp(char *name);
 
  int intp(char *name, int dflt);
  const char *stringp(char *name, char *dflt);
  double doublep(char *name, double dflt);
  bool boolp(char *name, bool dflt);

  parameters();
  parameters(char *name);

};

#endif


