// model.h


#ifndef MODEL_H
#define MODEL_H

#include <map>
using std::map;
#include <string>
using std::string;
#include <iostream>
#include <fstream>
#include <set>
using std::set;

#include "triple.h"

class model {
	private:
	int nextpos;
	int nextneg;
	map<string,int> id;	// literal to representation
	map<int, string> name; // id to name.
	set<triple> striples;	// static (non-anonymous) triples
	set<triple> atriples;	// triples with anonymous content


	public:
	model() :
		nextpos(1), nextneg(-1), id(), name(),
		striples(), atriples()
	{}

	void read(std::istream& in);

	void write(std::ostream& out);

	private:
	int readtoken(std::istream& in);

	friend bool compare(model& m1, model& m2);
};


#endif /* defined(MODEL_H) */

