#pragma once

#include <vector>

enum JOKERTAO{
	INVALID,
	NAME,
	VALUE
	END
};

struct JokerTao{
	unsigned id;
	JokerTao *attr;
	unsigned index;
	std::string value;	//void* value = nullptr;

	inline unsigned last_id(){ return id__; }
	JokerTao(attr_ = nullptr, value_ = "", id_ = id__++, index_ = 0) :
				id(id_), attr(attr_), index(index_), value(value_){
	}
	delete JokerTao();

	private:
		static unsigned id__;
};

namespace jt{
	extern std::vector<JokerTao> table;

	unsigned findf_relationship(unsigned attr_, std::string value_);
	unsigned find_attribute(unsigned index_, JokerTao* attr_, unsigned index_ = 0);
}
