#ifndef PARAM_H
#define PARAM_H

#include "StringInt.h"

#include <map>
#include <string>
using namespace std;

//Param contains information one game state would pass to another
// You can also use this as a session by not clearing the data.

#define PARAM_STATE_CLEAR 0
#define PARAM_STATE_DIRTY 1

class Param {
 public:
  Param();
  ~Param();

  //resets the state to PARAM_STATE_CLEAR
  void clear();
  void clearParamState();
  //returns the state
  uint8_t getParamState ();

  //setX will make a (key, val) map. If an entry with key already exists, this will overwrite it.
  //getX will fill the second argument with the value found at key. If key does not exist, the second argument is untouched.

  //string
  void setString (const string & key, const string & val);
  void getString (const string & key, string & val);

  //int
  void setInt (const string & key, int val);
  void getInt (const string & key, int & val);

  //bool
  void setBool (const string & key, bool val);
  void getBool (const string & key, bool & val);
 private:
  map <string, string> dataString;
  map <string, int> dataInt;
  map <string, bool> dataBool;
  uint8_t paramState;
};

#endif
