#ifndef PARSEOBJ_H_
#define PARSEOBJ_H_

#include <string>
#include "paramObj.h"

using namespace std;

// these variables represent options read from command line or file
typedef vector<string> optList;

class parseObj
{
public:
  friend class paramParser;
  parseObj(paramObj*);
  virtual ~parseObj();
  void init(paramObj*);
  
  optList* getValues();
  bool valid() { return isValid; }
  bool processable();     // returns true only if not yet processed and valid
  int size() { return values.size(); }
  string getValue(int);
  void addValue(string);
  int isOption(string s1, string s2="");
  void show();  
  void setValid();
  void setInvalid();
  bool wasProcessable();

  // paramObj related calls
  int getMinNumberOfValues() { return data->min; }
  int getMaxNumberOfValues() { return data->max; }
  string getParamName1() { return data->par1; }
  string getParamName2() { return data->par2; }
  int instances () { return data->inst; }
  
protected:
  paramObj* data;
  bool wasPrable;
  void setValidValues(bool b) { isValid = b; }  // correct number of values?
  void setProcessable(bool b) { wasUsed = b; }
  optList values;               // values of parameter
  bool isValid;
  bool wasUsed;                 // already processed by parser?
};

#endif /*PARSEOBJ_H_*/
